Alex Buell wrote:
> On Mon, 17 Mar 2008 23:40:04 GMT, I waved a wand and this message
> magically appears in front of Frank Kotler:
>
>
>>Yeah! Works great! I tried "mov ax, data", and as expected, it
>>eliminates the need for "+ OFFSET". Was this "converted" from a .com
>>file to .exe? In "-f obj" mode, Nasm knows the special symbol
>>"..start" for the entrypoint, and knows it needs to be "global". I
>>was also getting complaints from the linker about no stack segment...
>
>
> I finally figured out the cause of the OFFSETs, here's what I needed to
> do, was to add:
>
> resb 0x100
>
> to the obj file that contained the entry point. Removed all the
> OFFSETS. Problem solved! Thanks - I should have read section 7.2.2 of
> the NASM manual...
Ah! I didn't get that you were using "-f obj" but linking to .com. Yeah,
that makes sense...
>>segment stack stack
>>resw 100h ; should be "enough for anybody" :)
>>
>>will shut *that* up.
>>
>>(the first "stack" is just a name, and could be anything - the second
>>"stack" is crucial... so Nasm knows what to tell the linker)
>
>
> Good idea, I'll add that.
Well... that same section of the manual says you don't need to. Again,
if you're linking to .com, it makes sense. Probably won't do any harm,
but dos *knows* where the stack is in a .com file.
After reading Dirk's post about finding PSP, I thought "oh, oh, that fix
I suggested *isn't* going to work", so I'm glad you figured this one
out. As you can tell, I don't have much experience with assembling to
..obj and linking to .com - I usually did one or the other (mostly .com).
>>I'm using David Lindauer's "val" modification "valx" as a linker (all
>>I've currently got installed on the "real dos" drive). May be
>>different for wlink... That's open Watcom's linker? "Should" work the
>>same with all (16-bit OMF) linkers, but that's probably a fantasy...
>
>
> Yes, that's right, I'm using OpenWatcom's linker - it seems to do the
> job quite well.
I haven't used the OpenWatcom tools much. They were well-liked by users
when it was "commercial", and the "open" guys seem to be doing a good
job keeping it up-to-date. An OpenWatcom compiler running on Linux makes
the Windows binaries of Nasm, I believe...
>>Nice job, Alex. Definitely worth the reboot! :)
>
> And there's a fresh copy of VMODE.ZIP uploaded.
I'll grab it and reboot again... fairly soon...
Best,
Frank


|