I'm implementing a simple 0-terminated string printing function using BIOS interrupt int 10h
.
The procedure is as follows:
dx
, this is the location at which our string startscx
[dx + cx]
. If 0, return, else mov
to al
int 10h
cx
and jump back to point 3The problem is nasm will only let me use bx
as an index register. I believe this restriction's purpose isn't to make someone's life more difficult, so that would imply there's something wrong with my implementation. What is is, how can I overcome it?
In 16-bit mode you have to use BX. E.g. see here:
For 16-bit addressing, the offset value can be in one of the three registers: BX, SI, or DI