Files
nand2tetris-zed/test-examples/SimpleAdd.vm
Sean O'Connor c231dbfd27 Fix HDL and Hack Assembly syntax highlighting and queries
- 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
2025-09-11 11:24:24 -04:00

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