Saturday, August 4, 2007

Undocumented 8085 Instructions

FLAG REGISTER of 8085
Bit undocumented 8085 Remark
7 (MSB) S Mark flag,sign flag
6 Z Zero flag
5 X5,k Originally unused, concerning X5 or k it mentions later
4 AC Auxiliary(Assistant) carry or half carry and for BCD operation revision
3 0 Unused
2 P Parity flag, as for just Z80 CPU overflow flag combined use
1 V Overflow flag or subtraction flag
0 (LSB) C Carry

X5-in case of the usual 8 bit addition and subtraction when the mark of 1st operand S1, the mark of 2nd operand designating the mark of S2 and the operational result as R, it seems that can describe the change of X5 with the formula, X5 = S1 & S2 | S1 & R | S2 & R.
UNDOCUMENTED INSTRUCTIONS OF 8085
Operator cord/code clock
undocumented 8085 Discription

08 10
DSUB HL = HL - BC . Z, S, P, CY, AC and X5, V all flag receives influence
10 7
ARHL,RRHL Rotate HL right. 16-bit rotation, flags unchanged.HL = HL/2 and CY = L0 .
ARHL order is arithmetic right shift of HL register pair. MSB of the H register which means the mark does not change. The least significant bit of L register enters into the CY flag. Just the CY flag changes.
18 10
RDEL,RLDE Rotate DE left. Bit 15 to Carry. No other flags.
DE = DE*2 and E0=CY and CY =D7
20 RIM RIM read interrupt mask
28 10
LDHI imm,ADI HL,bb Add 00bb immediate to HL, setting flags.
DE = HL + imm
30 SIM SIM set interrupt mask.
38 10 LDSI imm,ADI SP,bb Add 00bb immediate to stack pointer, setting flags.
DE < - SP + imm
CB 6/12 RSTV,OVRST8 RST 8 (to 0040) if the V flag is set.
push PC and PC = 0040H
D9 10
SHLX,SHLDE LD [DE],HL.[DE] = HL
DD 7/10
JNX5 addr,JNK addr Jump to location addr if K flag is reset.
if (! X5) PC = addr
ED 10
LHLX,LHLDE LD HL,(DE).HL=[DE]
FD 7/10
JX5 addr,JK addr Jump to location addr if K flag is set.
if (X5) PC = addr

The 8085 is 100% software compatible with the 8080. It was called the 8085 because it's a 5V version of the 8080, which needs +5, +12 and -5 voltage supplies.

3 comments:

Rahul said...

RIm and SIm are parts of documented instructions.

Anonymous said...

thanks for these mnemonics

online casino neteller said...

What words... super, magnificent idea