Professional Documents
Culture Documents
The memory-reference ADD instruction always places the carry-out into the extended
accumulator (E) be it 0 or 1.
ISZ
The only memory-reference instruction not discussed in either Subroutine to Subtract
or Register Instruction Exercise is
ISZ - increment DR (loaded with M[AR]) and skip (increment PC) if DR is zero
ISZ takes 3 clock
cycles to execute:
6xxx, Exxx
D6T4:
D6T5:
D6T6:
PROGRAM OUTPUT
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 0
Recently modified memory cells
Cell
Contents
200
7002
SZE
201
7001
HLT
202
7004
SZA
203
7001
HLT
204
7200
CMA
205
7008
SNA
206
7001
HLT
207
7010
SPA
208
1300
ADD_data_1
209
7020
INC
20a
7040
CIL
20b
7020
INC
DR M[AR]
DR DR+1
M[AR] DR, if( DR=0 ) then( PC PC+1 ),
20c
7100
CME
20d
7080
CIR
20e
7400
CLE
20f
7001
HLT
300
7899
Data_1
Flags
S=1 I=0 D=0 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 000
0000 0000 0000 0
PC => 200
0010 0000 0000 512
IR =>0000
0000 0000 0000 0000 0
DR =>0000
0000 0000 0000 0000 0
AC =>0000
0000 0000 0000 0000 0
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
null instruction
null
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 4
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=7 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 002
0000 0000 0010 2
PC => 202
0010 0000 0010 514
IR =>7002
0111 0000 0000 0010 28674
DR =>0000
0000 0000 0000 0000 0
AC =>0000
0000 0000 0000 0000 0
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
SZE instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 8
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=7 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 004
0000 0000 0100 4
PC => 204
0010 0000 0100 516
IR =>7004
0111 0000 0000 0100 28676
DR =>0000
0000 0000 0000 0000 0
AC =>0000
0000 0000 0000 0000 0
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
SZA instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 12
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=7 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 200
0010 0000 0000 512
PC => 205
0010 0000 0101 517
IR =>7200
0111 0010 0000 0000 29184
DR =>0000
0000 0000 0000 0000 0
AC =>FFFF
1111 1111 1111 1111 -1
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
CMA instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 16
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=7 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 008
0000 0000 1000 8
PC => 207
0010 0000 0111 519
IR =>7008
0111 0000 0000 1000 28680
DR =>0000
0000 0000 0000 0000 0
AC =>FFFF
1111 1111 1111 1111 -1
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
SNA instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 20
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=7 E=0 R=0 IEN=0 FGI=0 FGO=0
AR => 010
0000 0001 0000 16
PC => 208
0010 0000 1000 520
IR =>7010
0111 0000 0001 0000 28688
DR =>0000
0000 0000 0000 0000 0
AC =>FFFF
1111 1111 1111 1111 -1
TR =>0000
0000 0000 0000 0000 0
INPR => 00
0000 0000
0
OUTR => 00
0000 0000
0
SPA instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 25
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=1 I=0 D=1 E=1 R=0 IEN=0 FGI=1 FGO=0
AR => 300
0011 0000 0000 768
PC => 209
0010 0000
IR =>1300
0001 0011 0000
DR =>7899
0111 1000 1001
AC =>7898
0111 1000 1001
TR =>0000
0000 0000 0000
INPR => A3
1010 0011
OUTR => 00
0000 0000
ADD instruction
memory referencing--direct
1001
0000
1001
1000
0000
521
4864
30873
30872
0
163
0
addressing mode
TR =>0000
0000 0000 0000 0000
INPR => A3
1010 0011
OUTR => 00
0000 0000
INC instruction
register type
0
163
0
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 53
Recently modified memory cells
Cell
Contents
null
none modified
Flags
S=0 I=0 D=7 E=0 R=0 IEN=0 FGI=1 FGO=0
AR => 001
0000 0000 0001 1
PC => 210
0010 0001 0000 528
IR =>7001
0111 0000 0000 0001 28673
DR =>7899
0111 1000 1001 1001 30873
AC =>F89A
1111 1000 1001 1010 -1894
TR =>0000
0000 0000 0000 0000 0
INPR => A3
1010 0011
163
OUTR => 00
0000 0000
0
HLT instruction
register type
****.- ..-. ....- ...- -...******
Mano CPU state at time
Clock cycle = 53
Memory dump follows:
Cell
Contents
200
7002
SZE
202
7004
SZA
204
7200
CMA
205
7008
SNA
207
7010
SPA
208
1300
ADD_data_1
209
7020
INC
20a
7040
CIL
20b
7020
INC
20c
7100
CME
20d
7080
CIR
20e
7400
CLE
300
7899
Data_1