5521
This commit is contained in:
parent
f7fd97ce4e
commit
668700fd2c
|
@ -1,7 +1,7 @@
|
|||
# First program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
|
||||
# Just return 42.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex1.2.subx -o examples/ex1
|
||||
# $ ./subx run examples/ex1
|
||||
# Expected result:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# String comparison: return 1 iff the two args passed in at the commandline are equal.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex10.subx -o examples/ex10
|
||||
# $ ./subx run examples/ex10 abc abd
|
||||
# Expected result:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# kernel in a few places. This layer implements a function for comparing
|
||||
# a null-terminated 'kernel string' with a length-prefixed 'SubX string'.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex11.subx -o examples/ex11
|
||||
# $ ./subx run examples/ex11 # runs a series of tests
|
||||
# ...... # all tests pass
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Example showing mmap syscall.
|
||||
# Create a new segment using mmap, save the address, write to it.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex12.subx -o examples/ex12
|
||||
# $ ./subx run examples/ex12
|
||||
# You shouldn't get a segmentation fault.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Add 1 and 1, and return the result in the exit code.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex2.subx -o examples/ex2
|
||||
# $ ./subx run examples/ex2
|
||||
# Expected result:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Add the first 10 numbers, and return the result in the exit code.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex3.subx -o examples/ex3
|
||||
# $ ./subx run examples/ex3
|
||||
# Expected result:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Read a character from stdin, save it to a global, write it to stdout.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex4.subx -o examples/ex4
|
||||
# $ ./subx run examples/ex4
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Read a character from stdin, save it to a local on the stack, write it to stdout.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex5.subx -o examples/ex5
|
||||
# $ ./subx run examples/ex5
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Print out a (global variable) string to stdout.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex6.subx -o examples/ex6
|
||||
# $ ./subx run examples/ex6
|
||||
# Hello, world!
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# it for reading, read a character from it, close it, delete it, and return
|
||||
# the character read.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex7.subx -o examples/ex7
|
||||
# $ ./subx run examples/ex7
|
||||
# Expected result:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Example reading commandline arguments: compute length of first arg.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex8.subx -o examples/ex8
|
||||
# $ ./subx run examples/ex8 abc de fghi
|
||||
# Expected result:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Show difference between ascii codes of first letter of first arg and first
|
||||
# letter of second arg.
|
||||
#
|
||||
# To run (from the subx directory):
|
||||
# To run:
|
||||
# $ ./subx translate examples/ex9.subx -o examples/ex9
|
||||
# $ ./subx run examples/ex9 z x
|
||||
# Expected result:
|
||||
|
|
Loading…
Reference in New Issue