mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-21 11:32:23 +00:00
nmos6502 mode now also accepts ALR mnemonic (alias for ASR)
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@286 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
26168e6752
commit
3db33bafb5
@ -40,7 +40,7 @@ opcodes (mnemonics in parentheses are used by other sources):
|
||||
mnemonic | implied #8 8 8,x 16 16,x | performs:
|
||||
----------------+---------------------------------+-----------------------
|
||||
anc (ana, anb) | 0b* | A = A & arg, then C=N
|
||||
asr (alr) | 4b | A = A & arg, then lsr
|
||||
alr/asr | 4b | A = A & arg, then lsr
|
||||
arr | 6b | A = A & arg, then ror
|
||||
sbx (axs, sax) | cb | X = (A & X) - arg
|
||||
dop (nop, skb) | 80** 80 04 14 | skips next byte
|
||||
|
@ -27,7 +27,7 @@ marked using '+' or '!' signs:
|
||||
|
||||
40 rti 41 eor (zp, x) 42! jam 43+ sre (zp, x)
|
||||
44! nop zp 45 eor zp 46 lsr zp 47+ sre zp
|
||||
48 pha 49 eor #imm8 4a lsr 4b+ asr #imm8
|
||||
48 pha 49 eor #imm8 4a lsr 4b+ alr #imm8
|
||||
4c jmp abs16 4d eor abs16 4e lsr abs16 4f+ sre abs16
|
||||
50 bvc rel8 51 eor (zp), y 52! jam 53+ sre (zp), y
|
||||
54! nop zp, x 55 eor zp, x 56 lsr zp, x 57+ sre zp, x
|
||||
|
33
src/mnemo.c
33
src/mnemo.c
@ -113,7 +113,7 @@ SCB accu_lindz8[] = { 0, 0, 0, 0, 0x12, 0, 0,
|
||||
// depends on the used addressing mode. A zero entry in these tables means
|
||||
// that the combination of mnemonic and addressing mode is illegal.
|
||||
// | 6502 | 6502/65c02/65ce02/m65 | 65c02 | 65ce02 | 65816 | NMOS 6502 undocumented opcodes | C64DTV2 |
|
||||
enum { IDX_ASL,IDX_ROL,IDX_LSR,IDX_ROR,IDX_LDY,IDX_LDX,IDX_CPY,IDX_CPX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*/0, 0xc2, 0xe2, 0, 0x0b, 0x4b, 0x6b, 0xcb, 0x80, 0x80, 0, 0xab, 0x8b, 0, 0, 0, 0, 0x32, 0x42}; // #$ff #$ffff
|
||||
SCS misc_abs[] = { 0x0e06, 0x2e26, 0x4e46, 0x6e66, 0xaca4, 0xaea6, 0xccc4, 0xece4, 0x2c24, 0x2c24, 0x2c24, 0x8e86, 0x8e86, 0x8c84, 0x8c84, 0xcec6, 0xcec6, 0xeee6, 0xeee6, 0x0c04, 0x1c14, 0x9c64, 0x44, 0xcb00, 0xdcd4, 0xab00, 0xfc00, 0xeb00, 0, 0x02, 0, 0, 0xf400, 0, 0, 0, 0, 0x0c04, 0x04, 0x0c00, 0, 0, 0, 0, 0, 0, 0, 0}; // $ff $ffff
|
||||
@ -242,33 +242,34 @@ static struct ronode mnemos_6502[] = {
|
||||
// undocumented opcodes of the NMOS 6502 that are also supported by c64dtv2:
|
||||
static struct ronode mnemos_6502undoc1[] = {
|
||||
PREDEFNODE("slo", MERGE(GROUP_ACCU, IDXuSLO)), // ASL + ORA (aka ASO)
|
||||
PREDEFNODE("rla", MERGE(GROUP_ACCU, IDXuRLA)), // ROL + AND
|
||||
PREDEFNODE("rla", MERGE(GROUP_ACCU, IDXuRLA)), // ROL + AND (aka RLN)
|
||||
PREDEFNODE("sre", MERGE(GROUP_ACCU, IDXuSRE)), // LSR + EOR (aka LSE)
|
||||
PREDEFNODE("rra", MERGE(GROUP_ACCU, IDXuRRA)), // ROR + ADC
|
||||
PREDEFNODE("sax", MERGE(GROUP_ACCU, IDXuSAX)), // STX + STA (aka AXS aka AAX)
|
||||
PREDEFNODE("rra", MERGE(GROUP_ACCU, IDXuRRA)), // ROR + ADC (aka RRD)
|
||||
PREDEFNODE("sax", MERGE(GROUP_ACCU, IDXuSAX)), // store A & X (aka AXS/AAX)
|
||||
PREDEFNODE("lax", MERGE(GROUP_ACCU, IDXuLAX)), // LDX + LDA
|
||||
PREDEFNODE("dcp", MERGE(GROUP_ACCU, IDXuDCP)), // DEC + CMP (aka DCM)
|
||||
PREDEFNODE("isc", MERGE(GROUP_ACCU, IDXuISC)), // INC + SBC (aka ISB aka INS)
|
||||
PREDEFNODE("las", MERGE(GROUP_MISC, IDXuLAS)), // A,X,S = {addr} & S (aka LAR aka LAE)
|
||||
PREDEFNODE("tas", MERGE(GROUP_MISC, IDXuTAS)), // S = A & X {addr} = A&X& {H+1} (aka SHS aka XAS)
|
||||
PREDEFNODE("sha", MERGE(GROUP_ACCU, IDXuSHA)), // {addr} = A & X & {H+1} (aka AXA aka AHX)
|
||||
PREDEFNODE("shx", MERGE(GROUP_MISC, IDXuSHX)), // {addr} = X & {H+1} (aka XAS aka SXA)
|
||||
PREDEFNODE("shy", MERGE(GROUP_MISC, IDXuSHY)), // {addr} = Y & {H+1} (aka SAY aka SYA)
|
||||
PREDEFNODE("asr", MERGE(GROUP_MISC, IDXuASR)), // LSR + EOR (aka ALR)
|
||||
PREDEFNODE("arr", MERGE(GROUP_MISC, IDXuARR)), // ROR + ADC
|
||||
PREDEFNODE("sbx", MERGE(GROUP_MISC, IDXuSBX)), // DEX + CMP (aka AXS aka SAX)
|
||||
PREDEFNODE("isc", MERGE(GROUP_ACCU, IDXuISC)), // INC + SBC (aka ISB/INS)
|
||||
PREDEFNODE("las", MERGE(GROUP_MISC, IDXuLAS)), // A,X,S = {addr} & S (aka LAR/LAE)
|
||||
PREDEFNODE("tas", MERGE(GROUP_MISC, IDXuTAS)), // S = A & X {addr} = A&X& {H+1} (aka SHS/XAS)
|
||||
PREDEFNODE("sha", MERGE(GROUP_ACCU, IDXuSHA)), // {addr} = A & X & {H+1} (aka AXA/AHX)
|
||||
PREDEFNODE("shx", MERGE(GROUP_MISC, IDXuSHX)), // {addr} = X & {H+1} (aka XAS/SXA)
|
||||
PREDEFNODE("shy", MERGE(GROUP_MISC, IDXuSHY)), // {addr} = Y & {H+1} (aka SAY/SYA)
|
||||
PREDEFNODE("alr", MERGE(GROUP_MISC, IDXuALR)), // A = A & arg, then LSR (aka ASR)
|
||||
PREDEFNODE("asr", MERGE(GROUP_MISC, IDXuALR)), // A = A & arg, then LSR (aka ALR)
|
||||
PREDEFNODE("arr", MERGE(GROUP_MISC, IDXuARR)), // A = A & arg, then ROR
|
||||
PREDEFNODE("sbx", MERGE(GROUP_MISC, IDXuSBX)), // X = (A & X) - arg (aka AXS/SAX)
|
||||
PREDEFNODE("nop", MERGE(GROUP_MISC, IDXuNOP)), // combines documented $ea and the undocumented dop/top below
|
||||
PREDEFNODE("dop", MERGE(GROUP_MISC, IDXuDOP)), // "double nop" (skip next byte)
|
||||
PREDEFNODE("top", MERGE(GROUP_MISC, IDXuTOP)), // "triple nop" (skip next word)
|
||||
PREDEFNODE("ane", MERGE(GROUP_MISC, IDXuANE)), // A = (A | ??) & X & arg (aka XAA)
|
||||
PREDEFNODE("lxa", MERGE(GROUP_MISC, IDXuLXA)), // A,X = (A | ??) & arg (aka OAL aka ATX)
|
||||
PREDEFNODE("ane", MERGE(GROUP_MISC, IDXuANE)), // A = (A | ??) & X & arg (aka XAA/AXM)
|
||||
PREDEFNODE("lxa", MERGE(GROUP_MISC, IDXuLXA)), // A,X = (A | ??) & arg (aka LAX/ATX/OAL)
|
||||
PREDEFLAST("jam", MERGE(GROUP_IMPLIEDONLY, 0x02)), // jam/crash/kill/halt-and-catch-fire
|
||||
// ^^^^ this marks the last element
|
||||
};
|
||||
|
||||
// undocumented opcodes of the NMOS 6502 that are _not_ supported by c64dtv2:
|
||||
static struct ronode mnemos_6502undoc2[] = {
|
||||
PREDEFLAST("anc", MERGE(GROUP_MISC, IDXuANC)), // ROL + AND, ASL + ORA (aka AAC)
|
||||
PREDEFLAST("anc", MERGE(GROUP_MISC, IDXuANC)), // A = A & arg, then C=N (aka ANA, ANB)
|
||||
// ^^^^ this marks the last element
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#define RELEASE "0.97" // update before release FIXME
|
||||
#define CODENAME "Zem" // update before release
|
||||
#define CHANGE_DATE "28 Jul" // update before release FIXME
|
||||
#define CHANGE_DATE "29 Jul" // update before release FIXME
|
||||
#define CHANGE_YEAR "2020" // update before release
|
||||
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/"
|
||||
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME
|
||||
|
Binary file not shown.
Binary file not shown.
@ -2,17 +2,22 @@
|
||||
; undocumented opcodes of NMOS 6502:
|
||||
jam ; 02
|
||||
slo ($03, x) ; 03
|
||||
dop $04 ; 04
|
||||
nop $04 ; 04
|
||||
slo $04 ; 07
|
||||
!ifndef C64DTV2 {
|
||||
anc #$0b ; 0b (dtv does not support this)
|
||||
}
|
||||
top ; 0c
|
||||
top $0c0f ; 0c
|
||||
nop $0c0f ; 0c
|
||||
slo $0c0f ; 0f
|
||||
slo ($13), y ; 13
|
||||
dop $14, x ; 14
|
||||
nop $14, x ; 14
|
||||
slo $14, x ; 17
|
||||
slo $1b1b, y ; 1b
|
||||
top $1c1f, x ; 1c
|
||||
nop $1c1f, x ; 1c
|
||||
slo $1c1f, x ; 1f
|
||||
rla ($03, x) ; 23
|
||||
@ -24,6 +29,7 @@
|
||||
rla $1c1f, x ; 3f
|
||||
sre ($03, x) ; 43
|
||||
sre $04 ; 47
|
||||
alr #$0b ; 4b
|
||||
asr #$0b ; 4b
|
||||
sre $0c0f ; 4f
|
||||
sre ($13), y ; 53
|
||||
@ -38,6 +44,8 @@
|
||||
rra $14, x ; 77
|
||||
rra $1b1b, y ; 7b
|
||||
rra $1c1f, x ; 7f
|
||||
dop ; 80
|
||||
dop #$0b ; 80
|
||||
nop #$0b ; 80
|
||||
sax ($03, x) ; 83
|
||||
sax $04 ; 87
|
||||
|
Loading…
Reference in New Issue
Block a user