mirror of
https://github.com/soconnor0919/nand2tetris-zed.git
synced 2025-12-12 23:24:45 -05:00
- Fixed HDL highlights query syntax error with #match? predicate - Replaced #match? with #any-of? for exact string matching - Fixed Hack Assembly outline query invalid field name - Improved HDL syntax highlighting with comprehensive patterns - Added HDL bracket matching for all syntax types - Fixed XML scope mismatch from text.xml to source.xml - Enhanced outline queries for better code navigation
27 lines
208 B
NASM
27 lines
208 B
NASM
// Computes R0 = 2 + 3
|
|
@2
|
|
D=A
|
|
@3
|
|
D=D+A
|
|
@0
|
|
M=D
|
|
|
|
// Loop example with labels
|
|
@i
|
|
M=1
|
|
(LOOP)
|
|
@i
|
|
D=M
|
|
@10
|
|
D=D-A
|
|
@END
|
|
D;JGT
|
|
|
|
@i
|
|
M=M+1
|
|
@LOOP
|
|
0;JMP
|
|
(END)
|
|
@END
|
|
0;JMP
|