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
33 lines
428 B
Plaintext
33 lines
428 B
Plaintext
// Stack arithmetic operations
|
|
push constant 7
|
|
push constant 8
|
|
add
|
|
|
|
// Memory operations
|
|
push local 0
|
|
push local 1
|
|
add
|
|
pop local 2
|
|
|
|
// Function definition
|
|
function Math.multiply 2
|
|
push constant 0
|
|
pop local 0
|
|
|
|
label LOOP
|
|
push local 1
|
|
push constant 0
|
|
eq
|
|
if-goto END
|
|
|
|
push local 0
|
|
push argument 0
|
|
add
|
|
pop local 0
|
|
|
|
goto LOOP
|
|
|
|
label END
|
|
push local 0
|
|
return
|