4 ms·
You can cheat a little bit and use RET rather than INT 21h to save a few bytes. The way this works is pretty clever - the COM loader places an INT 20h instruct
by drv 13y ago
You can cheat a little bit and use RET rather than INT 21h to save a few bytes.
The way this works is pretty clever - the COM loader places an INT 20h instruction (the old-style terminate function) at offset 0 in the PSP (the 100h-byte-long structure loaded right before the contents of the COM file). The loader also sets up the word above the initial stack pointer to 0 so that a RET will return to address 0 and execute the INT 20h.
- adestefan 13y agoAnd the RET saves you one byte over the INT 20h. Oh what a different world we live in now.