To ZERO or NOT to ZERO (memory / segment basing) (DOSX)
> Done in above ^^^ code:
>
> - ZEROized model
> - got rid of MZ-fixup
> - probably "fixed" BOCHS crash
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
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
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 ?
It's possible. But there are only 4 hw breakpoints available.
---
MS-DOS forever!
Complete thread:
- To ZERO or NOT to ZERO (memory / segment basing) - DOS386, 05.08.2007, 08:33 (DOSX)
- To ZERO or NOT to ZERO (memory / segment basing) - Japheth, 05.08.2007, 09:22
- To ZERO or NOT to ZERO (memory / segment basing) - DOS386, 05.08.2007, 14:45
- To ZERO or NOT to ZERO (memory / segment basing) - Japheth, 06.08.2007, 07:52
- To ZERO or NOT to ZERO (memory / segment basing) vs C - DOS386, 09.08.2007, 19:12
- To ZERO or NOT to ZERO (memory / segment basing) vs C - Japheth, 10.08.2007, 07:18
- To ZERO or NOT to ZERO (memory / segment basing) vs C - DOS386, 09.08.2007, 19:12
- To ZERO or NOT to ZERO (memory / segment basing) - Japheth, 06.08.2007, 07:52
- To ZERO or NOT to ZERO (memory / segment basing) - DOS386, 05.08.2007, 14:45
- To ZERO or NOT to ZERO (memory / segment basing) - Japheth, 05.08.2007, 09:22