Given the following location and instruction, find AC, PC and IR. The ones that are filled in I think I have correct, please check. The ones with a question mark, I have no clue, please help.
Location Instruction 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 ? ? ?
Here are the computer instructions
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
This looks suspiciously like code I used to write on an IBM mainframe about 30 years ago, but nothing like masm. Why are you asking here?
This code was made up by the author of my text book (Morris Mano). I am asking here because I need help with this and do not know where else to ask.
it's not made up - it's IBM AIX
c'mon Matt - this is really easy stuff
AC is the accumulator - so - if they do an "LDA 106", then the AC becomes the data at 106 which is 31FA
the HLT instruction essentially loops on itself - so the PC points back to the halt
the answers for the data lines at the bottom, i would put N/A, as they are not executed
IR = instruction register - that one almost does itself
you should be able to fill in the rest
I understand now, thank you. I do not know who designed this forum, but did anyone ever consider implementing a thanks button that users can click to thank others for their useful posts?
I got a bit more of the table filled out. I am still unsure of some of the values for AC.
Location Instruction AC PC IR
100 CLA 0000 101 7800
101 LDA 106 ? 102 2106
102 BUN 104 ? 104 4104
103 HLT ? 104 7001
104 ADD 107 6FC5 105 1105
105 BUN 103 6FC5 103 4103
106 31FA N/A N/A N/A
107 6FC5 N/A N/A N/A