Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thx 2. This question is meant to reinforce how a CPU executes program code. We will consider a hypothetical assembly language with only the instructions

Thx
image text in transcribed
image text in transcribed
2. This question is meant to reinforce how a CPU executes program code. We will consider a hypothetical assembly language with only the instructions in Table L, and 10 registers referred to by SrO, .. sr10 instruction meaning example add SrO, Sr1, Sr2 sub $rO, $r1, $r2 mul SrO, Sr1, Sr2 mul SrO, Sr1, 4 addi SrO, St1, 5 addi SrO, St1, 5 mov Sro, St1 add reg1, reg2 reg3 | regl reg2 + reg3 sub reg1, reg2 reg3 | regl reg2-reg3 mul reg1, reg2 reg3 | regi = reg2 * reg3 muli regi, reg2 x I addi regl, reg2, x reg1 reg2 z, where x is some integer subi regl, reg2, x regl - reg2- z, where x is some integer label: mov regi, reg2 name: type, value create type variable in RAM where name - value lw reg, RAM source move word from RAM to a register sw reg, RAMsource move word from register to RANM la reg, RAM source move address of RAM to a register sa reg, RAM.source move address in register to RAM b label beq reg1,reg2,label | jump to label if regi = reg2 blt regl,reg2,label jump to label if regl

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

Describe how to train managers to coach employees. page 404

Answered: 1 week ago

Question

Discuss the steps in the development planning process. page 381

Answered: 1 week ago