-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.m65
174 lines (161 loc) · 2.05 KB
/
test.m65
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
symbol .= table
value = 10
wsync = $D40A
*=$600
DLI
pha ; this is a test of comments
lda #8+3*2
sta WSYNC
sta $d000
pla
rti
.MACRO VDLI
ldy # <%1
ldx # >%1
lda #$c0
sty $0200
stx $0201
sta $d40e
.ENDM
.MACRO PUSHXY
txa
pha
tya
pha
.ENDM
.IF 1
.IF 0
lda #0
.ENDIF
PUSHXY
.ELSE
.IF 1
lda #1
.IF 0
lda #3
.ELSE
lda #4
.ENDIF
.ELSE
lda #0
.ENDIF
VDLI DLI
.ENDIF
begin ldx #>symbol
lda table,x
lda #1
symbol .= symbol + 1
lda #>symbol
.rept 4 ; repeat test
asl a
.endr
rts
BOB = 14
lda #12*3+2
lda #.DEF BOB
lda #.DEF JOHN
lda #[3+7]*3+2
?loc=$567
?loc2=$4444
lda ?loc
sta ?loc2
.local
?loc=$123
lda ?loc
lda #<7+6*5+[3+value]
lda #>table*20
lda #>$4000
; addressing check
LDA #$07 ; Immediate mode
LDA $1F ; Zero page absolute
LDA $0800 ; Absolute
CLC ; Implied
JMP ($0036) ; Indirect absolute
LDA $FE90,X ; Absolute indexed (by X)
LDA $FE90,Y ; Absolute indexed (by Y)
LDA $2A,X ; Zero page indexed
LDA ($2A,X) ; Indexed indirect
LDA ($2A),Y ; Indirect indexed
BCC $03 ; Relative
BCC $0603 ; Relative (alternate form)
LSR A ; Accumulator
LSR ; Accumulator (alternate form)
ora $04
ora #16
ora $600,x
; opcode check
adc #01
and #01
asl A
bcc *+2
bcs *+2
beq *+2
bit $01
bmi *+2
bne *+2
bpl *+2
brk
bvc *+2
bvs *+2
clc
cld
cli
clv
cmp #01
cpx #01
cpy #01
dec $01
dex
dey
eor #01
inc $01
inx
iny
jmp *+3
jsr *+3
lda #01
ldx #01
ldy #01
lsr A
nop
ora #01
pha
php
pla
plp
rol A
ror A
rti
rts
sbc #01
sec
sed
sei
sta $01
stx $01
sty $01
tax
tay
tsx
txa
txs
tya
table .rept 5
symbol .= symbol+$10
.word symbol
.endr
atable .rept 20
.word [*-atable]/2*40
.endr
newchar .BYTE "this is a test",0
.BYTE +80,"test",0
.CBYTE "test"
.SBYTE "TEST",'A
.FLOAT 3.14128
.WORD $1234,-1,1
.DBYTE $1234,-1,1
data .byte 0,1,2,3,4,5,7
.dc 6 0
L1 .ds 8
L2 *=*+8
L3 .dc 6 0