Subversion Repositories pentevo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1186 savelij 1
        cpu     melps7751
2
        page    0
3
 
4
 
5
        ldt     #0
6
        assume  pg:0,dt:0,dpr:0
7
 
8
accmode macro   size
9
         switch size
10
          case   8
11
           sep    #$20
12
           assume m:1
13
          case  16
14
           clp    #$20
15
           assume m:0
16
          elsecase
17
           fatal  "accmode: invalid operand size: $\{SIZE}"
18
         endcase
19
        endm
20
 
21
idxmode macro   size
22
         switch size
23
          case   8
24
           sep    #$10
25
           assume x:1
26
          case  16
27
           clp    #$10
28
           assume x:0
29
          elsecase
30
           fatal  "idxmode: invalid operand size: $\{SIZE}"
31
         endcase
32
        endm
33
 
34
        xab
35
        wit
36
        tyx
37
        tyb
38
        tya
39
        txy
40
        txs
41
        txb
42
        txa
43
        tsx
44
        tsb
45
        tsa
46
        tdb
47
        tda
48
        tby
49
        tbx
50
        tbs
51
        tbd
52
        tay
53
        tax
54
        tas
55
        tad
56
        stp
57
        sem
58
        sei
59
        sec
60
        rts
61
        rtl
62
        rti
63
        ply
64
        plx
65
        plt
66
        plp
67
        pld
68
        plb
69
        pla
70
        phy
71
        phx
72
        pht
73
        php
74
        phg
75
        phd
76
        phb
77
        pha
78
        nop
79
        iny
80
        inx
81
        dey
82
        dex
83
        clv
84
        clm
85
        cli
86
        clc
87
 
88
        rla     #7
89
 
90
targ:
91
        bcc     targ
92
        bcs     targ
93
        beq     targ
94
        bmi     targ
95
        bne     targ
96
        bpl     targ
97
        bvc     targ
98
        bvs     targ
99
        bra     targ
100
        per     targ
101
        org     *+$100
102
        bra     targ
103
        per     targ
104
        per     #-30
105
 
106
        accmode 8
107
        idxmode 8
108
 
109
        adc     #20
110
        and     a,#-1
111
        cmp     b,#-$a
112
 
113
targ2:
114
        bbc     #$80,$20,targ2
115
        bbs     #$40,$2000,targ2
116
        clb     #$20,$20
117
        seb     #$10,$2000
118
 
119
        cpx     #$aa
120
        cpy     #$aa
121
        ldx     #$bb
122
        ldy     #$bb
123
 
124
        ldm     #$aa,$20
125
        ldm     #$aa,$2000
126
        ldm     #$aa,$20,x
127
        ldm     #$aa,$2000,x
128
 
129
        accmode 16
130
        idxmode 16
131
 
132
        eor     #%0000111111110000
133
        lda     a,#'AB'
134
        ora     b,#3000
135
 
136
        sbc     $20
137
        sta     a,$2000
138
        adc     b,$200000
139
 
140
        and     $30,x
141
        cmp     a,$3000,x
142
        eor     b,$300000,x
143
 
144
        lda     $40,y
145
        ora     a,$4000,y
146
;       sbc     b,$400000,y
147
 
148
        sta     ($50)
149
;       adc     a,($5000)
150
;       and     b,($500000)
151
 
152
        cmpl    ($60)
153
;       eorl    a,($6000)
154
;       ldal    b,($600000)
155
 
156
        ora     ($70,x)
157
;       sbc     ($7000,x)
158
;       sta     ($700000,x)
159
 
160
        adc     ($80),y
161
;       and     ($8000),y
162
;       cmp     ($800000),y
163
 
164
        eorl    ($80),y
165
;       ldal    ($8000),y
166
;       oral    ($800000),y
167
 
168
        sbc     b,3,s
169
        sta     a,(5,s),y
170
 
171
        asl
172
        dec     a
173
        inc     b
174
        lsr     $20
175
        rol     $2000
176
        ror     $20,x
177
        asl     $2000,x
178
 
179
targ3:
180
        bbs     #$80,$20,targ3
181
        bbc     #$40,$2000,targ3
182
        clb     #$20,$20
183
        seb     #$10,$2000
184
 
185
        cpx     #$aa
186
        cpy     #$aa
187
        ldx     #$bb
188
        ldy     #$bb
189
        cpx     $20
190
        cpy     $20
191
        ldx     $20
192
        ldy     $20
193
        stx     $20
194
        sty     $20
195
        cpx     $2000
196
        cpy     $2000
197
        ldx     $2000
198
        ldy     $2000
199
        stx     $2000
