Question: Using C programming language write a program that simulates the Tiny Machine Architecture. Your code must implement the basic instruction set that the Tiny Machine




Using C programming language write a program that simulates the Tiny Machine Architecture. Your code must implement the basic instruction set that the Tiny Machine Architecture adheres to: LOAD 2 ADD 3 STORE SUB 5 IN 6 OUT END JMP SKIPZ Each piece of the architecture must be accurately represented in your code (Instruction Register, Program Counter, Memory Address Register, Data Memory, Memory Data Register, and Accumulator). Data Memory will be represented by a 0-9 array. Your Program Counter will begin at 10 For the sake of simplicity Program Memory (M) and Data Memory (DM) may be implemented as separate arrays. Hint: Implementing a struct for your Instructions and an array of these structs as your Program Memory greatly simplifies this program. Example: typedef struct int opCode, deviceorAddress; Instruction; Instruction programM Note: IM, MDRI, and IR are of type Instruction. All other CPU registers and Data Memory (DM) are of type int Using C programming language write a program that simulates the Tiny Machine Architecture. Your code must implement the basic instruction set that the Tiny Machine Architecture adheres to: LOAD 2 ADD 3 STORE SUB 5 IN 6 OUT END JMP SKIPZ Each piece of the architecture must be accurately represented in your code (Instruction Register, Program Counter, Memory Address Register, Data Memory, Memory Data Register, and Accumulator). Data Memory will be represented by a 0-9 array. Your Program Counter will begin at 10 For the sake of simplicity Program Memory (M) and Data Memory (DM) may be implemented as separate arrays. Hint: Implementing a struct for your Instructions and an array of these structs as your Program Memory greatly simplifies this program. Example: typedef struct int opCode, deviceorAddress; Instruction; Instruction programM Note: IM, MDRI, and IR are of type Instruction. All other CPU registers and Data Memory (DM) are of type int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
