4 # &asm_init("cpp","des-586.pl");
12 &asm_finish_cpp() if $cpp;
13 print &asm_get_output();
21 $cpp=$sol=$aout=$win32=0;
22 if ( ($type eq "elf"))
23 { require "x86unix.pl"; }
24 elsif ( ($type eq "a.out"))
25 { $aout=1; require "x86unix.pl"; }
26 elsif ( ($type eq "sol"))
27 { $sol=1; require "x86unix.pl"; }
28 elsif ( ($type eq "cpp"))
29 { $cpp=1; require "x86unix.pl"; }
30 elsif ( ($type eq "win32"))
31 { $win32=1; require "x86ms.pl"; }
32 elsif ( ($type eq "win32n"))
33 { $win32=1; require "x86nasm.pl"; }
37 Pick one target type from
38 elf - linux, FreeBSD etc
41 cpp - format so x86unix.cpp can be used
42 win32 - Windows 95/Windows NT
43 win32n - Windows 95/Windows NT NASM format
50 &comment("Don't even think of reading this code");
51 &comment("It was automatically generated by $filename");
52 &comment("Which is a perl program used to generate the x86 assember for");
53 &comment("any of elf, a.out, BSDI,Win32, or Solaris");
54 &comment("eric <eay\@cryptsoft.com>");
57 $filename =~ s/\.pl$//;
66 foreach $i (&get_labels())
68 $tmp.="#define $i _$i\n";
71 /* Run the C pre-processor over this file with one of the following defined
72 * ELF - elf object files,
73 * OUT - a.out object files,
74 * BSDI - BSDI style a.out object files
75 * SOL - Solaris style elf
78 #define TYPE(a,b) .type a,b
79 #define SIZE(a,b) .size a,b
81 #if defined(OUT) || (defined(BSDI) && !defined(ELF))
90 #if defined(BSDI) && !defined(ELF)
99 #if defined(ELF) || defined(SOL)
105 You need to define one of
106 ELF - elf systems - linux-elf, NetBSD and DG-UX
107 OUT - a.out systems - linux-a.out and FreeBSD
108 SOL - solaris systems, which are elf with strange comment lines
109 BSDI - a.out with a very primative version of as.
112 /* Let the Assembler begin :-) */