======================================================== Notes and answers for Lab 09 (MARIE / Assembly Language) ======================================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Not all questions will be marked - check all your answers against this answer sheet: References: ECOA2e Section 4.1-4.6, 4.8.1-4.9.1, 4.9.3, 4.10, 4.11.1, 5.4.2 and associated Chapter Slides Class Notes (via course home page): text_errata.txt Not all questions will be marked - check all your answers against the answer sheet when it is posted. AC IR MAR MBR PC load x 0020 1004 004 0020 001 add y 0011 3005 005 FFF1 002 store z 0011 2006 006 0011 003 halt 0011 7000 003 XXXX 004 XXXX = 0011 or 7000 2.Hand-assemble (without using MARIE) and answer on separate paper Question 13 on page 239. 1108 3109 9106 3109 2108 7000 3108 9103 0023 0001 3.Answer on separate paper Question 14 on page 239. A 108 One 109 S1 106 S2 103 4.Question 15a p.239: i) Store 007 ii) Jump 00B iii) Add 009 5.Read Address Modes, Section 5.4.2, and refer to Figure 5.3, Table 5.1, and Question 13 p.277. Given the instruction LOAD 2000, determine the actual value loaded into the accumulator and fill in the Addressing Move table below if the index register R1 contains the value 2100: Immediate 2000 Direct 2200 Indirect 2600 Indexed (with R1) 3600 Note that most MARIE instructions are Direct Addressing. MARIE has no Immediate or Indexed Addressing instructions and only two Indirect Addressing instructions: AddI and JumpI. (MARIE has no SubI, LoadI, or StoreI - a real computer ISA would be more consistent and permit more address modes.) 6.Give the RTL/RTN for a new MARIE LoadI instruction: MAR <-- X MBR <-- M[MAR] MAR <-- MBR MBR <-- M[MAR] AC <-- MBR 7.On separate paper, fill in the four-element addressing mode table for Question 13, p.277. Immediate 1000 Direct 1400 Indirect 1300 Indexed (with R1) 1000 8.On separate paper, fill in the four-element addressing mode table for Question 14, p.277. Immediate 500 Direct 100 Indirect 600 Indexed (with R1) 800