test.asm
program_intialization:
org 0x7C00
mov bp,0x7C00
program_start:
mov ax,0x0013
int 0x10
mov ax,0x0002
int 0x10
mov al,0x41
call output
call input
library:
%include "io.asm"
times 510-($-$$) db 0
dw 0xaa55
program_end:
jmp $
io.asm (1)
input:
call intialize
mov ah,0x00 ;reading keyboard code
int 0x16
cmp al,0x0D
je end ;call bios to read it
mov ah,0x0E
mov bl,0x000F
int 0x10
jmp input
output:
call intialize
mov ah,0x0E
int 0x10
jmp end
intialize:
push ax
push bx
ret
end:
pop bx
pop ax
ret
io.asm (2)
input:
push ax
push bx
mov ah,0x00 ;reading keyboard code
int 0x16
cmp al,0x0D
je end ;call bios to read it
mov ah,0x0E
mov bl,0x000F
int 0x10
jmp input
output:
push ax
push bx
mov ah,0x0E
int 0x10
jmp end
end:
pop bx
pop ax
ret
in case of io.asm (1) :
- in
qemuthe screen blinks blue lines and doesn't output nor input - in
bochsit doesn't output and while input it gives this error : internal keyboard buffer full , ignoring scan code (the scan code)
in case of io.asm (2) :
- it works fine .
so :
- what is the difference between
io.asm(1) &io.asm(2) - why this error happens
- what is the solution