New instructions, updated examples

This commit is contained in:
2021-09-29 18:48:54 +02:00
parent 8f74c747cd
commit 8f6770013c
4 changed files with 54 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ INT w
#initialize width
INT h
#initialize height
IN INT w l
IN INT w l
#input height as an int
IN INT h h
#input width as an int
@@ -17,20 +17,20 @@ SET wr 0
SET hr 0
# set height counter to 0
:wrc
#row label
:wf
#column label
OUT *
#put char
INC wr
#increment width counter
JL wf wr w
#loop until desired width
OUT \n
#put newline char
SET wr 0
# set width counter to 0
INC hr
#row label
:wf
#column label
OUT *
#put char
INC wr
#increment width counter
JL wf wr w
#loop until desired width
OUT \n
#put newline char
SET wr 0
# set width counter to 0
INC hr
#increment height counter
JL wrc hr h
#loop until desired height