My goal is to allocate at least 64KB conventional memory from DOS to use with my program and for me to try to achieve that I'm writing my own TSR since Int 21h function 48h (allocate memory) doesn't give me much despite dos reporting 500+KB free.
I'm using nasm and writing code as follows to follow the DOS COM format:
org 100h
mov SI,80h
lodsb
;result in AL
Documents everywhere state that offset 80h in the DOS program segment prefix will reveal the number of bytes used on the command line after the program name but this does not seem to be the case because AL never returns the correct value.
What could I be doing wrong here?