From 06daa57ba522aac2431d4994dc60f581cb39bc1e Mon Sep 17 00:00:00 2001 From: Travis Shears Date: Fri, 12 Jul 2024 16:17:36 +0200 Subject: [PATCH] init repo with 99 bottles of beer and help tals --- .gitignore | 3 +++ 99_bottles.tal | 22 ++++++++++++++++++++++ hello.tal | 18 ++++++++++++++++++ run.sh | 4 ++++ 4 files changed, 47 insertions(+) create mode 100644 .gitignore create mode 100644 99_bottles.tal create mode 100644 hello.tal create mode 100755 run.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe2f9a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rom +.snarf +*.rom.sym diff --git a/99_bottles.tal b/99_bottles.tal new file mode 100644 index 0000000..7cec22c --- /dev/null +++ b/99_bottles.tal @@ -0,0 +1,22 @@ + +|0100 + ;bottles-of-beer print + ;on-the-wall print + ;bottles-of-beer print + BRK + + +%SP { 20 } + +@bottles-of-beer "99_bottles_of_beer 00 +@on-the-wall "on_the_wall 00 +@take-one-down "take_one_down,_pass_it_around 00 + + +@print ( str* -: ) + ( LDAk LIT "_ NEQk ?print/space ) + LDAk #18 DEO + INC2 LDAk ?print + ( print newline ) + #0a #18 DEO + POP2 JMP2r diff --git a/hello.tal b/hello.tal new file mode 100644 index 0000000..0d08459 --- /dev/null +++ b/hello.tal @@ -0,0 +1,18 @@ +@Log #18 + +|0100 LIT "h ;Log DEO ( h ) + LIT "e #18 DEO ( e ) + LIT "l #18 DEO ( l ) + #6c #18 DEO ( l ) + #6f #18 DEO ( o ) + #0a #18 DEO ( newline ) +#18s + + #19 DUP ( 25 25 ) + #0a DIV ( 25 02 ) + SWP DUP ( 02 25 25 ) + #0a DIV ( 02 25 02 ) + #0a MUL ( 02 25 20 ) + SUB ( 02 05 ) + #30 ADD SWP #30 ADD + #18 DEO #18 DEO diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..a0bd93c --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + + +../uxn/bin/uxnasm 99_bottles.tal 99_bottles.rom && ../uxn/bin/uxncli 99_bottles.rom \ No newline at end of file