without bios
Posted: Wed Sep 12, 2007 6:28 pm
Hello, I know I had already posted something like this, but I can't understand why this isn't working.
;HERE I USE CELDA VARIABLE TO SAVE THE CURRENT MEMORY POSITION, BUT IT DOESN'T WORK
putchar:
push 0b800h
pop es
mov di, [.celda]
mov [es:di], al
inc di
mov byte [es:di], 7
inc di
add word [.celda], 2
ret
.celda:
dw 0
;THIS IS THE SAME BUT FOR STRINGS
putstring:
mov al, [si]
inc si
cmp al, 0
je .end
call putchar
jmp putstring
.end:
ret
;THIS DOESN'T WORK ALSO
getchar:
in al, 96
cmp al, 0
je getchar
ret
Well, I hope you answer soon.
Mati Argentina...
;HERE I USE CELDA VARIABLE TO SAVE THE CURRENT MEMORY POSITION, BUT IT DOESN'T WORK
putchar:
push 0b800h
pop es
mov di, [.celda]
mov [es:di], al
inc di
mov byte [es:di], 7
inc di
add word [.celda], 2
ret
.celda:
dw 0
;THIS IS THE SAME BUT FOR STRINGS
putstring:
mov al, [si]
inc si
cmp al, 0
je .end
call putchar
jmp putstring
.end:
ret
;THIS DOESN'T WORK ALSO
getchar:
in al, 96
cmp al, 0
je getchar
ret
Well, I hope you answer soon.
Mati Argentina...