4 # &asm_init("cpp","des-586.pl");
12 &asm_finish_cpp() if $cpp;
13 print &asm_get_output();
21 if ($ARGV[$#ARGV] eq "386")
26 $cpp=$sol=$aout=$win32=0;
27 if ( ($type eq "elf"))
28 { require "x86unix.pl"; }
29 elsif ( ($type eq "a.out"))
30 { $aout=1; require "x86unix.pl"; }
31 elsif ( ($type eq "sol"))
32 { $sol=1; require "x86unix.pl"; }
33 elsif ( ($type eq "cpp"))
34 { $cpp=1; require "x86unix.pl"; }
35 elsif ( ($type eq "win32"))
36 { $win32=1; require "x86ms.pl"; }
40 Usage: $filename <target> [386]
42 Pick one target type from
43 elf - linux, FreeBSD etc
46 cpp - format so x86unix.cpp can be used
47 win32 - Windows 95/Windows NT
54 &comment("Don't even think of reading this code");
55 &comment("It was automatically generated by $filename");
56 &comment("Which is a perl program used to generate the x86 assember for");
57 &comment("any of elf, a.out, BSDI,Win32, or Solaris");
58 &comment("eric <eay\@cryptsoft.com>");
61 $filename =~ s/\.pl$//;
70 foreach $i (&get_labels())
72 $tmp.="#define $i _$i\n";
75 /* Run the C pre-processor over this file with one of the following defined
76 * ELF - elf object files,
77 * OUT - a.out object files,
78 * BSDI - BSDI style a.out object files
79 * SOL - Solaris style elf
82 #define TYPE(a,b) .type a,b
83 #define SIZE(a,b) .size a,b
85 #if defined(OUT) || defined(BSDI)
103 #if defined(ELF) || defined(SOL)
109 You need to define one of
110 ELF - elf systems - linux-elf, NetBSD and DG-UX
111 OUT - a.out systems - linux-a.out and FreeBSD
112 SOL - solaris systems, which are elf with strange comment lines
113 BSDI - a.out with a very primative version of as.
116 /* Let the Assembler begin :-) */