new file - keyboard.asm
This commit is contained in:
8
Makefile
8
Makefile
@@ -15,8 +15,16 @@ baremetal_gamarjoba: baremetal_gamarjoba.asm include.c
|
|||||||
run_baremetal_gamarjoba: baremetal_gamarjoba
|
run_baremetal_gamarjoba: baremetal_gamarjoba
|
||||||
qemu-system-i386 -kernel 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
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f gamarjoba
|
rm -f gamarjoba
|
||||||
rm -f baremetal_gamarjoba
|
rm -f baremetal_gamarjoba
|
||||||
|
rm -f keyboard
|
||||||
|
|||||||
26
keyboard.asm
Normal file
26
keyboard.asm
Normal 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"
|
||||||
Reference in New Issue
Block a user