Weird Characters....
Posted: Sat Jun 18, 2011 11:16 pm
When I boot my kernel/bootloader (currently only doing input/output), it loads, but when I type letters, I get keys from the extended ascii set and a few of the letters from the normal ascii set. I don't know what I'm doing wrong. Here is my code:
I'm using NASM 2.09.08 on Windows 7
I am compiling it with
I have had it print strings with the same compile code.
I think it has to do with the keymap.
Each input character becomes 2 different characters.
Thanks!
- ChosenOreo
Code: Select all
; main_oldest.asm -- Main Kernel/Boot File... For now...
; WiseMen OS version 0.00.01
; View the page at https://sourceforge.net/projects/wisemen/
[BITS 16]
org 0x7c00
CLI
XOR AX, AX
PUSH AX
POP DS
MOV WORD[DS:(9*4) ], keyboard_handler
MOV WORD[DS:(9*4)+2], 0
STI
JMP $
bios.writechar:
PUSHA
MOV ah, 0x0E
INT 0x10
POPA
keyboard_handler:
PUSHA
.spin:
IN al, 0x64
AND AL, 0x01
JZ .spin
IN AL, 0x60
CALL bios.writechar
MOV AL, 0x20
OUT 0x20, AL
POPA
IRET
TIMES 510 - ($ - $$) db 0
dw 0xAA55
I am compiling it with
Code: Select all
nasm main_oldest.asm -f bin -o boot.img
I think it has to do with the keymap.
Each input character becomes 2 different characters.
Thanks!
- ChosenOreo