Sync push

This commit is contained in:
Sylar 2025-04-07 11:20:09 +02:00
parent dcbf3cce66
commit 0e25847a69
4 changed files with 20 additions and 3 deletions

Binary file not shown.

View file

@ -12,6 +12,7 @@
.data
$textCell <Text16VModeCell>
$test_str "Hello DragonOS! :)"
$cursor_x:1
## =========================================================================================================================
@ -28,6 +29,8 @@ _kernel0_main:
push 1
call $_print_string
mov [$cursor_x], 0
## Init Keyboard driver
push $_key_pressed ## KeyPressed handler address passed to the _init_keyboard subroutine
push 1
@ -47,16 +50,29 @@ _key_pressed:
## debug_break
mov R1, [Keyboard_Registers.KEYCODE]
mov ACC, 13 ## Enter
jeq $_key_pressed_enter, R1
mov ACC, ASCII.LOWERCASE_A
jls $_key_pressed_end, R1
mov ACC, ASCII.LOWERCASE_Z
jgr $_key_pressed_end, R1
push R1
push 10
push 10
mov R2, [$cursor_x]
push R2
push 1
push DefaultPalette.Red
push 4
call $_print_char
inc R2
mov [$cursor_x], R2
jmp $_key_pressed_end
_key_pressed_enter:
mov [$cursor_x], 0
mov R10, 0x25
int 0x30
jmp $_key_pressed_end
_key_pressed_end:
ret

View file

@ -154,6 +154,7 @@
0x22: Print String in Text16 Colors Mode (String address stored in R8, Cell address stored in R9)
0x23: Print Integer in Text16 Colors Mode (Integer stored in R8, Cell address stored in R9)
0x24: Clear Screen in Text16 Colors Mode (Cell address stored in R9)
0x25: Scroll in Text16 Colors Mode
0xE0: Refresh Screen
0xE1: Clear Screen

View file

@ -8,7 +8,7 @@ cd ..
cp ../extra/dss/DragonOS/* ./dss/DragonOS/
printf "\n${green}1) kernel0.dss\n${clear}"
./dasm dss/DragonOS/kernel0.dss -o dragon/kernel0.bin -D
./dasm dss/DragonOS/kernel0.dss -o dragon/kernel0.bin -D --verbose
./dtools load-binary dragon/disk1.dr dragon/kernel0.bin 0x00018000
printf "\n"