fix small bug
This commit is contained in:
parent
1311659bed
commit
a1197e8b43
|
|
@ -7,7 +7,7 @@ global const byte WHITE = 255
|
||||||
function main ()
|
function main ()
|
||||||
# Open screen
|
# Open screen
|
||||||
# use load immediate because it is a pointer to a string, not a value
|
# 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
|
load_address &screen_namespace -> $18
|
||||||
int mode is $11
|
int mode is $11
|
||||||
load_immediate 0 -> mode
|
load_immediate 0 -> mode
|
||||||
|
|
@ -78,12 +78,12 @@ function pln (str message is $0)
|
||||||
int nl_length is $4
|
int nl_length is $4
|
||||||
int mode is $5
|
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
|
load_immediate 0 -> mode
|
||||||
syscall OPEN term mode -> term
|
syscall OPEN term mode -> term
|
||||||
strlen message -> msg_length
|
strlen message -> msg_length
|
||||||
syscall WRITE term message msg_length
|
syscall WRITE term message msg_length
|
||||||
load_heap_immediate "\n" -> nl
|
load_address &new_line -> nl
|
||||||
strlen nl -> nl_length
|
strlen nl -> nl_length
|
||||||
syscall WRITE term nl nl_length
|
syscall WRITE term nl nl_length
|
||||||
return
|
return
|
||||||
Loading…
Reference in New Issue