summaryrefslogtreecommitdiff
path: root/projects/hack-as/test/valid.asm
blob: d705f1e04b34cf4a76a3e5949d6221cb24700d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// valid asm, but with unnecessary whitespace, = and ;
@ 0		// unnecessary space
D=M
@INFINITE_LOOP
=D;JLE		// unnecessary =
@counter
M=D;		// unnecessary ;
@SCREEN
D = A		// unnecessary spaces
@address
M = D;		// unnecessary spaces and ;
( LOOP )	// unnecessary spaces
	@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