fix small bug

This commit is contained in:
zongor 2025-11-08 22:29:32 -08:00
parent 1311659bed
commit a1197e8b43
1 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ global const byte WHITE = 255
function main ()
# Open screen
# use load immediate because it is a pointer to a string, not a value
plex screen
plex screen is $0
load_address &screen_namespace -> $18
int mode is $11
load_immediate 0 -> mode
@ -78,12 +78,12 @@ function pln (str message is $0)
int nl_length is $4
int mode is $5
load_heap_immediate "/dev/term/0" -> term # get terminal device
load_address &terminal_namespace -> term # get terminal device
load_immediate 0 -> mode
syscall OPEN term mode -> term
strlen message -> msg_length
syscall WRITE term message msg_length
load_heap_immediate "\n" -> nl
load_address &new_line -> nl
strlen nl -> nl_length
syscall WRITE term nl nl_length
return