Echo Nr to screen...
Posted: Sat Jul 12, 2003 9:03 am
This is a function I wrote in nasm for my OS, but it does not work... I get an error on the div 0Ah line saying I used the wrong opcode... what is wrong??! I think I used the right syntax.
echonr: ; This will echo ax's numreric value to the screen
div 0Ah
mov bl, al
mov al, ah
mov ah, 0Eh
mov bh, 0
mov cx, 1
int 10h
mov ax, bl
cmp ax,0
jne echonr
ret
echonr: ; This will echo ax's numreric value to the screen
div 0Ah
mov bl, al
mov al, ah
mov ah, 0Eh
mov bh, 0
mov cx, 1
int 10h
mov ax, bl
cmp ax,0
jne echonr
ret