200
        sty     $2000
201
        ldx     $30,y
202
        ldy     $30,x
203
        stx     $30,y
204
        sty     $30,x
205
        ldx     $3000,y
206
        ldy     $3000,x
207
 
208
        mpy     #55
209
        accmode 8
210
        mpy     #55
211
        accmode 16
212
        mpy     $12
213
        mpy     $12,x
214
        mpy     ($12)
215
        mpy     ($12,x)
216
        mpy     ($12),y
217
        mpyl    ($12)
218
        mpyl    ($12),y
219
        mpy     $1234
220
        mpy     $1234,x
221
        mpy     $1234,y
222
        mpy     $123456
223
        mpy     $123456,x
224
        mpy     $12,s
225
        mpy     ($12,s),y
226
 
227
        div     #55
228
        accmode 8
229
        div     #55
230
        accmode 16
231
        div     $12
232
        div     $12,x
233
        div     ($12)
234
        div     ($12,x)
235
        div     ($12),y
236
        divl    ($12)
237
        divl    ($12),y
238
        div     $1234
239
        div     $1234,x
240
        div     $1234,y
241
        div     $123456
242
        div     $123456,x
243
        div     $12,s
244
        div     ($12,s),y
245
 
246
        jmp     $20
247
        jmp     $2000
248
        jmp     $200000
249
        jmp     ($3000)
250
        jmpl    ($3000)
251
        jmp     ($4000,x)
252
        jsr     $20
253
        jsr     $2000
254
        jsr     $200000
255
        jsr     ($4000,x)
256
 
257
        ldm     #$aa,$20
258
        ldm     #$aa,$2000
259
        ldm     #$aa,$20,x
260
        ldm     #$aa,$2000,x
261
 
262
        mvn     $200000,$300000
263
        mvp     $200000,$300000
264
 
265
;- - - - - - - - - - - - - - - - - - - - - - - - - - - -
266
 
267
        cpu     65816
268
 
269
        cop     #0
270
        jml     $2000
271
        jsl     $4000
272
        brl     *
273
        rep     #$55
274
        tsb     $33
275
        trb     $66
276
        tsb     $9999
277
        trb     $cccc
278
        bit     $00
279
        bit     $11,x
280
        bit     $2222
281
        bit     $3333,x
282
        bit     #$44
283
        stz     $55
284
        stz     $6666
285
        stz     $77,x
286
        stz     $8888,x
287
        cld
288
        sed
289
        tcs
290
        tsc
291
        phk
292
        tcd
293
        tdc
294
        phb
295
        plb
296
        wai
297
        xba
298
        xce
299
 
300
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
301
 
302
        cpu     melps7750
303
 
304
        asr
305
        asr     a
306
        asr     b
307
        asr     $aa
308
        asr     $1234
309
        asr     $aa,x
310
        asr     $1234,x
311
 
312
        extz
313
        extz    a
314
        extz    b
315
        exts
316
        exts    a
317
        exts    b
318
 
319
        mpys     #55
320
        accmode 8
321
        mpys     #55
322
        accmode 16
323
        mpys     $12
324
        mpys     $12,x
325
        mpys     ($12)
326
        mpys     ($12,x)
327
        mpys     ($12),y
328
        mpysl    ($12)
329
        mpysl    ($12),y
330
        mpys     $1234
331
        mpys     $1234,x
332
        mpys     $1234,y
333
        mpys     $123456
334
        mpys     $123456,x
335
        mpys     $12,s
336
        mpys     ($12,s),y
337
 
338
        divs     #55
339
        accmode 8
340
        divs     #55
341
        accmode 16
342
        divs     $12
343
        divs     $12,x
344
        divs     ($12)
345
        divs     ($12,x)
346
        divs     ($12),y
347
        divsl    ($12)
348
        divsl    ($12),y
349
        divs     $1234
350
        divs     $1234,x
351
        divs     $1234,y
352
        divs     $123456
353
        divs     $123456,x
354
        divs     $12,s
355
        divs     ($12,s),y
356
 
357
        ; plain break (one byte)
358
        brk
359
        ; break with extra NOP to compensate PC increment by 2 if not corrected by break handler
360
        brk     $ea
361
 
362
;-----------------------------------------------------
363
; standard Intel/MASM-style pseudo instructions
364
 
365
        include "../t_dx/t_dn.inc"
366
        include "../t_dx/t_db.inc"
367
        include "../t_dx/t_dw.inc"
368
        include "../t_dx/t_dd.inc"
369
        include "../t_dx/t_dq.inc"
370
        include "../t_dx/t_dt.inc"
371
        include "../t_dx/t_do.inc"