Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

startup rules (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 25.11.2022, 08:30

> When an MSDOS .exe or .com starts, I believe it is normal for it to free
> memory not in use.

True MZ executables (with the MZ header) can actually specify min alloc and max alloc in their MZ header; DOS will not allocate more memory than specified by the executable image size plus max alloc.

> I can implement an INT 21H extension (I have a bunch of them, under
> AH=F6h), and I believe MSDOS is designed to set the carry flag if it gets
> an INT 21H for a function that it doesn't recognize.

Actually, high functions (including service 71h subfunctions on many versions of DOS) will not set CY to indicate an unsupported function. Instead, they will set al to zero and leave CF unchanged. You can handle this case with an explicit stc before the int 21h in order to make sure you get CY if unsupported.

---
l

 

Complete thread:

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