Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update P2rev2.c #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions P2rev2.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File: P2_Rev1.c
* Authors: Dawit Amare, Zachary Clark-Williams
* Dat Last Revised: 08/03/2017
* Date Last Revised: 08/03/2017
*
* ECE 586 Computer Architecture
* Project 2 - Emulator
Expand Down Expand Up @@ -159,61 +159,61 @@ int main(int argc, char** argv)
case 128: // Jump To Instruction Pointed To By Immediate Value (Operand1)
PC = Oprnd1;
break;
case 130: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Equal to Contents of Third Reg
case 130: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Equal to Contents of Third Reg
if(Reg[Oprnd2] == Reg[Oprnd3])
{
PC = Oprnd1;
}
break;
case 131: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Equal to Immediate Value
case 131: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Equal to Immediate Value
if(Reg[Oprnd2] == Oprnd3)
{
PC = Oprnd1;
}
break;
case 132: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Less Than Contents of Third Reg
case 132: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Less Than Contents of Third Reg
if(Reg[Oprnd2] < Reg[Oprnd3])
{
PC = Oprnd1;
}
break;
case 133: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Less Than Immediate Value
case 133: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Less Than Immediate Value
if(Reg[Oprnd2] < Oprnd3)
{
PC = Oprnd1;
}
break;
case 134: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Less Than Or Equal to Contents of Third Reg
case 134: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Less Than Or Equal to Contents of Third Reg
if(Reg[Oprnd2] <= Reg[Oprnd3])
{
PC = Oprnd1;
}
break;
case 135: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Less Than Or Equal To Immediate Value
case 135: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Less Than Or Equal To Immediate Value
if(Reg[Oprnd2] <= Oprnd3)
{
PC = Oprnd1;
}
break;
case 136: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Greater Than Contents of Third Reg
case 136: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Greater Than Contents of Third Reg
if(Reg[Oprnd2] > Reg[Oprnd3])
{
PC = Oprnd1;
}
break;
case 137: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Greater Than Immediate Value
case 137: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Greater Than Immediate Value
if(Reg[Oprnd2] > Oprnd3)
{
PC = Oprnd1;
}
break;
case 138: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Greater Than Or Equal to Contents of Third Reg
case 138: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Greater Than Or Equal to Contents of Third Reg
if(Reg[Oprnd2] >= Reg[Oprnd3])
{
PC = Oprnd1;
}
break;
case 139: // Branch To Instruction Addr pointed top be Immediate value (Operand1) If Second Reg Contents is Greater Than Or Equal To Immediate Value
case 139: // Branch To Instruction Addr pointed to by Immediate value (Operand1) If Second Reg Contents is Greater Than Or Equal To Immediate Value
if(Reg[Oprnd2] >= Oprnd3)
{
PC = Oprnd1;
Expand Down