8-Bit-Ladebefehle
A | B | C | D | E | H | L | (HL) | (BC) | (DE) | (nn) | n | |
LD A,. | 7F | 78 | 79 | 7A | 7B | 7C | 7D | 7E | 0A | 1A | 3Axxxx | 3Exx |
LD B,. | 47 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 06xx | |||
LD C,. | 4F | 48 | 49 | 4A | 4B | 4C | 4D | 4E | 0Exx | |||
LD D,. | 57 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 16xx | |||
LD E,. | 5F | 58 | 59 | 5A | 5B | 5C | 5D | 5E | 1Exx | |||
LD H,. | 67 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 26xx | |||
LD L,. | 6F | 68 | 69 | 6A | 6B | 6C | 6D | 6E | 2Exx | |||
LD (HL),. | 77 | 70 | 71 | 72 | 73 | 74 | 75 | 36xx | ||||
LD (BC),. | 02 | |||||||||||
LD (DE),. | 12 | |||||||||||
LD (nn),. | 32xxxx |
A | B | C | D | E | H | L | |
LD .,(IX+d) | DD7Exx | DD46xx | DD4Exx | DD56xx | DD5Exx | DD66xx | DD6Exx |
LD .,(IY+d) | FD7Exx | FD46xx | FD4Exx | FD56xx | FD5Exx | FD66xx | FD6Exx |
LD (IX+d),. | DD77xx | DD70xx | DD71xx | DD72xx | DD73xx | DD74xx | DD75xx |
LD (IX+d),. | FD77xx | FD70xx | FD71xx | FD72xx | FD73xx | FD74xx | FD75xx |
LD (IX+d),n | DD36ddnn | ||||||
LD (IX+d),n | FD36ddnn |
S | Z | H | P/V | N | C | ||
LD A,I | ED57 | * | * | 0 | * | 0 | - |
LD A,R | ED5F | * | * | 0 | * | 0 | - |
LD I,A | ED47 | - | - | - | - | - | - |
LD R,A | ED4F | - | - | - | - | - | - |
16-Bit-Ladebefehle
BC | DE | HL | SP | IX | IY | |
LD .., nn | 01xxxx | 11xxxx | 21xxxx | 31xxxx | DD21xxxx | FD21xxxx |
LD ..,(nn) | ED4Bxxxx | ED5BxxX | 2Axxxx | ED7Bxxxx | DD2Axxxx | FD2Axxxx |
LD (nn),.. | ED43xxxx | ED53xxxx | 22xxxx | ED73xxxx | DD22xxxx | FD22xxxx |
LD SP,.. | F9 | DDF9 | FDF9 |
BC | DE | HL | AF | IX | IY | |
PUSH .. | C5 | D5 | E5 | F5 | DDE5 | FDE5 |
POP .. | C1 | D1 | E1 | F1 | DDE1 | FDE1 |
Registeraustauschbefehle
EX (SP),HL | E3 | |
EX (SP),IX | DDE3 | |
EX (SP),IY | FDE3 | |
EX DE,HL | EB | Die 16-Bit-Inhalte der Registerpaare DE und HL werden ausgetauscht. DE <-> HL E <-> L D <-> H |
EXAF | 08 | |
EXX | D9 | (BC-BC' DE-DE' HL-HL') |
Blocktransfer- und Suchbefehle
S | Z | H | P/V | N | C | |||
LDI | EDA0 | - | - | 0 | * | 0 | - | LD (DE), (HL); INC HL; INC DE; DEC BC |
LDIR | EDB0 | - | - | 0 | 0 | 0 | - | wie LDI, wiederholen bis BC=0 |
LDD | EDA8 | - | - | 0 | * | 0 | - | LD (DE), (HL); DEC HL; DEC DE; DEC BC |
LDDR | EDB8 | - | - | 0 | 0 | 0 | - | wie LDD, wiederholen bis BC=0 |
CPI | EDA1 | * | * | * | * | 1 | - | LD A,(HL); INC HL, DEC BC |
CPIR | EDB1 | * | * | * | * | 1 | - | wie CPI, wiederholen bis BC=0 oder Zeichen gefunden |
CPD | EDA9 | * | * | * | * | 1 | - | LD A,(HL); DEC HL, DEC BC |
CPDR | EDB9 | * | * | * | * | 1 | - | wie CPD, wiederholen bis BC=0 oder Zeichen gefunden |
Sprungbefehle
Z | NZ | C | NC | PE | PC | M | P | |
JP.. | CAxxxx | C2xxxx | DAxxxx | D2xxxx | EAxxxx | E2xxxx | FAxxxx | F2xxxx |
CA.. | CCxxxx | C4xxxx | DCxxxx | D4xxxx | ECxxxx | E4xxxx | FCxxxx | F4xxxx |
RE.. | C8 | C0 | D8 | D0 | E8 | E0 | F8 | F0 |
JR.. | 28xx | 20xx | 38xx | 30xx |
unbedingt | (HL) | (IX) | (IY) | |
JMP | C3xxxx | E9 | DDE9 | FDE9 |
CALL | CDxxxx | |||
RET | C9 | |||
JR | 18xx |
00h | 08h | 10h | 18h | 20h | 28h | 30h | 38h | |
RST | C7 | CF | D7 | DF | E7 | EF | F7 | FF |
DJNZ | 10xx | DEC B; JRNZ e |
RETI | ED4D | zurück vom Interrupt |
RETN | ED45 | zurück vom nicht maskierbaren Interrupt |
spezielle Akkumulator- und Flagbefehle
S | Z | H | P/V | N | C | |||
DAA | 27 | * | * | * | * | - | * | BCD-Korrektur im A-Register |
CPL | 2F | - | - | 1 | - | 1 | - | Komplementiere A-Register (1er-Komplement) |
NEG | ED44 | * | * | * | * | 1 | * | Komplementiere A-Register (2er-Komplement) |
CCF | 3F | - | - | * | - | 0 | * | Komplementiere Carry-Flag |
SCF | 37 | - | - | 0 | - | 0 | 1 | Setze Carry Flag |
INF | ED70 | * | * | ? | * | 0 | - | Setzen des Flag Registers |
CPU-Steuerbefehle
S | Z | H | P/V | N | C | |||
NOP | 00 | - | - | - | - | - | - | Leerbefehl |
HALT | 76 | - | - | - | - | - | - | hält CPU an |
EI | FB | - | - | - | - | - | - | Interrupts freigeben |
DI | F3 | - | - | - | - | - | - | Interrupts sperren |
IM 0 | ED46 | - | - | - | - | - | - | Interrupt-Modus 0 |
IM 1 | ED56 | - | - | - | - | - | - | Interrupt-Modus 1 |
IM 2 | ED5E | - | - | - | - | - | - | Interrupt-Modus 2 |
Ein-/Ausgabebefehle
(Kanaladresse in C)
A | B | C | D | E | H | L | S | Z | H | P/V | N | C | |
IN | ED78 | ED40 | ED48 | ED50 | ED58 | ED60 | ED68 | * | * | 0 | * | 0 | - |
OUT | ED79 | ED41 | ED49 | ED51 | ED59 | ED61 | ED69 | - | - | - | - | - | - |
(Kanaladresse in C)
S | Z | H | P/V | N | C | |||
IN n | DBxx | - | - | - | - | - | - | Kanaladresse 'n' |
OUT n | D3xx | - | - | - | - | - | - | Kanaladresse 'n' |
INI | EDA2 | ? | * | ? | ? | 1 | - | IN (HL),(C); INC HL; DEC B |
INIR | EDB2 | ? | 1 | ? | ? | 1 | - | wie INI, wiederholen solange B<>0 |
IND | EDAA | ? | * | ? | ? | 1 | - | IN (HL),(C); DEC HL; DEC B |
INDR | EDBA | ? | 1 | ? | ? | 1 | - | wie IND, wiederholen solange B<>0 |
OUTI | EDA3 | ? | * | ? | ? | 1 | - | OUT (C),(HL); INC HL; DEC B |
OTIR | EDB3 | ? | 1 | ? | ? | 1 | - | wie OUTI, wiederholen solange B<>0 |
OUTD | EDAB | ? | * | ? | ? | 1 | - | OUT (C),(HL); DEC HL; DEC B |
OTDR | EDBB | ? | 1 | ? | ? | 1 | - | wie OUTD, wiederholen solange B<>0 |
8-Bit Arithmetische und Logische Befehle
B | C | D | E | H | L | (HL) | A | n | (IX+d) | (IY+d) | S | Z | H | P/V | N | C | |
ADD | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | C6xx | DD86xx | FD86xx | * | * | * | * | 0 | * |
ADC | 88 | 89 | 8A | 8B | 8C | 8D | 8E | 8F | CExx | DD8Exx | FD8Exx | * | * | * | * | 0 | * |
SUB | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | D6xx | DD96xx | FD96xx | * | * | * | * | 1 | * |
SBC | 98 | 99 | 9A | 9B | 9C | 9D | 9E | 9F | DExx | DD9Exx | FD9Exx | * | * | * | * | 1 | * |
AND | A0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | E6CC | DDA6xx | FDA6xx | * | * | 1 | * | 0 | 0 |
XOR | A8 | A9 | AA | AB | AC | AD | AE | AF | EExx | DDAExx | FDAExx | * | * | 1 | * | 0 | 0 |
OR | B0 | B1 | B2 | B3 | B4 | B5 | B6 | B7 | F6xx | DDB6xx | FDB6xx | * | * | 1 | * | 0 | 0 |
CMP | B8 | B9 | BA | BB | BC | BD | BE | BF | FExx | DDBExx | FDBExx | * | * | * | * | 1 | * |
INC | 04 | 0C | 14 | 1C | 24 | 2C | 34 | 3C | DD34xx | FD34xx | * | * | * | * | 0 | - | |
DEC | 05 | 0D | 15 | 1D | 25 | 2D | 35 | 3D | DD35xx | FD35xx | * | * | * | * | 1 | - |
Rotations- und Schiebebefehle
B | C | D | E | H | L | (HL) | A | (IX+d) | (IY+d) | S | Z | H | P/V | N | C | ||
RR | CB18 | CB19 | CB1A | CB1B | CB1C | CB1D | CB1E | CB1F | DDCBxx1B | FDCBxx1E | * | * | 0 | * | 0 | * | Rotiere Reg rechts durch Carry |
RL | CB10 | CB11 | CB12 | CB13 | CB14 | CB15 | CB16 | CB17 | DDCBxx16 | FDCBxx16 | * | * | 0 | * | 0 | * | Rotiere Reg links durch Carry |
RRC | CB08 | CB09 | CB0A | CB0B | CB0C | CB0D | CB0E | CB0F | DDCBxx0E | FDCBxx0E | * | * | 0 | * | 0 | * | Rotiere Reg rechts |
RLC | CB00 | CB01 | CB02 | CB03 | CB04 | CB05 | CB06 | CB07 | DDCBxx06 | FDCBxx06 | * | * | 0 | * | 0 | * | Rotiere Reg links |
SRA | CB28 | CB29 | CB2A | CB2B | CB2C | CB2D | CB2E | CB2F | DDCBxx2E | FDCBxx2E | * | * | 0 | * | 0 | * | Shift Reg rechts/links arithmetisch |
SLA | CB20 | CB21 | CB22 | CB23 | CB24 | CB25 | CB26 | CB27 | DDCBxx26 | FDCBxx36 | * | * | 0 | * | 0 | * | Shift Reg rechts/links arithmetisch |
SRL | CB38 | CB39 | CB3A | CB3B | CB3C | CB3D | CB3E | CB3F | DDCBxx3E | FDCBxx3E | * | * | 0 | * | 0 | * | Shift Reg rechts/links logisch |
S | Z | H | P/V | N | C | |||
RRCA | 0F | - | - | 0 | - | 0 | * | Rotiere A-Register rechts |
RLCA | 07 | - | - | 0 | - | 0 | * | Rotiere A-Register links |
RRA | 1F | - | - | 0 | - | 0 | * | Rotiere A-Register rechts durch Carry |
RLA | 17 | - | - | 0 | - | 0 | * | Rotiere A-Register links durch Carry |
RLD (HL) | ED6F | * | * | 0 | * | 0 | - | Rotiere Ziffer links zwischen A-Register und (HL) |
RRD (HL) | ED67 | * | * | 0 | * | 0 | - | Rotiere Ziffer rechts zwischen A-Register und (HL) |
Einzelbitbefehle
B | C | D | E | H | L | (HL) | A | (IX+d) | (IY+d) | S | Z | H | P/V | N | C | |
BIT 0,. | CB40 | CB41 | CB42 | CB43 | CB44 | CB45 | CB46 | CB47 | DDCBxx46 | FDCBxx46 | ? | * | 1 | ? | 0 | - |
BIT 1,. | CB48 | CB49 | CB4A | CB4B | CB4C | CB4D | CB4E | CB4F | DDCBxx4E | FDCBxx4E | ? | * | 1 | ? | 0 | - |
BIT 2,. | CB50 | CB51 | CB52 | CB53 | CB54 | CB55 | CB56 | CB57 | DDCBxx56 | FDCBxx56 | ? | * | 1 | ? | 0 | - |
BIT 3,. | CB58 | CB59 | CB5A | CB5B | CB5C | CB5D | CB5E | CB5F | DDCBxx5E | FDCBxx5E | ? | * | 1 | ? | 0 | - |
BIT 4,. | CB60 | CB61 | CB62 | CB63 | CB64 | CB65 | CB66 | CB67 | DDCBxx66 | FDCBxx66 | ? | * | 1 | ? | 0 | - |
BIT 5,. | CB68 | CB69 | CB6A | CB6B | CB6C | CB6D | CB6E | CB6F | DDCBxx6E | FDCBxx6E | ? | * | 1 | ? | 0 | - |
BIT 6,. | CB70 | CB71 | CB72 | CB73 | CB74 | CB75 | CB76 | CB77 | DDCBxx76 | FDCBxx76 | ? | * | 1 | ? | 0 | - |
BIT 7,. | CB78 | CB79 | CB7A | CB7B | CB7C | CB7D | CB7E | CB7F | DDCBxx7E | FDCBxx7E | ? | * | 1 | ? | 0 | - |
RES 0,. | CB80 | CB81 | CB82 | CB83 | CB84 | CB85 | CB86 | CB87 | DDCBxx86 | FDCBxx86 | - | - | - | - | - | - |
RES 1,. | CB88 | CB89 | CB8A | CB8B | CB8C | CB8D | CB8E | CB8F | DDCBxx8E | FDCBxx8E | - | - | - | - | - | - |
RES 2,. | CB90 | CB91 | CB92 | CB93 | CB94 | CB95 | CB96 | CB97 | DDCBxx96 | FDCBxx96 | - | - | - | - | - | - |
RES 3,. | CB98 | CB99 | CB9A | CB9B | CB9C | CB9D | CB9E | CB9F | DDCBxx9E | FDCBxx9E | - | - | - | - | - | |
RES 4,. | CBA0 | CBA1 | CBA2 | CBA3 | CBA4 | CBA5 | CBA6 | CBA7 | DDCBxxA6 | FDCBxxA6 | - | - | - | - | - | - |
RES 5,. | CBA8 | CBA9 | CBAA | CBAB | CBAC | CBAD | CBAE | CBAF | DDCBxxAE | FDCBxxAE | - | - | - | - | - | - |
RES 6,. | CBB0 | CBB1 | CBB2 | CBB3 | CBB4 | CBB5 | CBB6 | CBB7 | DDCBxxB6 | FDCBxxB6 | - | - | - | - | - | - |
RES 7,. | CBB8 | CBB9 | CBBA | CBBB | CBBC | CBBD | CBBE | CBBF | DDCBxxBE | FDCBxxBE | - | - | - | - | - | - |
SET 0,. | CBC0 | CBC1 | CBC2 | CBC3 | CBC4 | CBC5 | CBC6 | CBC7 | DDCBxxC6 | FDCBxxC6 | - | - | - | - | - | - |
SET 1,. | CBC8 | CBC9 | CBCA | CBCB | CBCC | CBCD | CBCE | CBCF | DDCBxxCE | FDCBxxCE | - | - | - | - | - | - |
SET 2,. | CBD0 | CBD1 | CBD2 | CBD3 | CBD4 | CBD5 | CBD6 | CBD7 | DDCBxxD6 | FDCBxxD6 | - | - | - | - | - | - |
SET 3,. | CBD8 | CBD9 | CBDA | CBDB | CBDC | CBDD | CBDE | CBDF | DDCBxxDE | FDCBxxDE | - | - | - | - | - | - |
SET 4,. | CBE0 | CBE1 | CBE2 | CBE3 | CBE4 | CBE5 | CBE6 | CBE7 | DDCBxxE6 | FDCBxxE6 | - | - | - | - | - | - |
SET 5,. | CBE8 | CBE9 | CBEA | CBEB | CBEC | CBED | CBEE | CBEF | DDCBxxEE | FDCBxxEE | - | - | - | - | - | - |
SET 6,. | CBF0 | CBF1 | CBF2 | CBF3 | CBF4 | CBF5 | CBF6 | CBF7 | DDCBxxF6 | FDCBxxF6 | - | - | - | - | - | - |
SET 7,. | CBF8 | CBF9 | CBFA | CBFB | CBFC | CBFD | CBFE | CBFF | DDCBxxFE | FDCBxxFE | - | - | - | - | - | - |
Flag-Register
BIT | gesetzt | nicht gesetzt | wird gesetzt bei | ||
0 | C |
Carry-Flag |
C
M |
NC
NZ |
Übertrag von Bit 7 gerader Parität Übertrag von Bit 3 Ergebnis 0 neg. Ergebnis |
1 | N | Add-/Subtract-Flag | Subtraktion | ||
2 | P/V | Parity-/Overflow-Flag | PE | PO | |
3 | nicht verwendet | ||||
4 | H | Half-Carry-Flag | |||
5 | nicht verwendet | ||||
6 | Z | Zero-Flag | Z |
||
7 | S | Sign-Flag |
Beeinflussung der Flags:
1 gesetzt
0 zurückgesetzt
* abhängig vom Ergebnis einer Operation
- nicht beeinflusst
? unbestimmt
Quellen: Z1013-Handbuch
© Holger Krull
Stand: 01. Januar 2008