|
From: Alexei A. F. <ale...@ma...> - 2004-04-18 22:14:16
|
You never get that message most probably because you do 32-bit coding and because of that you don't specify additional attributes such as "PUBLIC CLASS=CODE USE16". If you take the original file int86xa.asm I sent to nasmdevel and move STRUC declarations after SEGMENT declaration, you'll have this message too at compile time. Alex ----- Original Message ----- From: "ifconfig" <nsl...@ho...> To: "'Alexei A. Frounze'" <ale...@ma...>; "'nasm'" <nas...@li...> Sent: Sunday, April 18, 2004 10:05 PM Subject: RE: [Nasm-devel] NASM prob > Actually, Struc does exactly that equ thing. Except it uses a different > method (not equ), because it needs to count the bytes. It could be done > otherwise, I guess, but not as simply, and it would require using things > other than ResB and its friends (more Struc macros). This way it does work. > It is an odd message you are getting though - I use Strucs quite a bit and I > never got such a message - could you elaborate, and maybe paste the message? > > > Yours truly, > > ifconfig > > BAGOS > > http://bagos.sourceforge.net > > -----Original Message----- > From: nas...@li... > [mailto:nas...@li...] On Behalf Of Alexei A. > Frounze > Sent: Sunday, April 18, 2004 6:38 PM > To: nasm > Subject: Re: [Nasm-devel] NASM prob > > Thanks, > > moving the thing into the code segment makes nasm to issue warnings about > attempting to change segment/section attributes, which isn't better. > > The simplest workaround was throwing STRUC away and using EQU like this: > > ;struct WORDREGS { > ; unsigned int ax, bx, cx, dx, si, di, cflag, flags; > ;}; > WORDREGS.ax equ 0 > WORDREGS.bx equ 2 > WORDREGS.cx equ 4 > WORDREGS.dx equ 6 > WORDREGS.si equ 8 > WORDREGS.di equ 10 > WORDREGS.cflag equ 12 > WORDREGS.flags equ 14 > > and this: > > int86xLocals.Vector equ 0 > int86xLocals.Code equ 4 > int86xLocals_size equ 14 > > No other code change needed... > > Now, I wonder, why STRUC while being a very simple hack around absence of > support for structures, can't do just the same kind of thing as EQU above > does? > > Alex > > ----- Original Message ----- > From: "ifconfig" <nsl...@ho...> > To: "'Alexei A. Frounze'" <ale...@ma...>; "'nasm'" > <nas...@li...> > Sent: Saturday, April 17, 2004 9:22 PM > Subject: RE: [Nasm-devel] NASM prob > > > > I think it's because of the STRUCs you are using. When you use a STRUC, > nasm > > uses an ABSOLUTE command to jump to a different location (ABSOLUTE 0, I > > believe), and then does a __SEGMENT__ to go back to the previous segment. > > Since the default segment is text, this creates that segment. Try putting > > the STRUCs in the segment and see if this works. > > > > > > > > Yours truly, > > > > ifconfig > > > > BAGOS > > > > http://bagos.sourceforge.net > > > > -----Original Message----- > > From: nas...@li... > > [mailto:nas...@li...] On Behalf Of Alexei A. > > Frounze > > Sent: Saturday, April 17, 2004 7:20 PM > > To: nasm > > Subject: [Nasm-devel] NASM prob > > > > Hi all, > > > > some intermediate version of nasm 0.98.36 (the one on my disk, and it may > > differ from what's on the net) generates some weird "text" segment/section > > which is not in the source file (the source has only _TEXT). I'm compiling > > to intel OMF with -f obj command line option. I'm attaching the source > code. > > > > Just checked, same happens with the following taken from SF: > > nasm-0.98.35-djgpp.zip > > nasm-0.98.36-djgpp.zip > > nasm-0.98.37-djgpp.zip > > nasm-0.98.38-djgpp.zip > > nasm-0.98.38-win32.zip > > nasm98bd.zip > > So, it seems to be an old "stable" bug. :) > > > > > > I found this when looking at the linker (TLINK) map file output: > > ----------8<--------- > > Start Stop Length Name Class > > > > 00000H 016EDH 016EEH _TEXT CODE > > 016EEH 0172BH 0003EH _DATA DATA > > 0172CH 01741H 00016H _BSS DATA > > 01742H 017C1H 00080H _STACK STACK > > 017C2H 017C2H 00000H text > > > > > > Detailed map of segments > > > > 0000:0000 009B C=CODE S=_TEXT G=(none) M=test.c ACBP=28 > > 0000:009B 0017 C=CODE S=_TEXT G=(none) M=c0s.asm ACBP=28 > > 0000:00B2 00B3 C=CODE S=_TEXT G=(none) M=H_LDIV ACBP=28 > > 0000:0165 0023 C=CODE S=_TEXT G=(none) M=INT86 ACBP=28 > > 0000:0188 00AD C=CODE S=_TEXT G=(none) M=INT86XA ACBP=28 > > 0000:0235 0030 C=CODE S=_TEXT G=(none) M=CLRSCRA ACBP=28 > > 0000:0265 001F C=CODE S=_TEXT G=(none) M=GOTOXYA ACBP=28 > > 0000:0284 0038 C=CODE S=_TEXT G=(none) M=PUTCHA ACBP=28 > > 0000:02BC 0000 C=CODE S=_TEXT G=(none) M=CONIO ACBP=28 > > 0000:02BC 0032 C=CODE S=_TEXT G=(none) M=TXTATTRA ACBP=28 > > 0000:02EE 0061 C=CODE S=_TEXT G=(none) M=PRINTF ACBP=28 > > 0000:034F 139F C=CODE S=_TEXT G=(none) M=SNPRINTF ACBP=28 > > 016E:000E 003B C=DATA S=_DATA G=DGROUP M=test.c ACBP=48 > > 016E:0049 0000 C=DATA S=_DATA G=DGROUP M=c0s.asm ACBP=28 > > 016E:004A 0000 C=DATA S=_DATA G=DGROUP M=INT86 ACBP=48 > > 016E:004A 0002 C=DATA S=_DATA G=DGROUP M=CONIO ACBP=48 > > 016E:004C 0000 C=DATA S=_DATA G=DGROUP M=PRINTF ACBP=48 > > 016E:004C 0000 C=DATA S=_DATA G=DGROUP M=SNPRINTF ACBP=48 > > 016E:004C 0000 C=DATA S=_BSS G=DGROUP M=c0s.asm ACBP=28 > > 016E:004C 0016 C=BSS S=_BSS G=DGROUP M=test.c ACBP=48 > > 0174:0002 0080 C=STACK S=_STACK G=(none) M=c0s.asm ACBP=34 > > 017C:0002 0000 C= S=text G=(none) M=INT86XA ACBP=28 > > ----------8<--------- > > > > It's with this int86xa.asm (last) file. When compiling it I get the "text" > > section. I can see this with a virewer inside .obj output file as well. > > > > If I compile another file, say ioport.asm (also attached), no extra text > > section appears. > > > > Always compiling as: nasm file.asm -f obj. Run under windows 2000. Didn't > > check with DOS. > > > > Thanks > > Alex > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Nasm-devel mailing list > Nas...@li... > https://lists.sourceforge.net/lists/listinfo/nasm-devel > |