Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

To ZERO or NOT to ZERO (memory / segment basing) (DOSX)

posted by Japheth Homepage, Germany (South), 06.08.2007, 07:52

> Done in above ^^^ code:
>
> - ZEROized model
> - got rid of MZ-fixup :yes:
> - probably "fixed" BOCHS crash :surprised:

Ok, absolute addresses aren't used, so it works.

> IIRC FASM doesn't suffer from offsets ;-)

But that's not an assembler specific issue at all. "Offsets" are addresses, and both MASM and FASM use addresses.

> > in MZ are always relative to the address the binary is loaded to,
> > and this address is never 0 in DOS.
>
> Very true, but don't see the problem :confused:

Because the MZ format doesn't add a "base" (preferred load address) to the offsets, like PE and LE usually do. So MZ is slightly comparable to PE/LE with a load address of 0.

> Depends how one implements the global variables :-P

Yes, but you cannot control that if you use C or another HLL.

> Question: is it possible / good idea to place a breakpoint at bottom of
> the stack with INT $31/$0B00 ? :hungry:

It's possible. But there are only 4 hw breakpoints available.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 92 users online (1 registered, 91 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum