Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Where is paramstr(0) hide ? (Developers)

posted by tkchia Homepage, 26.12.2020, 07:22

Hello ecm,

> I believe it is at the end of the environment block, after the double-zero
> that marks the end of the variables stored in the block.

Indeed --- according to the all-knowing RBIL: :-D
Format of environment block:
Offset  Size    Description     (Table 01379)
 00h  N BYTEs   first environment variable, ASCIZ string of form "var=value"
      N BYTEs   second environment variable, ASCIZ string
        ...
      N BYTEs   last environment variable, ASCIZ string of form "var=value"
        BYTE    00h
---DOS 3.0+ ---
        WORD    number of strings following environment (normally 1)
      N BYTEs   ASCIZ full pathname of program owning this environment
                other strings may follow

(This is under the entry for int 0x21, ah = 0x26.)

I wonder if there is a way to get the program name for DOS versions before 3.0.

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, 270 users online (0 registered, 270 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum