by ataylor284_ · 4y ago · 0 comments
However, I always ended my programs with INT 20 instead of RET, or INT 21 with AH = 0. RET worked both for standalone programs or in debug, but there was one exception: if you ran your code repeatedly in debug with G 100. It would work the first time, but IIRC the stack wasn't reinitialized to return to the correct place on subsequent G commands. I spent a lot of time typing, running and patching in a single session and INT 20 always worked correctly.
That would exit the program with AL being the exit value. I'm not aware of AH = 0?
Sadly, I used to write these kinds of programs with a hex editor, so "B4 4C CD 21" is etched into my brain even though "CD 20" was shorter.