10Sstevel@tonic-gate#!/usr/local/bin/perl 20Sstevel@tonic-gate 30Sstevel@tonic-gatepackage x86ms; 40Sstevel@tonic-gate 50Sstevel@tonic-gate$label="L000"; 60Sstevel@tonic-gate 70Sstevel@tonic-gate%lb=( 'eax', 'al', 80Sstevel@tonic-gate 'ebx', 'bl', 90Sstevel@tonic-gate 'ecx', 'cl', 100Sstevel@tonic-gate 'edx', 'dl', 110Sstevel@tonic-gate 'ax', 'al', 120Sstevel@tonic-gate 'bx', 'bl', 130Sstevel@tonic-gate 'cx', 'cl', 140Sstevel@tonic-gate 'dx', 'dl', 150Sstevel@tonic-gate ); 160Sstevel@tonic-gate 170Sstevel@tonic-gate%hb=( 'eax', 'ah', 180Sstevel@tonic-gate 'ebx', 'bh', 190Sstevel@tonic-gate 'ecx', 'ch', 200Sstevel@tonic-gate 'edx', 'dh', 210Sstevel@tonic-gate 'ax', 'ah', 220Sstevel@tonic-gate 'bx', 'bh', 230Sstevel@tonic-gate 'cx', 'ch', 240Sstevel@tonic-gate 'dx', 'dh', 250Sstevel@tonic-gate ); 260Sstevel@tonic-gate 270Sstevel@tonic-gatesub main'asm_init_output { @out=(); } 280Sstevel@tonic-gatesub main'asm_get_output { return(@out); } 290Sstevel@tonic-gatesub main'get_labels { return(@labels); } 300Sstevel@tonic-gatesub main'external_label { push(@labels,@_); } 310Sstevel@tonic-gate 320Sstevel@tonic-gatesub main'LB 330Sstevel@tonic-gate { 340Sstevel@tonic-gate (defined($lb{$_[0]})) || die "$_[0] does not have a 'low byte'\n"; 350Sstevel@tonic-gate return($lb{$_[0]}); 360Sstevel@tonic-gate } 370Sstevel@tonic-gate 380Sstevel@tonic-gatesub main'HB 390Sstevel@tonic-gate { 400Sstevel@tonic-gate (defined($hb{$_[0]})) || die "$_[0] does not have a 'high byte'\n"; 410Sstevel@tonic-gate return($hb{$_[0]}); 420Sstevel@tonic-gate } 430Sstevel@tonic-gate 440Sstevel@tonic-gatesub main'BP 450Sstevel@tonic-gate { 460Sstevel@tonic-gate &get_mem("BYTE",@_); 470Sstevel@tonic-gate } 480Sstevel@tonic-gate 490Sstevel@tonic-gatesub main'DWP 500Sstevel@tonic-gate { 510Sstevel@tonic-gate &get_mem("DWORD",@_); 520Sstevel@tonic-gate } 530Sstevel@tonic-gate 54*2139Sjp161948sub main'QWP 55*2139Sjp161948 { 56*2139Sjp161948 &get_mem("QWORD",@_); 57*2139Sjp161948 } 58*2139Sjp161948 590Sstevel@tonic-gatesub main'BC 600Sstevel@tonic-gate { 610Sstevel@tonic-gate return @_; 620Sstevel@tonic-gate } 630Sstevel@tonic-gate 640Sstevel@tonic-gatesub main'DWC 650Sstevel@tonic-gate { 660Sstevel@tonic-gate return @_; 670Sstevel@tonic-gate } 680Sstevel@tonic-gate 690Sstevel@tonic-gatesub main'stack_push 700Sstevel@tonic-gate { 710Sstevel@tonic-gate local($num)=@_; 720Sstevel@tonic-gate $stack+=$num*4; 730Sstevel@tonic-gate &main'sub("esp",$num*4); 740Sstevel@tonic-gate } 750Sstevel@tonic-gate 760Sstevel@tonic-gatesub main'stack_pop 770Sstevel@tonic-gate { 780Sstevel@tonic-gate local($num)=@_; 790Sstevel@tonic-gate $stack-=$num*4; 800Sstevel@tonic-gate &main'add("esp",$num*4); 810Sstevel@tonic-gate } 820Sstevel@tonic-gate 830Sstevel@tonic-gatesub get_mem 840Sstevel@tonic-gate { 850Sstevel@tonic-gate local($size,$addr,$reg1,$reg2,$idx)=@_; 860Sstevel@tonic-gate local($t,$post); 870Sstevel@tonic-gate local($ret)="$size PTR "; 880Sstevel@tonic-gate 890Sstevel@tonic-gate $addr =~ s/^\s+//; 900Sstevel@tonic-gate if ($addr =~ /^(.+)\+(.+)$/) 910Sstevel@tonic-gate { 920Sstevel@tonic-gate $reg2=&conv($1); 930Sstevel@tonic-gate $addr="_$2"; 940Sstevel@tonic-gate } 95*2139Sjp161948 elsif ($addr =~ /^[_a-z][_a-z0-9]*$/i) 960Sstevel@tonic-gate { 970Sstevel@tonic-gate $addr="_$addr"; 980Sstevel@tonic-gate } 990Sstevel@tonic-gate 1000Sstevel@tonic-gate if ($addr =~ /^.+\-.+$/) { $addr="($addr)"; } 1010Sstevel@tonic-gate 1020Sstevel@tonic-gate $reg1="$regs{$reg1}" if defined($regs{$reg1}); 1030Sstevel@tonic-gate $reg2="$regs{$reg2}" if defined($regs{$reg2}); 1040Sstevel@tonic-gate if (($addr ne "") && ($addr ne 0)) 1050Sstevel@tonic-gate { 1060Sstevel@tonic-gate if ($addr !~ /^-/) 1070Sstevel@tonic-gate { $ret.=$addr; } 1080Sstevel@tonic-gate else { $post=$addr; } 1090Sstevel@tonic-gate } 1100Sstevel@tonic-gate if ($reg2 ne "") 1110Sstevel@tonic-gate { 1120Sstevel@tonic-gate $t=""; 1130Sstevel@tonic-gate $t="*$idx" if ($idx != 0); 1140Sstevel@tonic-gate $reg1="+".$reg1 if ("$reg1$post" ne ""); 1150Sstevel@tonic-gate $ret.="[$reg2$t$reg1$post]"; 1160Sstevel@tonic-gate } 1170Sstevel@tonic-gate else 1180Sstevel@tonic-gate { 1190Sstevel@tonic-gate $ret.="[$reg1$post]" 1200Sstevel@tonic-gate } 1210Sstevel@tonic-gate $ret =~ s/\[\]//; # in case $addr was the only argument 1220Sstevel@tonic-gate return($ret); 1230Sstevel@tonic-gate } 1240Sstevel@tonic-gate 1250Sstevel@tonic-gatesub main'mov { &out2("mov",@_); } 1260Sstevel@tonic-gatesub main'movb { &out2("mov",@_); } 1270Sstevel@tonic-gatesub main'and { &out2("and",@_); } 1280Sstevel@tonic-gatesub main'or { &out2("or",@_); } 1290Sstevel@tonic-gatesub main'shl { &out2("shl",@_); } 1300Sstevel@tonic-gatesub main'shr { &out2("shr",@_); } 1310Sstevel@tonic-gatesub main'xor { &out2("xor",@_); } 1320Sstevel@tonic-gatesub main'xorb { &out2("xor",@_); } 1330Sstevel@tonic-gatesub main'add { &out2("add",@_); } 1340Sstevel@tonic-gatesub main'adc { &out2("adc",@_); } 1350Sstevel@tonic-gatesub main'sub { &out2("sub",@_); } 136*2139Sjp161948sub main'sbb { &out2("sbb",@_); } 1370Sstevel@tonic-gatesub main'rotl { &out2("rol",@_); } 1380Sstevel@tonic-gatesub main'rotr { &out2("ror",@_); } 1390Sstevel@tonic-gatesub main'exch { &out2("xchg",@_); } 1400Sstevel@tonic-gatesub main'cmp { &out2("cmp",@_); } 1410Sstevel@tonic-gatesub main'lea { &out2("lea",@_); } 1420Sstevel@tonic-gatesub main'mul { &out1("mul",@_); } 1430Sstevel@tonic-gatesub main'div { &out1("div",@_); } 1440Sstevel@tonic-gatesub main'dec { &out1("dec",@_); } 1450Sstevel@tonic-gatesub main'inc { &out1("inc",@_); } 1460Sstevel@tonic-gatesub main'jmp { &out1("jmp",@_); } 1470Sstevel@tonic-gatesub main'jmp_ptr { &out1p("jmp",@_); } 1480Sstevel@tonic-gatesub main'je { &out1("je",@_); } 1490Sstevel@tonic-gatesub main'jle { &out1("jle",@_); } 1500Sstevel@tonic-gatesub main'jz { &out1("jz",@_); } 1510Sstevel@tonic-gatesub main'jge { &out1("jge",@_); } 1520Sstevel@tonic-gatesub main'jl { &out1("jl",@_); } 1530Sstevel@tonic-gatesub main'ja { &out1("ja",@_); } 1540Sstevel@tonic-gatesub main'jae { &out1("jae",@_); } 1550Sstevel@tonic-gatesub main'jb { &out1("jb",@_); } 1560Sstevel@tonic-gatesub main'jbe { &out1("jbe",@_); } 1570Sstevel@tonic-gatesub main'jc { &out1("jc",@_); } 1580Sstevel@tonic-gatesub main'jnc { &out1("jnc",@_); } 1590Sstevel@tonic-gatesub main'jnz { &out1("jnz",@_); } 1600Sstevel@tonic-gatesub main'jne { &out1("jne",@_); } 1610Sstevel@tonic-gatesub main'jno { &out1("jno",@_); } 1620Sstevel@tonic-gatesub main'push { &out1("push",@_); $stack+=4; } 1630Sstevel@tonic-gatesub main'pop { &out1("pop",@_); $stack-=4; } 164*2139Sjp161948sub main'pushf { &out0("pushfd"); $stack+=4; } 165*2139Sjp161948sub main'popf { &out0("popfd"); $stack-=4; } 1660Sstevel@tonic-gatesub main'bswap { &out1("bswap",@_); &using486(); } 1670Sstevel@tonic-gatesub main'not { &out1("not",@_); } 1680Sstevel@tonic-gatesub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); } 1690Sstevel@tonic-gatesub main'ret { &out0("ret"); } 1700Sstevel@tonic-gatesub main'nop { &out0("nop"); } 171*2139Sjp161948sub main'test { &out2("test",@_); } 172*2139Sjp161948sub main'bt { &out2("bt",@_); } 173*2139Sjp161948sub main'leave { &out0("leave"); } 174*2139Sjp161948sub main'cpuid { &out0("DW\t0A20Fh"); } 175*2139Sjp161948sub main'rdtsc { &out0("DW\t0310Fh"); } 176*2139Sjp161948sub main'halt { &out0("hlt"); } 177*2139Sjp161948sub main'movz { &out2("movzx",@_); } 178*2139Sjp161948sub main'neg { &out1("neg",@_); } 179*2139Sjp161948sub main'cld { &out0("cld"); } 180*2139Sjp161948 181*2139Sjp161948# SSE2 182*2139Sjp161948sub main'emms { &out0("emms"); } 183*2139Sjp161948sub main'movd { &out2("movd",@_); } 184*2139Sjp161948sub main'movq { &out2("movq",@_); } 185*2139Sjp161948sub main'movdqu { &out2("movdqu",@_); } 186*2139Sjp161948sub main'movdqa { &out2("movdqa",@_); } 187*2139Sjp161948sub main'movdq2q{ &out2("movdq2q",@_); } 188*2139Sjp161948sub main'movq2dq{ &out2("movq2dq",@_); } 189*2139Sjp161948sub main'paddq { &out2("paddq",@_); } 190*2139Sjp161948sub main'pmuludq{ &out2("pmuludq",@_); } 191*2139Sjp161948sub main'psrlq { &out2("psrlq",@_); } 192*2139Sjp161948sub main'psllq { &out2("psllq",@_); } 193*2139Sjp161948sub main'pxor { &out2("pxor",@_); } 194*2139Sjp161948sub main'por { &out2("por",@_); } 195*2139Sjp161948sub main'pand { &out2("pand",@_); } 1960Sstevel@tonic-gate 1970Sstevel@tonic-gatesub out2 1980Sstevel@tonic-gate { 1990Sstevel@tonic-gate local($name,$p1,$p2)=@_; 2000Sstevel@tonic-gate local($l,$t); 2010Sstevel@tonic-gate 2020Sstevel@tonic-gate push(@out,"\t$name\t"); 2030Sstevel@tonic-gate $t=&conv($p1).","; 2040Sstevel@tonic-gate $l=length($t); 2050Sstevel@tonic-gate push(@out,$t); 2060Sstevel@tonic-gate $l=4-($l+9)/8; 2070Sstevel@tonic-gate push(@out,"\t" x $l); 2080Sstevel@tonic-gate push(@out,&conv($p2)); 2090Sstevel@tonic-gate push(@out,"\n"); 2100Sstevel@tonic-gate } 2110Sstevel@tonic-gate 2120Sstevel@tonic-gatesub out0 2130Sstevel@tonic-gate { 2140Sstevel@tonic-gate local($name)=@_; 2150Sstevel@tonic-gate 2160Sstevel@tonic-gate push(@out,"\t$name\n"); 2170Sstevel@tonic-gate } 2180Sstevel@tonic-gate 2190Sstevel@tonic-gatesub out1 2200Sstevel@tonic-gate { 2210Sstevel@tonic-gate local($name,$p1)=@_; 2220Sstevel@tonic-gate local($l,$t); 2230Sstevel@tonic-gate 2240Sstevel@tonic-gate push(@out,"\t$name\t".&conv($p1)."\n"); 2250Sstevel@tonic-gate } 2260Sstevel@tonic-gate 2270Sstevel@tonic-gatesub conv 2280Sstevel@tonic-gate { 2290Sstevel@tonic-gate local($p)=@_; 2300Sstevel@tonic-gate 2310Sstevel@tonic-gate $p =~ s/0x([0-9A-Fa-f]+)/0$1h/; 2320Sstevel@tonic-gate return $p; 2330Sstevel@tonic-gate } 2340Sstevel@tonic-gate 2350Sstevel@tonic-gatesub using486 2360Sstevel@tonic-gate { 2370Sstevel@tonic-gate return if $using486; 2380Sstevel@tonic-gate $using486++; 2390Sstevel@tonic-gate grep(s/\.386/\.486/,@out); 2400Sstevel@tonic-gate } 2410Sstevel@tonic-gate 2420Sstevel@tonic-gatesub main'file 2430Sstevel@tonic-gate { 2440Sstevel@tonic-gate local($file)=@_; 2450Sstevel@tonic-gate 2460Sstevel@tonic-gate local($tmp)=<<"EOF"; 2470Sstevel@tonic-gate TITLE $file.asm 2480Sstevel@tonic-gate .386 2490Sstevel@tonic-gate.model FLAT 2500Sstevel@tonic-gateEOF 2510Sstevel@tonic-gate push(@out,$tmp); 2520Sstevel@tonic-gate } 2530Sstevel@tonic-gate 2540Sstevel@tonic-gatesub main'function_begin 2550Sstevel@tonic-gate { 2560Sstevel@tonic-gate local($func,$extra)=@_; 2570Sstevel@tonic-gate 2580Sstevel@tonic-gate push(@labels,$func); 2590Sstevel@tonic-gate 2600Sstevel@tonic-gate local($tmp)=<<"EOF"; 261*2139Sjp161948_TEXT\$ SEGMENT PAGE 'CODE' 2620Sstevel@tonic-gatePUBLIC _$func 2630Sstevel@tonic-gate$extra 2640Sstevel@tonic-gate_$func PROC NEAR 2650Sstevel@tonic-gate push ebp 2660Sstevel@tonic-gate push ebx 2670Sstevel@tonic-gate push esi 2680Sstevel@tonic-gate push edi 2690Sstevel@tonic-gateEOF 2700Sstevel@tonic-gate push(@out,$tmp); 2710Sstevel@tonic-gate $stack=20; 2720Sstevel@tonic-gate } 2730Sstevel@tonic-gate 2740Sstevel@tonic-gatesub main'function_begin_B 2750Sstevel@tonic-gate { 2760Sstevel@tonic-gate local($func,$extra)=@_; 2770Sstevel@tonic-gate 2780Sstevel@tonic-gate local($tmp)=<<"EOF"; 279*2139Sjp161948_TEXT\$ SEGMENT PAGE 'CODE' 2800Sstevel@tonic-gatePUBLIC _$func 2810Sstevel@tonic-gate$extra 2820Sstevel@tonic-gate_$func PROC NEAR 2830Sstevel@tonic-gateEOF 2840Sstevel@tonic-gate push(@out,$tmp); 2850Sstevel@tonic-gate $stack=4; 2860Sstevel@tonic-gate } 2870Sstevel@tonic-gate 2880Sstevel@tonic-gatesub main'function_end 2890Sstevel@tonic-gate { 2900Sstevel@tonic-gate local($func)=@_; 2910Sstevel@tonic-gate 2920Sstevel@tonic-gate local($tmp)=<<"EOF"; 2930Sstevel@tonic-gate pop edi 2940Sstevel@tonic-gate pop esi 2950Sstevel@tonic-gate pop ebx 2960Sstevel@tonic-gate pop ebp 2970Sstevel@tonic-gate ret 2980Sstevel@tonic-gate_$func ENDP 299*2139Sjp161948_TEXT\$ ENDS 3000Sstevel@tonic-gateEOF 3010Sstevel@tonic-gate push(@out,$tmp); 3020Sstevel@tonic-gate $stack=0; 3030Sstevel@tonic-gate %label=(); 3040Sstevel@tonic-gate } 3050Sstevel@tonic-gate 3060Sstevel@tonic-gatesub main'function_end_B 3070Sstevel@tonic-gate { 3080Sstevel@tonic-gate local($func)=@_; 3090Sstevel@tonic-gate 3100Sstevel@tonic-gate local($tmp)=<<"EOF"; 3110Sstevel@tonic-gate_$func ENDP 312*2139Sjp161948_TEXT\$ ENDS 3130Sstevel@tonic-gateEOF 3140Sstevel@tonic-gate push(@out,$tmp); 3150Sstevel@tonic-gate $stack=0; 3160Sstevel@tonic-gate %label=(); 3170Sstevel@tonic-gate } 3180Sstevel@tonic-gate 3190Sstevel@tonic-gatesub main'function_end_A 3200Sstevel@tonic-gate { 3210Sstevel@tonic-gate local($func)=@_; 3220Sstevel@tonic-gate 3230Sstevel@tonic-gate local($tmp)=<<"EOF"; 3240Sstevel@tonic-gate pop edi 3250Sstevel@tonic-gate pop esi 3260Sstevel@tonic-gate pop ebx 3270Sstevel@tonic-gate pop ebp 3280Sstevel@tonic-gate ret 3290Sstevel@tonic-gateEOF 3300Sstevel@tonic-gate push(@out,$tmp); 3310Sstevel@tonic-gate } 3320Sstevel@tonic-gate 3330Sstevel@tonic-gatesub main'file_end 3340Sstevel@tonic-gate { 335*2139Sjp161948 # try to detect if SSE2 or MMX extensions were used... 336*2139Sjp161948 if (grep {/xmm[0-7]\s*,/i} @out) { 337*2139Sjp161948 grep {s/\.[3-7]86/\.686\n\t\.XMM/} @out; 338*2139Sjp161948 } 339*2139Sjp161948 elsif (grep {/mm[0-7]\s*,/i} @out) { 340*2139Sjp161948 grep {s/\.[3-7]86/\.686\n\t\.MMX/} @out; 341*2139Sjp161948 } 3420Sstevel@tonic-gate push(@out,"END\n"); 3430Sstevel@tonic-gate } 3440Sstevel@tonic-gate 3450Sstevel@tonic-gatesub main'wparam 3460Sstevel@tonic-gate { 3470Sstevel@tonic-gate local($num)=@_; 3480Sstevel@tonic-gate 3490Sstevel@tonic-gate return(&main'DWP($stack+$num*4,"esp","",0)); 3500Sstevel@tonic-gate } 3510Sstevel@tonic-gate 3520Sstevel@tonic-gatesub main'swtmp 3530Sstevel@tonic-gate { 3540Sstevel@tonic-gate return(&main'DWP($_[0]*4,"esp","",0)); 3550Sstevel@tonic-gate } 3560Sstevel@tonic-gate 3570Sstevel@tonic-gate# Should use swtmp, which is above esp. Linix can trash the stack above esp 3580Sstevel@tonic-gate#sub main'wtmp 3590Sstevel@tonic-gate# { 3600Sstevel@tonic-gate# local($num)=@_; 3610Sstevel@tonic-gate# 3620Sstevel@tonic-gate# return(&main'DWP(-(($num+1)*4),"esp","",0)); 3630Sstevel@tonic-gate# } 3640Sstevel@tonic-gate 3650Sstevel@tonic-gatesub main'comment 3660Sstevel@tonic-gate { 3670Sstevel@tonic-gate foreach (@_) 3680Sstevel@tonic-gate { 3690Sstevel@tonic-gate push(@out,"\t; $_\n"); 3700Sstevel@tonic-gate } 3710Sstevel@tonic-gate } 3720Sstevel@tonic-gate 373*2139Sjp161948sub main'public_label 374*2139Sjp161948 { 375*2139Sjp161948 $label{$_[0]}="_$_[0]" if (!defined($label{$_[0]})); 376*2139Sjp161948 push(@out,"PUBLIC\t$label{$_[0]}\n"); 377*2139Sjp161948 } 378*2139Sjp161948 3790Sstevel@tonic-gatesub main'label 3800Sstevel@tonic-gate { 3810Sstevel@tonic-gate if (!defined($label{$_[0]})) 3820Sstevel@tonic-gate { 3830Sstevel@tonic-gate $label{$_[0]}="\$${label}${_[0]}"; 3840Sstevel@tonic-gate $label++; 3850Sstevel@tonic-gate } 3860Sstevel@tonic-gate return($label{$_[0]}); 3870Sstevel@tonic-gate } 3880Sstevel@tonic-gate 3890Sstevel@tonic-gatesub main'set_label 3900Sstevel@tonic-gate { 3910Sstevel@tonic-gate if (!defined($label{$_[0]})) 3920Sstevel@tonic-gate { 3930Sstevel@tonic-gate $label{$_[0]}="\$${label}${_[0]}"; 3940Sstevel@tonic-gate $label++; 3950Sstevel@tonic-gate } 396*2139Sjp161948 if ($_[1]!=0 && $_[1]>1) 397*2139Sjp161948 { 398*2139Sjp161948 main'align($_[1]); 399*2139Sjp161948 } 4000Sstevel@tonic-gate if((defined $_[2]) && ($_[2] == 1)) 4010Sstevel@tonic-gate { 4020Sstevel@tonic-gate push(@out,"$label{$_[0]}::\n"); 4030Sstevel@tonic-gate } 404*2139Sjp161948 elsif ($label{$_[0]} !~ /^\$/) 405*2139Sjp161948 { 406*2139Sjp161948 push(@out,"$label{$_[0]}\tLABEL PTR\n"); 407*2139Sjp161948 } 4080Sstevel@tonic-gate else 4090Sstevel@tonic-gate { 4100Sstevel@tonic-gate push(@out,"$label{$_[0]}:\n"); 4110Sstevel@tonic-gate } 4120Sstevel@tonic-gate } 4130Sstevel@tonic-gate 4140Sstevel@tonic-gatesub main'data_word 4150Sstevel@tonic-gate { 416*2139Sjp161948 push(@out,"\tDD\t".join(',',@_)."\n"); 417*2139Sjp161948 } 418*2139Sjp161948 419*2139Sjp161948sub main'align 420*2139Sjp161948 { 421*2139Sjp161948 push(@out,"\tALIGN\t$_[0]\n"); 4220Sstevel@tonic-gate } 4230Sstevel@tonic-gate 4240Sstevel@tonic-gatesub out1p 4250Sstevel@tonic-gate { 4260Sstevel@tonic-gate local($name,$p1)=@_; 4270Sstevel@tonic-gate local($l,$t); 4280Sstevel@tonic-gate 4290Sstevel@tonic-gate push(@out,"\t$name\t ".&conv($p1)."\n"); 4300Sstevel@tonic-gate } 4310Sstevel@tonic-gate 4320Sstevel@tonic-gatesub main'picmeup 4330Sstevel@tonic-gate { 4340Sstevel@tonic-gate local($dst,$sym)=@_; 4350Sstevel@tonic-gate &main'lea($dst,&main'DWP($sym)); 4360Sstevel@tonic-gate } 4370Sstevel@tonic-gate 4380Sstevel@tonic-gatesub main'blindpop { &out1("pop",@_); } 439*2139Sjp161948 440*2139Sjp161948sub main'initseg 441*2139Sjp161948 { 442*2139Sjp161948 local($f)=@_; 443*2139Sjp161948 local($tmp)=<<___; 444*2139Sjp161948OPTION DOTNAME 445*2139Sjp161948.CRT\$XIU SEGMENT DWORD PUBLIC 'DATA' 446*2139Sjp161948EXTRN _$f:NEAR 447*2139Sjp161948DD _$f 448*2139Sjp161948.CRT\$XIU ENDS 449*2139Sjp161948___ 450*2139Sjp161948 push(@out,$tmp); 451*2139Sjp161948 } 452*2139Sjp161948 453*2139Sjp1619481; 454