diff --git a/run.sh b/run.sh index 80a9453..8599086 100755 --- a/run.sh +++ b/run.sh @@ -3,9 +3,9 @@ set -e INPUT=$(realpath $1) -mkdir target +mkdir -p target cd holey-bytes/hbasm cat $INPUT | cargo run > ../../target/out cd ../hbvm -cat ../../out | cargo run \ No newline at end of file +cat ../../target/out | cargo run \ No newline at end of file diff --git a/src/vfs.hbasm b/src/vfs.hbasm index 1399834..b12b993 100644 --- a/src/vfs.hbasm +++ b/src/vfs.hbasm @@ -1,13 +1,14 @@ jmp r0, write + write: li r8, 64 - li r9, 32 - li r10, 16 - li r11, 8 - li r12, 4 - li r13, 2 - li r14, 1 - st r8, r0, fsdata, 6 + -- ctrl-a ctrl-c ctrl-v + brc r9, r8, 1 + brc r10, r8, 2 + brc r12, r8, 4 + brc r16, r8, 8 + brc r24, r8, 16 + li r8, 32 fsdata: \ No newline at end of file