2022-10-15 01:53:41 +02:00
|
|
|
; stream IO routines
|
|
|
|
|
|
|
|
; write a character to the terminal
|
|
|
|
; inputs:
|
|
|
|
; r0: pointer to ASCII character
|
|
|
|
stream_write_to_terminal:
|
2022-11-22 06:43:58 +01:00
|
|
|
movz.8 r0, [r0]
|
2022-10-15 01:53:41 +02:00
|
|
|
jmp print_character_to_terminal
|
|
|
|
|
|
|
|
stream_get_input:
|
|
|
|
mov r0, [read_buffer]
|
2023-01-30 21:28:33 +01:00
|
|
|
mov [read_buffer_ack], 1
|
2022-10-15 01:53:41 +02:00
|
|
|
ret
|
|
|
|
|
|
|
|
read_buffer: data.32 0
|
2023-01-30 21:28:33 +01:00
|
|
|
read_buffer_ack: data.32 0
|