<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 27 Jul 1994 12:38:42 EST
From   : Stephen Quan <quan@...>
Subject: 6502 opcodes for Chris Rae.

This is to Chris Rae, and whoever needs it.

I only spent 2 days crafting up this table.  I have the advanced
bbc user's guide, but I lost that big A3 (or whatever sized) data
sheet with the opcodes on it, so I had to write beeb assembly using

  10 DIM C% 100
  20 P%=C%:[OPT 3
  40 ADC #&12
  50 ADC &34
  60 ]

You get he idea, anyhow, combine that and a few other info from
the advance user's guide, I came up with the following table.
Don't worry about the extraneous INFO on the end, you'll probably
don't need it.  I just thought I'd try to make some use of
observing what happens to NVZC.  (To implement my presumed NVZC
status register method.  Of course, I still store D, B, I).

Bear in mind most of this stuff was copied from staring at a mode 3
(or mode 0) screen on a shoddy monitor so some of the data may be
not entirely right.  I did already make 1 or 2 errors near the end
(with TYA and TAY).  Anyhow, feel free to correct and redistribute
this file, but the usually disclaimer about don't sue me please,
applies!  :-)


69 adc im  2 2   ---c nvzc
65 adc zp  2 3   ---c nvzc
75 adc zpx 2 4   ---c nvzc
6d adc ab  3 4   ---c nvzc
7d adc abx 3 4+  ---c nvzc
79 adc aby 3 4+  ---c nvzc
61 adc idx 2 6   ---c nvzc
71 adc idy 2 5+  ---c nvzc

29 add im  2 2   ---- n-z-
25 add zp  2 3   ---- n-z-
35 add zpx 2 4   ---- n-z-
2d add ab  3 4   ---- n-z-
3d add abx 3 4+  ---- n-z-
39 add aby 3 4+  ---- n-z-
21 add idx 2 6   ---- n-z-
31 add idy 2 5+  ---- n-z-

0a asl a   1 2   ---- n-zc
06 asl zp  2 5   ---- n-zc
16 asl zpx 2 6   ---- n-zc
0e asl ab  3 6   ---- n-zc
1e asl abx 3 7   ---- n-zc

90 bcc rel 2 2*& ---c ----

b0 bcs rel 2 2*& ---c ----

f0 beq rel 2 2*& --z- ----

24 bit zp  2 3   ---- nvz-
2c bit ab  3 4   ---- nvz-

30 bmi rel 2 2*& n--- ----

d0 bne rel 2 2*& --z- ----

10 bpl rel 2 2*& n--- ----

00 brk imp 1 7   ---- ----

50 bvc rel 2 2*& -v-- ----

70 bvs rel 2 2*& -v-- ----

18 clc imp 1 2   ---c ----

d8 cld imp 1 2   ---- ----

58 cli imp 1 2   ---- ----

b8 clv imp 1 2   -v-- ----

c9 cmp im  2 2   ---- n-zc
c5 cmp zp  2 3   ---- n-zc
d5 cmp zpx 2 4   ---- n-zc
cd cmp ab  3 4   ---- n-zc
dd cmp abx 3 4+  ---- n-zc
d9 cmp aby 3 4+  ---- n-zc
c1 cmp idx 2 6   ---- n-zc
d1 cmp idy 2 5+  ---- n-zc

e0 cpx im  2 2   ---- n-zc
e4 cpx zp  2 3   ---- n-zc
ec cpx ab  3 4   ---- n-zc

c0 cpy im  2 2   ---- n-zc
c4 cpy zp  2 3   ---- n-zc
cc cpy ab  3 4   ---- n-zc

c6 dec zp  2 5   ---- n-z-
d6 dec zpx 2 6   ---- n-z-
ce dec ab  3 6   ---- n-z-
de dec abx 3 7   ---- n-z-

ca dex imp 1 2   ---- n-z-

88 dey imp 1 2   ---- n-z-

49 eor im  2 2   ---- n-z-
45 eor zp  2 3   ---- n-z-
55 eor zpx 2 4   ---- n-z-
4d eor ab  3 4   ---- n-z-
5d eor abx 3 4+  ---- n-z-
59 eor aby 3 4+  ---- n-z-
41 eor idx 2 6   ---- n-z-
51 eor idy 2 5+  ---- n-z-

e6 inc zp  2 5   ---- n-z-
f6 inc zpx 2 6   ---- n-z-
ee inc ab  3 6   ---- n-z-
fe inc abx 3 7   ---- n-z-

