Q1 Solution - Name Student Number Trent University Computer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: ______________________ Student Number: _____________________ Trent University Computer Science 230H Fall 2007 Quiz #1 Topic: ISA Total of 30 marks Open Text Book Duration: 1 hour 1. [8 marks] Consider the following expression: X = A * B – [C / D + E] Write four pieces of assembly language code using instructions and the format provided in the lecture notes - Instruction Comment - using: a) [2] Three-address instructions X = A * B – [C / D + E] Instruction Comment MPY X, A, B X A B DIV T, C, D T C / D ADD T, T, E T T + E SUB X, X, T X X - T b) [2] Two-address instructions X = A * B – [C / D + E] Instruction Comment MOVE X, A X A MPY X, B X A B MOVE T, C T C DIV T, D T T / D ADD T, E T T + E SUB X, T X X - T
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Name: ______________________ Student Number: _____________________ c) [2] One-address instructions X = A * B – [C / D + E] Instruction Comment LOAD C AC C DIV D AC AC / D ADD E AC AC + E STOR X X AC LOAD A
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2010 for the course COMPUTER S COIS-3030 taught by Professor Hircock during the Spring '10 term at Trent University.

Page1 / 5

Q1 Solution - Name Student Number Trent University Computer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online