It's not usually a good idea to:
- Assume that all registers are preserved across interrupt calls (or any calls, really); or
- Not set up all the required registers for a given call.
On that first note, I would set ah
to 0eh
immediately before the int 10
.
Int 10h/0eh
requires the bh
and bl
be set to the page number and foreground color respectively. I would also do that immediately before the int 10
to ensure they're set correctly for the call.
As an aside, you need to ensure that the ds
segment register is correct, with something like:
push cs
pop ds
since it looks like you're putting the string into your code segment. However, since the lodsb
version apparently works, I assume you've got that covered.
And, from (admittedly faded) memory, 8086 has an inc si
instruction that might save a small amount of space, not that it matters that much anymore but I was forged in a time when every byte counted :-)