Download - PC
Transcript
MACHINE CODE MNEMONlr.S - explanations
{P,re~s~
note thac trn? entry in brackets after each mnemonic does NOT
indicate a correc t op-code: it is only there ; co help you find the
first: appeartJn ce o f
this IT'..nenonic on the chart on page 61)
ABBREVIATIONS
{also see p.61]
c
UNCO//DITIOflAL
CONDITIONAL
r
RELATIVE
u
b
BRANCH OR J UHP
s
SUBROUTINE
v
V£CTO.Q
{Bll v jumps reset
E'LIPF'LOP
FLAG RESET
flp
fs
' P
PROGRAM COUNTER
S
AOC
AD I
ADR
AEX
AllG
AKI
ANO
ANI
ATP
ATT
BCH
8CR
BCS
BHR
BHS
BI I
BIT
BVR
BVS
BZ R
STACK POINTER
tnl :. A+c+c -.e
(~9):
(CC) :
( f'C) :
(SE)
(S 1)
(83)
(85)
(87)
(40)
( ~FJ
:
:
:
:
:
:
:
PAG£ 61 (but not i)
INTO
N-H? COHPAR£ N TO H
@
Z)
C
;.
s ee note I)
A @ t i mer , G@9th bi c
. ... . . . • . •• 1e . . . ....
A . . NO Q !? A
Q ANO ;
Q
A·@ data bus
A @T
r b : P+i @. p
7,
c.rb: I ' ( J::g . P!;i@P
. -.. ; ( C=l,
. ... ; f H=~.
. . .. i f H=t· ,
Q AND i e z
A ANO Q ~ Z
c r b : . i f V=g , P;!:.i @P
. .. . if V=l ,
.... i f Z=O,
. ... if Z=l,
e
(80) :
(8F) :
(8q):
ezs ( 88) :
cov (8E) : ii @ di v -ide l"
CIN (F7) : A-(X/? ,X+1 @X, f s
C?A (!16) : A-Q? see note . 2)
CPI (4C) : Q- i? see note 3)
OCA (SC) : A+(R)+C @ A (BCD]
ocs (9C) : A- (R)-L@ A·· ·· ·
OH ( 42) : Q-1 @ Q
ORL (07) : see note ~l
ORR ( 03) : conve r se of ORL
EAl (80): A XOR i e A
EOR (90) : A XOR (Q) e. A
tlLT ( B1 ) : ha 1 t s KPU:
resume via I E
INC ( 40 l : Q+ l
Q
ITA (BA): INPUT @ A
JHP (BA) : .ub co ; , j
LOA (g~) : Q@ A
LOE (47) : (R) @A , R-1eR
LO I (48) : i
Q
X
LOX ( g8): R/P/S
LI N (4Sl : (R);?A,R+ l@R
LO? (88) : sec note S)
/ID? (38): no ope r at ion
e
e
Ill
SUBTRACT IONS, THE
II/VERSE OF C IS USED
' C
CARRY
{BCOJ IN BINARY DECIMAL CODE
@ R
R+A
Z FLAG
ACCUMUL!.TOR REGISTER
OR CONTl:,Y TS OF REGISTER
ACCORDING TO CONTEXT O!l
eQ
( •11') ' Q+i
( CA):
(Fl) :
( CE) :
(DE):
(G9):
z
0
e
OFF
ORA
OR I
POP
PSH
RDP·
REC
R IE.
(4C):
(US):
(48) :
(gA):
(88):
(Cl!):
( F9):
(BE):
rese t s BF
A OR (Q)
A
Q OR i @ Q
see note 6)
see note 7)
reset s displayflp
9@ C
9 @ IE
ROL
ROR
RPU
RPV
RTI
(08):
(01):
(EJ):
(88):
(SA):
see
note 8)
ROL r eve r sed
S @ PU flp
G @ PV
return from in t erupt
RTN
SSC
SBI
SOE
SOP
SEC
SHL
SHR
SlE
S IN
SJP
(9A) : re turn co Basic
(~C): A-Q- 'C @ A
(31): A·i-l:@A
(43): A@(R) ,R-l @R
(Cl): 1@ displ a y flp
(F8): 1 @C
(09) : A bi t shi ft le ft
(OS): A •.• . • . •. re .
e
t o ma i n rout i ne
(8 1 ):1~1£
(4 1) : A@(R) ,R+l @R
(SE) :usb, nex t i n s t ruction
to stack .
SPU ( E 1 ) : 1 @ PU f 1 p
SPV (A8) : 1 '! . PV . . .
STA (08): A~ Q
ST.X (4A): X @ R/P/ $
TI N (FS): (X)@(Y) ,X+ l fX,
Y+l@Y
TTA (AA): T @ A
VCR (Cl) : c vs b , if C=G
i f Cc: 1
. vcs (C3) :
VEJ (CS): uvsb
VHR (CS}: cvsb, if H=S
if Hc l
VHS (C7):
VMJ ( CO): uvsb , highbyte FF '
1owby~e i
WS (CF): cvsb,,f ;Ji: l , Z reset
VZR (C9) : cvsti, i f Z=G
VZS (CS) '
if z-1
NOTE S
1) High order 4 bits exchan ged -with low o rder 4 bi t s
2) If A)Q then Cel and Z=O
i f Ao Q then C=l and 2::;'1
i. f A <O t:.llen CoO And Z=O
3) IF Q>i , e t c 1 as above
4) Lef~ rotation between A and (R) in units of 4 bits
5) When sub tracting l franUL produces borr~,then next step .
If no borrow, r~lative jump accordi n g to j
6) conten t s · of S returned too. It O='A, s~s+l
bu t i f ~R t hen s~s+z
7) contents o f O stacked QS directed by S.
If Q::i'A then s~ S-1, but i f O=R then S=S- 2
8) contents of A rotated left through C
72
Do not sell this PDF !!!