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), 05.08.2007, 09:22

> I hacked on the USEDPMI.ASM example (generously discussed in other forum
> :lol3: ) - and got a true flat ZERO-based memory model !!! :surprised:
> With very marginal adjustments only :surprised: What's wrong ? Is the
> statement correct ? Did I miss something ? Where is the limitation
> supposed to come from ?

So please post your adjustments!

the problem is that "near32" addresses (=offsets) in MZ are always relative to the address the binary is loaded to, and this address is never 0 in DOS.

However, due to the way Intel cpus handle "call" and "jmp" opcodes it is possible to set the base of CS, SS, DS, ES to 0 and indeed run "non-flat" code then ... if it avoids certain things. Among these "certain things" is access to global variables, so it won't be a true option usually.

---
MS-DOS forever!

 

Complete thread:

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