Skip to content

Commit

Permalink
Fixed the double output from keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Feb 1, 2011
1 parent c10c855 commit f4be0df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Binary file modified kernel.bin
Binary file not shown.
10 changes: 1 addition & 9 deletions keyboard.asm
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ kb_handler: ; not a dummy function :3
mov bx, kbdus ; Set up for the xlat
.convert: ; Convert to ascii here
xlat ; Exchange the scancode for its ascii interpretation
mov ah, 0x0E ; Using the teletype function in BIOS
cmp al, 10 ; See if its enter
jne .print ; If it is, we need a bit more to our output
mov bl, al ; Temp spot here
mov al, 13 ; Carraige return
int 0x10 ; Write it
mov al, bl ; Put our original charecter back
.print: ; Printing sub routine
int 0x10 ; Print dat char
mov bx, key_buff ; Move the key buffer to bx
xor cx, cx ; Make it zero!
mov cl, byte [last_key] ; Stuff goes here...
Expand Down Expand Up @@ -182,6 +173,7 @@ getchar: ; Input nothing, Output al = c
rep movsb ; mov a byte from si to di until cx = 0
dec byte [last_key] ; Decrement the number of keys by one
mov al, byte [wait_key] ; Put our kye here
mov ah, 0x0E ; Using the teletype function in BIOS
cmp al, 10 ; See if its enter
jne .print ; If it is, we need a bit more to our output
mov bl, al ; Temp spot here
Expand Down

0 comments on commit f4be0df

Please sign in to comment.