e8 inx imp 1 2   ---- n-z-

c8 iny imp 1 2   ---- n-z-

4c jmp ab  3 3   ---- ----
6c jmp ind 3 5   ---- ----

20 jsr ab  3 6   ---- ----

a9 lda im  2 2   ---- n-z-
a5 lda zp  2 3   ---- n-z-
b5 lda zpx 2 4   ---- n-z-
ad lda ab  3 4   ---- n-z-
bd lda abx 3 4+  ---- n-z-
b9 lda aby 3 4+  ---- n-z-
a1 lda idx 2 6   ---- n-z-
b1 lda idy 2 5+  ---- n-z-

a2 ldx im  2 2   ---- n-z-
a6 ldx zp  2 3   ---- n-z-
b6 ldx zpy 2 4   ---- n-z-
ae ldx ab  3 4   ---- n-z-
be ldx aby 3 4+  ---- n-z-

a0 ldy im  2 2   ---- n-z-
a4 ldy zp  2 3   ---- n-z-
b4 ldy zpx 2 4   ---- n-z-
ac ldy ab  3 4   ---- n-z-
bc ldy abx 3 4+  ---- n-z-

4a lsr a   1 2   ---c n-zc
46 lsr zp  2 5   ---c n-zc
56 lsr zpx 2 6   ---c n-zc
4e lsr ab  3 6   ---c n-zc
5e lsr abx 3 7+  ---c n-zc

ea nop imp 1 2   ---- ----

09 ora im  2 2   ---- n-z-
05 ora zp  2 3   ---- n-z-
15 ora zpx 2 4   ---- n-z-
0d ora ab  3 4   ---- n-z-
1d ora abx 3 4+  ---- n-z-
19 ora aby 3 4+  ---- n-z-
01 ora idx 2 6   ---- n-z-
11 ora idy 2 5+  ---- n-z-

48 pha imp 1 3   ---- ----

08 php imp 1 3   ---- ----

68 pla imp 1 4   ---- n-z-

28 plp imp 1 4   ---- nvzc

2a rol a   1 2   ---c n-zc
26 rol zp  2 5   ---c n-zc
36 rol zpx 2 6   ---c n-zc
2e rol ab  3 6   ---c n-zc
3e rol abx 3 7   ---c n-zc

6a ror a   1 2   ---c n-zc
66 ror zp  2 5   ---c n-zc
76 ror zpx 2 6   ---c n-zc
6e ror ab  3 6   ---c n-zc
7e ror abx 3 7   ---c n-zc

40 rti imp 1 6   ---- nvzc

60 rts imp 1 6   ---- ----

e9 sbc im  2 2   ---c nvzc
e5 sbc zp  2 3   ---c nvzc
f5 sbc zpx 2 4   ---c nvzc
ed sbc ab  3 4   ---c nvzc
fd sbc abx 3 4+  ---c nvzc
f9 sbc aby 3 4+  ---c nvzc
e1 sbc idx 2 6   ---c nvzc
f1 sbc idy 2 5+  ---c nvzc

38 sec imp 1 2   ---c ---c

f8 sed imp 1 2   ---- ----

78 sei imp 1 2   ---- ----

85 sta zp  2 3   ---- ----
95 sta zpx 2 4   ---- ----
8d sta ab  3 4   ---- ----
9d sta abx 3 5   ---- ----
99 sta aby 3 5   ---- ----
81 sta idx 2 6   ---- ----
91 sta idy 2 6   ---- ----

86 stx zp  2 3   ---- ----
96 stx zpy 2 4   ---- ----
8e stx ab  3 4   ---- ----

84 sty zp  2 3   ---- ----
94 sty zpx 2 4   ---- ----
8c sty ab  3 4   ---- ----

aa tax imp 1 2   ---- n-z-

a8 tay imp 1 2   ---- n-z-

ba tsx imp 1 2   ---- n-z-

8a txa imp 1 2   ---- n-z-

9a txs imp 1 2   ---- ----

98 tya imp 1 2   ---- n-z-

-- 
Stephen Quan (quan@...                 ), SysAdmin, Analyst/Programmer.
Centre for Spatial Information Studies, University of Tasmania, Hobart.
GPO BOX 252C, Australia, 7001.  Local Tel: (002) 202898 Fax: (002) 240282
International Callers use +6102 instead of (002).
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>