Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

clean dos extender executable format (Developers)

posted by tkchia Homepage, 09.01.2023, 11:11

Hello kerravon,

> which are front-ends to INT 21H, AH=F6H, AL=3FH
> and INT 21H, AH=F6H, AL=3BH respectively.
> Any reason why I shouldn't do that?

Some considerations which you will almost certainly need to deal with at some point in time:

(1)
You probably want to decide early on how your a.out application is going to receive the argv[] and envp[] information. This will form part of the ABI "contract" between the OS (+ DOS extender) and applications, and you probably want the ABI to be stable.

The Linux IA-32 ABI places argv[] and envp[] on the stack at program startup, but if you prefer to create extra syscalls to do that, that is possible too. You also need to decide whether to split the command line arguments into separate words (i.e. argv[]) at startup, and how (!) — or to leave the task to the application.

Whichever interface you decide on, try to stick to it.

(2)
The MZ loader stub will likely be needed to run your a.out program(s) precisely in those situations where the OS does not already understand your new proposed syscalls. This means you will need to implement the new "syscalls" inside the DOS extender, for use in your protected mode app.

(CauseWay and DOS/4G both already implement an additional bunch of functions under int 0x21, ah = 0xff.)

Thank you!

---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"

 

Complete thread:

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