output function problem
Posted: Fri Feb 08, 2008 6:54 pm
I use the following code for output:
It loads a character form the si registry into al and the prints it to the screen, it assembles without any error or warnings, but when i run it on vmware, it just restarts.
Can anybody tell me what is the cause of this error? (I am in protected mode by the way)
Thanks in advance,
Jules
Code: Select all
PutStr_32:
xor ax, ax
mov ds, ax
mov eax, screen_pos
.nextchar
lodsb
or al,al
jz .return
mov byte [ds:eax], al
inc eax
mov byte [ds:eax], 1Bh
jmp .nextchar
.return
mov [screen_pos], eax
ret
;data
screen_pos dd 0
Can anybody tell me what is the cause of this error? (I am in protected mode by the way)
Thanks in advance,
Jules