move kb util to main

This commit is contained in:
matthias@quintern.xyz 2024-08-08 20:15:28 +02:00
parent 8b2e7c2752
commit d86ac8d52d
2 changed files with 26 additions and 14 deletions

View File

@ -3,6 +3,8 @@
.export home,homeloop
.import keypad_printer:absolute
.import spi_menu:absolute
.import ps2_keyboard_printer:absolute
.import ps2_keyboard_util:absolute
.code
@ -143,9 +145,11 @@ reset:
cmp #'D'
jeq print_2
cmp #'1'
beq @debug0_on
; beq @debug0_on
beq @ps2_util
cmp #'2'
beq @debug0_off
beq @ps2_printer
; beq @debug0_off
cmp #'4'
beq @debug1_on
cmp #'5'
@ -161,6 +165,10 @@ reset:
wai
jmp @loop
@ps2_util:
jmp ps2_keyboard_util
@ps2_printer:
jmp ps2_keyboard_printer
@debug0_off:
DEBUG_LED_OFF 0
jmp @loop
@ -209,18 +217,18 @@ message_1:
message_2:
.byte "0123456789=!?#+*"
.byte "ABCDEFGHIJKLMNOP"
.byte "QRSTUVWXYZÖÄÜß-_"
.byte "QRSTUVWXYZöäüß-_"
.asciiz "{[(<>)]}$%&/,;.:"
message_menu:
.byte "<A> Printer "
.byte "A/2: KP/KB Print"
; .byte "<B> Temperatur"
.byte "<B> SPI-Menu "
.byte "<C> Text 1 "
.asciiz "<D> Text 2 "
str_spi_begin:
.asciiz "---BEGIN SPI---"
str_spi_start:
.asciiz "---START SPI---"
.byte "1: KB Util "
.byte "B: SPI-Menu "
.asciiz "C/D: Text 1/2 "
; str_spi_begin:
; .asciiz "---BEGIN SPI---"
; str_spi_start:
; .asciiz "---START SPI---"
str_io2:
.asciiz "IO2::RB='"

View File

@ -9,11 +9,15 @@
.export spi_menu
.bss
trans_bytes: .res 2 ; used to check if screen needs to be updated
trans_bytes: .res 2 ;; used to check if screen needs to be updated
status_char: .res 1
status_str: .res 17 ; 16 + null
status_str: .res 17 ;; space for 16 + null
.code
;;********************************************************************************
;; @brief Receive code via SPI and execute it
;; @ingroup applications
;;********************************************************************************
.proc spi_menu
stz trans_bytes
stz trans_bytes+1