Assembler Worksheet
linenum Assemblylanguageprogram Afterfirstpass Machinelanguage Symboltable
000 111 222 333 444 555 666 777 888 999
10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26
27 28 29
@0
D=M
@INFINITE_LOOP
D;JLE
@counter
M=D
@SCREEN
D=A
@address
M=D
(LOOP)
@address
A=M
M=-1
@address
D=M
@32
D=D+A
@address
M=D
@counter
MD=M-1
@LOOP
D;JGT
(INFINITE_LOOP)
@INFINITE_LOOP
0;JMP
Symbol
Value
SP
0
LCL
1
ARG
2
THIS
3
THAT
4
R0
0
R1
1
R2
2
R3
3
R4
4
R5
5
R6
6
R7
7
R8
8
R9
9
R10
10
R11
11
R12
12
R13
13
R14
14
R15
15
SCREEN
16384
KBD
24576