Skip to content

Commit 9a1911f

Browse files
committed
Implement "push/pop static n"
1 parent 998166d commit 9a1911f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/code_writer.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ def load_base_address_into_r13(segment, offset)
127127
@#{3 + offset}
128128
D=A
129129
EOF
130+
when 'static'
131+
output.puts <<-EOF
132+
@STATIC.#{offset}
133+
D=A
134+
EOF
130135
else
131136
output.puts <<-EOF
132137
// Get base address of the local segment

0 commit comments

Comments
 (0)