diff --git a/README.md b/README.md index 88971a0..ddccc64 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,8 @@ namely: (requires I/O port 1 support), * [FizzBuzz classic program](examples/fizzbuzz.mu8a) (requires I/O port 1 support), +* [A simple 10-character echo test](examples/echo.mu8a) (requires both I/O + port 1 and port 2 support), * [Bulls and Cows game](examples/moo.mu8a), * [Lunar Lander game](examples/lunar.mu8a). diff --git a/examples/assembled/echo.mu8 b/examples/assembled/echo.mu8 new file mode 100644 index 0000000..3dd8503 --- /dev/null +++ b/examples/assembled/echo.mu8 @@ -0,0 +1,3 @@ +1 5 10 0 11 +2 4 1 10 2 +3 3 1 11 1 diff --git a/examples/echo.mu8a b/examples/echo.mu8a new file mode 100644 index 0000000..a0b2798 --- /dev/null +++ b/examples/echo.mu8a @@ -0,0 +1,3 @@ +set 10 0 11 ; set the newline character to loc 11 +inp 1 10 2 ; input characters from loc 1 to loc 10 from port 2 +out 1 11 1 ; output them right away along with the newline into port 1