Sync push
This commit is contained in:
parent
dcbf3cce66
commit
0e25847a69
4 changed files with 20 additions and 3 deletions
Binary file not shown.
|
|
@ -12,6 +12,7 @@
|
||||||
.data
|
.data
|
||||||
$textCell <Text16VModeCell>
|
$textCell <Text16VModeCell>
|
||||||
$test_str "Hello DragonOS! :)"
|
$test_str "Hello DragonOS! :)"
|
||||||
|
$cursor_x:1
|
||||||
|
|
||||||
## =========================================================================================================================
|
## =========================================================================================================================
|
||||||
|
|
||||||
|
|
@ -28,6 +29,8 @@ _kernel0_main:
|
||||||
push 1
|
push 1
|
||||||
call $_print_string
|
call $_print_string
|
||||||
|
|
||||||
|
mov [$cursor_x], 0
|
||||||
|
|
||||||
## Init Keyboard driver
|
## Init Keyboard driver
|
||||||
push $_key_pressed ## KeyPressed handler address passed to the _init_keyboard subroutine
|
push $_key_pressed ## KeyPressed handler address passed to the _init_keyboard subroutine
|
||||||
push 1
|
push 1
|
||||||
|
|
@ -47,16 +50,29 @@ _key_pressed:
|
||||||
## debug_break
|
## debug_break
|
||||||
mov R1, [Keyboard_Registers.KEYCODE]
|
mov R1, [Keyboard_Registers.KEYCODE]
|
||||||
|
|
||||||
|
mov ACC, 13 ## Enter
|
||||||
|
jeq $_key_pressed_enter, R1
|
||||||
|
|
||||||
mov ACC, ASCII.LOWERCASE_A
|
mov ACC, ASCII.LOWERCASE_A
|
||||||
jls $_key_pressed_end, R1
|
jls $_key_pressed_end, R1
|
||||||
mov ACC, ASCII.LOWERCASE_Z
|
mov ACC, ASCII.LOWERCASE_Z
|
||||||
jgr $_key_pressed_end, R1
|
jgr $_key_pressed_end, R1
|
||||||
push R1
|
push R1
|
||||||
push 10
|
mov R2, [$cursor_x]
|
||||||
push 10
|
push R2
|
||||||
|
push 1
|
||||||
push DefaultPalette.Red
|
push DefaultPalette.Red
|
||||||
push 4
|
push 4
|
||||||
call $_print_char
|
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:
|
_key_pressed_end:
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@
|
||||||
0x22: Print String in Text16 Colors Mode (String address stored in R8, Cell address stored in R9)
|
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)
|
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)
|
0x24: Clear Screen in Text16 Colors Mode (Cell address stored in R9)
|
||||||
|
0x25: Scroll in Text16 Colors Mode
|
||||||
|
|
||||||
0xE0: Refresh Screen
|
0xE0: Refresh Screen
|
||||||
0xE1: Clear Screen
|
0xE1: Clear Screen
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ cd ..
|
||||||
cp ../extra/dss/DragonOS/* ./dss/DragonOS/
|
cp ../extra/dss/DragonOS/* ./dss/DragonOS/
|
||||||
|
|
||||||
printf "\n${green}1) kernel0.dss\n${clear}"
|
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
|
./dtools load-binary dragon/disk1.dr dragon/kernel0.bin 0x00018000
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue