Wishlist of instructions for the Z80 ==================================== Sometime in about 1985 or 1986, Greg Heslington and I put together a list of additional instructions that it would be useful if the Z80 had. We worked out that almost all of them could be actually assembled to Z80 code by an assembler that understood the additional instructions, for instance, by defining macros. 8-bit data movement ------------------- LD r,r LD r,n LD r,(rr+n) LD (rr+n),r LD r,(nn) LD (nn),r 16-bit data movement -------------------- LD rr,rr LD rr,nn LD rr,(rr+n) LD (rr+n),rr LD rr,(nn) LD (nn),rr PUSH rr POP rr 8-bit arithmetic ---------------- alu r,r alu r,n alu r,(rr+n) alu (rr+n),r alu r,(nn) alu (nn),r INC r DEC r INC (rr+n) DEC (rr+n) INC (nn) DEC (nn) 16-bit arithmetic ----------------- alu rr,rr alu rr,nn alu rr,(rr+n) alu (rr+n),rr alu rr,(nn) alu (nn),rr INC rr DEC r INC (rr+n) DEC (rr+n) INC (nnnn) DEC (nnnn) Rotations/Bit operations ------------------------ rot r rot (rr+n) rot (nn) bit n,r bit n,(rr+n) bit n,(nn) Exchanges --------- EX r,r EX r,(rr+n) EX r,(nn) EX rr,rr EX rr,(rr+n) EX rr,(nn) Program control --------------- CALL rr CALL nn CALL (rr+n) CALL (nn) CALL cc,rr CALL cc,nn CALL cc,(rr+n) CALL cc,(nn) JP rr JP nn JP (rr+n) JP (nn) JP cc,rr JP cc,nn JP cc,(rr+n) JP cc,(nn) RET RET cc JR nn JR cc,nn Block Copy/Etc -------------- {LD,CP}{I,D}{,R} Input/Output ------------ IN r,(rr) OUT (rr),r IN r,(nn) OUT (nn),r IN{I,D}{,R} OT{I,D}{,R} Other Instructions ------------------ SCF CCF NEG CPL RLD RRD DAA NOP DJNZ RST nn EI DI IM n RETN RETI LD A,R LD R,A LD A,I LD I,A EXX EX AF,AF' Abbreviations ------------- r: A F B C D E H L IXL IXH IYL IYH rr: AF BC DE HL IX IY SP PC alu: ADD ADC SUB SBC AND XOR OR CP rot: RLC RRC RL RR SLA SRA SLS SRL bit: BIT RES SET cc: C NC Z NZ P M PE PO nn: 16-bit immediate n: 8-bit immediate