New instructions, updated examples
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user