From 8bbacdc3316a54b5ef5805701098eb8e81d17986 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 13 Nov 2021 17:24:45 -0500 Subject: corrections in 03 compiler, better hello world program! --- 03/Makefile | 2 +- 03/ex03 | 1 + 03/in02 | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 03/in03 | 37 ++++++++++++---- 4 files changed, 176 insertions(+), 9 deletions(-) (limited to '03') diff --git a/03/Makefile b/03/Makefile index dd06acd..3d71765 100644 --- a/03/Makefile +++ b/03/Makefile @@ -1,4 +1,4 @@ -all: out02 +all: out02 out03 out02: in02 ../02/out01 ../02/out01 out03: out02 in03 diff --git a/03/ex03 b/03/ex03 index e586b20..510018e 100644 --- a/03/ex03 +++ b/03/ex03 @@ -39,3 +39,4 @@ div call A str Here is some text which will be put in the executable! ?CaD:label + diff --git a/03/in02 b/03/in02 index 11e8cf6..624694e 100644 --- a/03/in02 +++ b/03/in02 @@ -770,6 +770,107 @@ im ##38. ascii '8' je :-=8 read 8 bytes +im +##78. ascii 'x' +je +:-=# +im +##64. ascii 'd' +je +:-=# +im +##27. ascii ' +je +:-=# +// register transfer. start by writing 48 89 +im +--tx +IA +im +##2. +DA +im +--wr +cl +// get index of first register +im +--LI +BA +zA +lb +BA +im +--r# +cl +DA +// get index of first register +im +##2. +BA +im +--LI ++B +BA +zA +lb +BA +im +--r# +cl +