From: Dave Bird Newsgroups: comp.os.msdos.djgpp Subject: I just wanted to assemble this old program under NASM.... Date: Tue, 23 Feb 1999 18:12:35 +0000 Organization: very little Message-ID: References: NNTP-Posting-Host: xemu.demon.co.uk X-NNTP-Posting-Host: xemu.demon.co.uk:158.152.196.209 X-Trace: news.demon.co.uk 919794041 nnrp-06:4238 NO-IDENT xemu.demon.co.uk:158.152.196.209 X-Complaints-To: abuse AT demon DOT net MIME-Version: 1.0 X-Newsreader: Turnpike (32) Version 4.01 Lines: 265 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I just wanted to assemble this old program under NASM.... ....link it with LD, and debug it with GDB. It's a program pre-amble to set up 16bit "unreal mode", i.e. it goes into protected mode long enough to put a 4GB limit value on FS/GS then keeps that limit on return to real mode. It then sets up some XMS memory allocation pointed to by [FS:EBX] for the main part of the program. I put line-numbers on the lines of assembler manually. I fixed a lot of the usual conversion hassles concerning OFFSET, PTR and square-bracket usage. I still get some errors I can't fix; chiefly that I don't understand how to set up @STACK and @DATA if not the MASM way and if without a .STACK n directive (and how do I set START if not with END START?). But mostly it carps on about not supporting non-32bit-relocations. Does this mean I can't assemble and debug such a program under DJGPP at all :-< ?? Here is the program, only 150 lines in all, as MIME: [please set margin to 7ins before reading] [ Section: 1/1 File: Xx1.s UUencoded by: Turnpike Version 4.01 ] begin 644 Xx1.s M.U@@("`@("`@4$%'12`@.3`L,3,R("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@.S`P,0T*("`@("`@("`@1$]34T5'("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`P,@T*.U@@ M("`@("`N34]$14P@:'5G92`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@.S`P,PT*("`@("`@("`N-#@V<"`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`P-`T*("`@("`@ M("`@0DE44R`@,38@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@.S`P-2T-"DY35$%#2R`@($5152`@(#@Q.3(@("`@.R!4:&ES M(&-O9&4@;75S="!B92!R=6X@:6X@(G)A=R(@1$]3(#LP,#8-"CM8("`@("`@ M+E-404-+($Y35$%#2R`@.R!;=6XM77)E86P@;6]D92P@:2YE+D93/4=3/69L M870@-$="+CLP,#<-"B`@("`@("`@+D1!5$$@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP,#@-"B5I9&5F:6YE($]& M1E-%5"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@(#LP,#D-"B5I9&5F:6YE(%!44B`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@(#LP,3`M+0T*2T)Y=&4@("`@97%U M("`@(#$P,C0@("`@("`@("`[($MI;&]B>71E("`@("`@("`@("`@("`@("`@ M("`@.S`Q,0T*34)Y=&4@("`@97%U("`@($M">71E*DM">71E("`[($UE9V%B M>71E("`@("`@("`@("`@("`@("`@("`@.S`Q,@T*6$U3:7IE("`@97%U("`@ M(#(J34)Y=&4@("`@("`[(&%S:R!F;W(@,B!-0GET97,@("`@("`@("`@("`@ M.S`Q,PT*6$U&=6YC("`@9&0@("`@(#`@("`@("`@("`@("`[('-T;W)E(%A- M4R!F=6YC=&EO;B!A9&1R97-S("`@.S`Q-`T*6$U(86YD;&4 AT 9'<@("`@(#`@ M("`@("`@("`@("`[('-T;W)E(%A-4R!B;&]C:R!H86YD;&4@("`@("`@.S`Q M-2T-"EA-0F%S92`@(&1D("`@("`P("`@("`@("`@("`@.R!S=&]R92!832U" M;&]C:R!B87-E("`@("`@("`@(#LP,38-"EA-3F5X="`@(&1D("`@("`P("`@ M("`@("`@("`@.R!S=&]R92!832U";&]C:R!N97AT9G)E92`@("`@(#LP,3<- M"EA-5&]P("`@(&1D("`@("`P("`@("`@("`@("`@.R!S=&]R92!832U";&]C M:R!T;W`@("`@("`@("`@(#LP,3@-"CL@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP,3D-"DU? M2&5L;&\@(&1B("`@("`G*TAE;&QO5V]R;&0K("`@(""Q`"`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@(#LP,CD-"B`@("`@("`@(&UO=B`@ M("!S<"Q.4U1!0TL@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M(#LP,S`M+0T*("`@("`@("`@;6]V("`@(&%X+$!D871A("`@("`@("`["QO M9F9S970 AT 35].;UA-4R`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP,S8- M"B`@("`@("`@(&-M<"`@("!A;"PX,$@@("`@("`@("`@.RAI9B!N;W0@=&AE M;B!F:6YIB`@("!N96%R($=O M;F4@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP,S@-"B`@ M("`@("`@(&EN="`@("`R1D@@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@(#LP-#`M+0T*("`@("`@("`@;6]V("`@('=O"`@("`@("`@("`@("`@("`@("`@("`@.S`T,0T*("`@ M("`@("`@;6]V("`@('=OF4O M2T)Y=&4I("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`T,PT*("`@("`@ M("`@;6]V("`@(&%H+#`Y2"`@("`@("`@("`[(&%L;&]C871E(&UE;6]R>2$@ M("`@("`@("`@.S`T-`T*("`@("`@("`@8V%L;"`@(%M8349U;F-=("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`T-2T-"B`@("`@("`@ M(&UO=B`@("!;6$U(86YD;&5=+&1X("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@(#LP-#8-"B`@("`@("`@(&UO=B`@("!D>"QO9F9S970 AT 35].;U)O M;VT@("`@("`@("`@("`@("`@("`@("`@("`@(#LP-#<-"B`@("`@("`@(&-M M<"`@("!A>"PQ("`@("`@("`@("`@.RAI9B!F86EL('1H96X@<75I="D@("`@ M("`@(#LP-#@-"B`@("`@("`@(&IN>B`@("!N96%R($=O;F4@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@(#LP-#D-"B`@("`@("`@(&UO=B`@ M("!D>"Q;6$U(86YD;&5=("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M(#LP-3`M+0T*("`@("`@("`@;6]V("`@(&%H+#!#2"`@("`@("`@("`[;&]C M:R!I;B!P;&%C92$@("`@("`@("`@("`@.S`U,0T*("`@("`@("`@8V%L;"`@ M(%M8349U;F-=("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M.S`U,@T*("`@("`@("`@;6]V("`@('=O"`@ M("`@("`@("`@("`@("`@("`@("`@.S`U,PT*("`@("`@("`@;6]V("`@('=O M"`@("`@("`@("`@("`@("`@("`@("`@.S`U M-`T*("`@("`@("`@;6]V("`@(&1X+&]F9G-E="!-7TYO3&]C:R`@("`@("`@ M("`@("`@("`@("`@("`@("`@.S`U-2T-"B`@("`@("`@(&-M<"`@("!A>"PQ M("`@("`@("`@("`@.RAI9B!F86EL('1H96X@<75I="D@("`@("`@(#LP-38- M"B`@("`@("`@(&IN>B`@("!';VYE("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@(#LP-3<-"B`@("`@("`@(&UO=B`@("!A:"PP-4@@ M("`@("`@("`@.T5N86)L92!!,C`A("`@("`@("`@("`@("`@(#LP-3@-"B`@ M("`@("`@(&-A;&P@("!;6$U&=6YC72`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@(#LP-3D-"B`@("`@("`@(&UO=B`@("!D>"QO9F9S970@ M35].;T$R,"`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP-C`M+0T*("`@ M("`@("`@8VUP("`@(&%X+#$@("`@("`@("`@("`[*&EF(&9A:6P@=&AE;B!Q M=6ET*2`@("`@("`@.S`V,0T*("`@("`@("`@:FYZ("`@($=O;F4@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`V,@T*("`@("`@ M("`@;6]V("`@(&5A>"Q;6$U"87-E72`@("`[4V5T("=.15A4)R!A;F0@)U1/ M4"<@("`@("`@.S`V,PT*("`@("`@("`@;6]V("`@(%M834YE>'1=+&5A>"`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.S`V-`T*("`@("`@("`@ M861D("`@(&5A>"Q835-I>F4@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@.S`V-2T-"B`@("`@("`@(&UO=B`@("!;6$U4;W!=+&5A>"`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`@(#LP-C8-"B`@("`@("`@('!U M#H@(&UO=B`@("!D>"QO9F9S970 AT 35]1=6ET.R)N M;W)M86P@=&5R;6EN871I;VXB("`@("`@(#LP.#<-"D=O;F4Z("`@(&UO=B`@ M("!A:"PP.4@@("`@("`@("`@.R!P"PT0S`P2"`@("`@("`@.R!35$]0("`@("`@("`@("`@("`@("`@("`@(#LP M.3`M+0T*("`@("`@("`@:6YT("`@(#(Q2"`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@.S`Y,0T*("`@("`@("`@"`@96)X+&)X("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`@("`@("`@("`[,3`S#0H@("`@("`@("!A9&0@ M("`@96%X+&5B>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`[,3`T#0H@("`@("`@("!M;W8@("`@=V]R9%MR969'1%0K,%TL,38@("`[ M(&9I71E"PP.&@@ M("`@("`@("`@("`@("`@(#L AT 3&]A9"!B>"!T;R!P;VEN="!T;R!'1%0 AT 96YT M"`[(#PM+2TM+2TM+2TM+2T[(2!42$4 AT 4UE35$5-($E-345$24%414Q9 M(%)%0D]/5%,@2$5212$Q,3,@("`@("`@#0H@("`@("`@("!J;7`@4%]%3D%" M3$5$("`@("`@("`@("`@("`[+R]#;&5A&5C=71I;VYP:7!E("`[,3$T M#0H@("`@("!07T5.04),140Z("`@("`@("`@("`@("`@("`@("`@("`@("`@ M("`@("`@("`@("`@("`@("`[,3$U+0T*("`@("`@("`@;6]V(&9S+&)X("`@ M("`@("`@("`@("`@("`@.R\O3&]A9"!S96=M96YT('-H861O=RUR96=I"`@("`@("`@("`@("`@ M("`@(#LO+W=I=&@@1T14(&5N=')Y(#$@*#1'0B!S96=M96YT(&QI;6ET*3LW M#0H@("`@("`@("!A;F0 AT 86PL,$9%:"`@("`@("`@("`@("`@("`[+R]3=VET M8V@@8F%C:R!T;R!R96%L+6UO9&4@=VET:&]U="`@.S$Q.`T*("`@("`@("`@ M;6]V(&-R,"QE87@@("`@("`@("`@("`@("`@.R\O