Closed AlekseyPanas closed 1 year ago
Woah! Yep \0
doesn't have a special case and instead gets encoded as an actual 0 for some reason. In the meantime, you can type the literal 0
as you've done or use the .asciiz
directive:
.byte '\n' 0 # you can mix and match
Added a null terminator escape sequence in 0.1.6. After the build finishes in around ~20 you should be able to pull https://github.com/1whatleytay/saturn/releases/tag/app-v0.1.6 and this code should work. As for character literals though, I recommend using .asciiz
!
Oh I didn't even know .asciiz
existed, thanks!
Closing for the time being (until this feature rebels and decides to not work again).
Defining a newline string like so
and the printing it using the string syscall
results in this:
if you put the ascii values instead
then it works fine. It seems like Saturn doesn't automatically recognize characters