mirror of
https://github.com/jefftranter/udis.git
synced 2024-10-31 22:05:24 +00:00
z80: fixed pcr for jr, djnz addressing modes.
There was a conflict with jr c,n and ld c,n: jr uses pcr which displays 2 bytes, but ld c,n displays a single byte so they can't use the same address mode. Added the *,pcr address modes
This commit is contained in:
parent
b6d54790f8
commit
83e0830934
19
z80.py
19
z80.py
@ -142,6 +142,7 @@ addressModeTable = {
|
||||
"c,indiy+d" : "c,(iy+${0:02X})",
|
||||
"c,l" : "c,l",
|
||||
"c,n" : "c,${0:02X}",
|
||||
"c,pcr" : "c,${0:04X}",
|
||||
"c,nn" : "c,${1:02X}{0:02X}",
|
||||
"d" : "d",
|
||||
"d,a" : "d,a",
|
||||
@ -269,6 +270,7 @@ addressModeTable = {
|
||||
"m" : "m",
|
||||
"m,nn" : "m,${1:02X}{0:02X}",
|
||||
"n" : "${0:02X}",
|
||||
"n,pcr" : "${0:04X}",
|
||||
"n,indix+d" : "n,(ix+${0:02X})",
|
||||
"n,indiy+d" : "n,(iy+${0:02X})",
|
||||
"nc" : "nc",
|
||||
@ -276,10 +278,11 @@ addressModeTable = {
|
||||
"nc,nn" : "nc,${1:02X}{0:02X}",
|
||||
"nn" : "${1:02X}{0:02X}",
|
||||
"nz" : "nz",
|
||||
"nz,n" : "nz,${0:04X}",
|
||||
"nz,pcr" : "nz,${0:04X}",
|
||||
"nz,nn" : "nz,${1:02X}{0:02X}",
|
||||
"p" : "p",
|
||||
"p,nn" : "p,${1:02X}{0:02X}",
|
||||
"pcr" : "${0:04X}",
|
||||
"pe" : "pe",
|
||||
"pe,nn" : "pe,${1:02X}{0:02X}",
|
||||
"po" : "po",
|
||||
@ -291,7 +294,7 @@ addressModeTable = {
|
||||
"sp,nn" : "sp,${1:02X}{0:02X}",
|
||||
"xy,sp" : "xy,sp",
|
||||
"z" : "z",
|
||||
"z,n" : "z,${0:04X}",
|
||||
"z,pcr" : "z,${0:04X}",
|
||||
"z,nn" : "z,${1:02X}{0:02X}",
|
||||
}
|
||||
|
||||
@ -322,7 +325,7 @@ opcodeTable = {
|
||||
0x0e : [ 2, "ld", "c,n" ],
|
||||
0x0f : [ 1, "rrca", "implied" ],
|
||||
|
||||
0x10 : [ 2, "djnz", "n", pcr ],
|
||||
0x10 : [ 2, "djnz", "pcr", pcr ],
|
||||
0x11 : [ 3, "ld", "de,nn" ],
|
||||
0x12 : [ 1, "ld", "indde,a" ],
|
||||
0x13 : [ 1, "inc", "de" ],
|
||||
@ -330,7 +333,7 @@ opcodeTable = {
|
||||
0x15 : [ 1, "dec", "d" ],
|
||||
0x16 : [ 2, "ld", "d,n" ],
|
||||
0x17 : [ 1, "rla", "implied" ],
|
||||
0x18 : [ 2, "jr", "n", pcr ],
|
||||
0x18 : [ 2, "jr", "pcr", pcr ],
|
||||
0x19 : [ 1, "add", "hl,de" ],
|
||||
0x1a : [ 1, "ld", "a,indde" ],
|
||||
0x1b : [ 1, "dec", "de" ],
|
||||
@ -339,7 +342,7 @@ opcodeTable = {
|
||||
0x1e : [ 2, "ld", "e,n" ],
|
||||
0x1f : [ 1, "rra", "implied" ],
|
||||
|
||||
0x20 : [ 2, "jr", "nz,n", pcr ],
|
||||
0x20 : [ 2, "jr", "nz,pcr", pcr ],
|
||||
0x21 : [ 3, "ld", "hl,nn" ],
|
||||
0x22 : [ 3, "ld", "indnn,hl" ],
|
||||
0x23 : [ 1, "inc", "hl" ],
|
||||
@ -347,7 +350,7 @@ opcodeTable = {
|
||||
0x25 : [ 1, "dec", "h" ],
|
||||
0x26 : [ 2, "ld", "h,n" ],
|
||||
0x27 : [ 1, "daa", "implied" ],
|
||||
0x28 : [ 2, "jr", "z,n", pcr ],
|
||||
0x28 : [ 2, "jr", "z,pcr", pcr ],
|
||||
0x29 : [ 1, "add", "hl,hl" ],
|
||||
0x2a : [ 3, "ld", "hl,indnn" ],
|
||||
0x2b : [ 1, "dec", "hl" ],
|
||||
@ -356,7 +359,7 @@ opcodeTable = {
|
||||
0x2e : [ 2, "ld", "l,n" ],
|
||||
0x2f : [ 1, "cpl", "implied" ],
|
||||
|
||||
0x30 : [ 2, "jr", "nc,n", pcr ],
|
||||
0x30 : [ 2, "jr", "nc,pcr", pcr ],
|
||||
0x31 : [ 3, "ld", "sp,nn" ],
|
||||
0x32 : [ 3, "ld", "indnn,a" ],
|
||||
0x33 : [ 1, "inc", "sp" ],
|
||||
@ -364,7 +367,7 @@ opcodeTable = {
|
||||
0x35 : [ 1, "dec", "indhl" ],
|
||||
0x36 : [ 2, "ld", "indhl,n" ],
|
||||
0x37 : [ 1, "scf", "implied" ],
|
||||
0x38 : [ 2, "jr", "c,n", pcr ],
|
||||
0x38 : [ 2, "jr", "c,pcr", pcr ],
|
||||
0x39 : [ 1, "add", "hl,sp" ],
|
||||
0x3a : [ 3, "ld", "a,indnn" ],
|
||||
0x3b : [ 1, "dec", "sp" ],
|
||||
|
Loading…
Reference in New Issue
Block a user