Website Summary Files Commits Branches @commit @diff @stats
path: root / examples / subroutines.s
blob: d1bd191e08f92317ff29e531ab4168e14b3f7308 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
jmp main

x = 0
y = 0
sum2:
	add x, y
	add y, y
	rts

a = 15
b = 20
main:
	mov a, x
	mov b, y
	jsr sum2 ; sum2(a, b)

	mov y, x
	mov b, y
	jsr sum2 ; sum2(sum2(a, b), b)

	mov y, %1000