Skip to content

Commit

Permalink
Add basic string support
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcampanella committed Oct 13, 2024
1 parent e4be302 commit be6de4e
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 68 deletions.
3 changes: 2 additions & 1 deletion example-asm/hello.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

// Setup the parameters to print hello world
// and then call the Kernel to do it.
// string stdout syscallnum len syscall4
_start:
mov X0, #1 // 1 = StdOut
mov X0, #1 // 1 = StdOut
adr X1, helloworld // string to print
mov X2, #13 // length of our string
mov X16, #4 // Unix write system call
Expand Down
Binary file added examples/hello-world
Binary file not shown.
1 change: 1 addition & 0 deletions examples/hello-world.rorth
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"Hello, World" 1 12 write
1 change: 1 addition & 0 deletions examples/hello-world.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello, World
Binary file added examples/strings
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/strings.rorth
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" Loves to eat. " " Fox" "Red" "The " rot rot rot
1 4 write
1 3 write
1 4 write
1 15 write


1 change: 1 addition & 0 deletions examples/strings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Red Fox Loves to eat.
Loading

0 comments on commit be6de4e

Please sign in to comment.