OpenCores
Issue List
Undocumented opcode support #1
Open NULL opened this issue 9 months ago
NULL commented 9 months ago

Any plans to implement/archive some of the undocumented opcodes?

I use the undocumented negate-with-carry instructions (opcodes $42, $52, $62, $72) for multi-byte math and to negate the D register. I believe these are equivalent to issuing a "subtract-with-carry" from zero. The others I use from time-to-time are the sign-extend instructions ($02, $03) that affect the A register.

The others I believe to be variations of add/complement/with or without carry. These are taken from the work done by James Tamer in the former TRS-80 MC-10 Yahoo newsgroup:

$02 IF C then A=#$FF else A=#$00, does not affect flags $03 A=#$FF, does not affect flags $12 a = a - b - c $13 a = a - b - 1 $14 B = A - (not C) $15 A = B - 1 $18 A=A+B similar to ABA, different C and H flags $1A A=A+B similar to ABA, same as IL18_03 $1C B= (A - 1) $1D A = B - 1 $1E B = A $1F A=B, set carry $41 similar to TSTA? $42 A = 0 - (A + C) $45 LSR A $4B DEC A $51 similar to TSTB? $52 B = 0 - (B + C) $55 LSR B $5B DEC B $61 similar to TST x? $62 x = 0 - (x + C) $65 LSR x $6B DEC x $71 similar to TST M? $72 M = 0 - (M + C) $75 LSR m $7B DEC m

Hopefully someone will be able to test and/or archive these before the original chips are lost to the effects of time.

Best, Greg


Assignee
No one
Labels
Request