help with machine language instructions

Discussion in 'Homework Help' started by gammaman, Jun 5, 2009.

  1. gammaman

    Thread Starter Member

    Feb 14, 2009
    29
    0
    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?

    Code ( (Unknown Language)):
    1.                         AC      PC    IR    
    2. 100  CLA                    0000   101   7800
    3. 101  LDA 106              ?        102    ?
    4. 102  BUN 104              ?        104    ?
    5. 103  HLT                    ?        104    7001
    6. 104  ADD 107              ?        105    ?
    7. 105  BUN 103              ?        103    ?
    8. 106  31FA                   ?        ?       ?
    9. 107  6FC5                   ?        ?       ?
    10.  
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Is that Address Counter, Program Counter, and Instruction Register?
     
  3. gammaman

    Thread Starter Member

    Feb 14, 2009
    29
    0
    almost. AC stadands for accululator.
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I think you will need to provide us with a table that shows the Opcode instruction set.

    hgmjr
     
  5. gammaman

    Thread Starter Member

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

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    This -
    does not match very well with -
    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?
     
  7. gammaman

    Thread Starter Member

    Feb 14, 2009
    29
    0
    the numerals on the left are the location followed by the instruction. from that i must find ac,pc,ir.
     
Loading...