Website Summary Files Commits Branches @commit @diff @stats
path: root / examples / example2.s
blob: b0213b5c8f578b12253e6d25d92629d37a98324f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
; Variables allow "aliases" for arguments

first = %1
subleq first, %2, last
last = %3

; Higher-order instructions can also take in numeric constants
; Constants are automatically stored at the start of memory,
; and all references are replaced with that address

num = 50
add 60, num    ; num += 60
add num, 70    ; address_of(70) += num