new file - keyboard.asm

This commit is contained in:
greg
2015-09-18 02:28:34 -07:00
parent c4268d818a
commit f4de677406
2 changed files with 34 additions and 0 deletions

View File

@@ -15,8 +15,16 @@ baremetal_gamarjoba: baremetal_gamarjoba.asm include.c
run_baremetal_gamarjoba: baremetal_gamarjoba
qemu-system-i386 -kernel baremetal_gamarjoba
keyboard: keyboard.asm
nasm -f elf32 keyboard.asm
ld -m elf_i386 -nostdlib -T linker.ld keyboard.o -o keyboard
run_keyboard: keyboard
qemu-system-i386 -kernel keyboard
.PHONY: clean
clean:
rm -f *.o
rm -f gamarjoba
rm -f baremetal_gamarjoba
rm -f keyboard

26
keyboard.asm Normal file
View File

@@ -0,0 +1,26 @@
%include "multiboot_header.asm"
%include "x86_vram.asm"
section .bss
stack resb 0x1000
section .data
section .text
global boot:
mov esp, stack + 0x1000
xor ebp, ebp
jmp main
main:
push word BG.BLACK | ' '
call clear
add esp, 2
halt:
hlt
jmp halt
%include "x86_vram_functions.asm"