-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocal_add_6.asm
58 lines (49 loc) · 1.04 KB
/
local_add_6.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;
; File generated by cc65 v 2.18 - Ubuntu 2.18-1
;
.fopt compiler,"cc65 v 2.18 - Ubuntu 2.18-1"
.setcpu "6502"
.smart on
.autoimport on
.case on
.debuginfo off
.importzp sp, sreg, regsave, regbank
.importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
.macpack longbranch
.forceimport __STARTUP__
.export _main
; ---------------------------------------------------------------
; void __near__ main (void)
; ---------------------------------------------------------------
.segment "CODE"
.proc _main: near
.segment "BSS"
L0002:
.res 1,$00
L0003:
.res 1,$00
L0004:
.res 1,$00
.segment "CODE"
;
; a = 10;
;
lda #$0A
sta L0002
;
; b = 20;
;
lda #$14
sta L0003
;
; c = a + b;
;
lda L0002
clc
adc L0003
sta L0004
;
; }
;
rts
.endproc