Discussion:
Five Actions
(too old to reply)
Binaebi Akah
2005-08-18 18:50:17 UTC
Permalink
I'm confused by what the lab is trying to say about the main program
selecting only "five actions: HALT, BRNEQL, LOAD, STORE, ALU." Does this
mean that we don't have a FETCH and EXECUTE in the main program? Would
these be considered part of the LOAD action instead? Also, when are we
displaying our registers? Before, it was in the BRL, but the new BRNEQL
says it won't do anything except put addr into the PC if ACC doesn't
equal zero, and increment the PC if ACC does equal zero.

Thanks,
Binaebi
A. Karl Kornel
2005-08-18 19:31:04 UTC
Permalink
Post by Binaebi Akah
I'm confused by what the lab is trying to say about the main program
selecting only "five actions: HALT, BRNEQL, LOAD, STORE, ALU." Does this
mean that we don't have a FETCH and EXECUTE in the main program? Would
these be considered part of the LOAD action instead?
In Lab 2, your program looked at the opcode and asked these
questions: Is it a HALT? If so, do this... Is it an ADD? If so, do
this... Is it a LOAD? If so, do this... In other words, the main part
of your program had one test for almost every opcode.

In Lab 3, this changes. Your program for Lab 3 should ask these
questions: Is it a HALT? If so, do this... Is it a LOAD? If so, do
this... If it a STORE? If so, do this... Is it an ALU operation? If
so, let the ALU function take care of it! The main part of your program
used to test for each of the four ALU operations, performing the
appropriate action as needed. Now you only need to see if the opcode is
an ALU opcode, and call the alu leaf function if it is.
Post by Binaebi Akah
Also, when are we
displaying our registers? Before, it was in the BRL, but the new BRNEQL
says it won't do anything except put addr into the PC if ACC doesn't
equal zero, and increment the PC if ACC does equal zero.
You display registers at the end of each fetch-execute cycle.
--
=============================
| Alfred Karl Kornel
| -- ***@cse.ohio-state.edu
| Member- Europa Research Group
| UNIX / RESOLVE Consultant
=============================
Loading...