help with machine language instructions

Thread Starter

gammaman

Joined Feb 14, 2009
29
I have an idea of what I am doing but I need some help.


Given the following information, I am supposed to find AC,PC, and IR
I have filled in the parts that I think are correct. The parts with the question mark mean I have no clue. Can someone please help me?

Rich (BB code):
                        AC      PC    IR    
100  CLA                    0000   101   7800
101  LDA 106              ?        102    ?
102  BUN 104              ?        104    ?
103  HLT                    ?        104    7001
104  ADD 107              ?        105    ?
105  BUN 103              ?        103    ?
106  31FA                   ?        ?       ?
107  6FC5                   ?        ?       ?
 

Thread Starter

gammaman

Joined Feb 14, 2009
29
oh yeah sorry I forgot that the author of the text wrote his own machine.
Rich (BB code):
AND   0xxx   8xxx       AND memory word to AC
ADD   1xxx   9xxx       Add memeory word to AC
LDA   2xxx    Axxx       Load mem to AC
STA   3xxx   Bxxx        store content of ac in mem 
BUN    4xxx   Cxxx       branch unconditionally
BSA    5xxx   Dxxx       branch and save return address
ISZ     6xxx   Exxx       increment and skip if zero
 
CLA     7800     clear ac
CLE      7400    clear e
CMA     7200    comliment ac
CME     7100    compliment e
CIR      7080    circulate right ac and e
CIL      7040    circulate left ac and e
INC      7020   increment ac
HLT      7001    halt computer
 

beenthere

Joined Apr 20, 2004
15,819
This -
AC PC IR
100 CLA 0000 101 7800
101 LDA 106 ? 102 ?
102 BUN 104 ? 104 ?
103 HLT ? 104 7001
104 ADD 107 ? 105 ?
105 BUN 103 ? 103 ?
106 31FA ? ? ?
107 6FC5
does not match very well with -
AND 0xxx 8xxx AND memory word to AC
ADD 1xxx 9xxx Add memeory word to AC
LDA 2xxx Axxx Load mem to AC
STA 3xxx Bxxx store content of ac in mem
BUN 4xxx Cxxx branch unconditionally
BSA 5xxx Dxxx branch and save return address
ISZ 6xxx Exxx increment and skip if zero

CLA 7800 clear ac
CLE 7400 clear e
CMA 7200 comliment ac
CME 7100 compliment e
CIR 7080 circulate right ac and e
CIL 7040 circulate left ac and e
INC 7020 increment ac
HLT
In the first example, those numeral on the left might be line numbers. What is the significance of the numeric values to the right of the mnemonics in the second example?
 
Top