Where is paramstr(0) hide ? (Developers)
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:
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:
- Where is paramstr(0) hide ? - DosWorld, 25.12.2020, 22:39 (Developers)
- Where is paramstr(0) hide ? - ecm, 25.12.2020, 22:51
- Where is paramstr(0) hide ? - Laaca, 26.12.2020, 00:10
- Where is paramstr(0) hide ? - tkchia, 26.12.2020, 07:22
- Where is paramstr(0) hide ? - DosWorld, 29.12.2020, 00:41
- Where is paramstr(0) hide ? - ecm, 25.12.2020, 22:51