C language- Virtual Machine Implementation- Assembly Language
Оплачивается при доставке
You will implement a virtual machine for an 32-bit instruction-set. Your program will take a
single command line argument being the path to the file containing your RISK-XVII assembly code. The memory
mapped virtual components of your machine are outlined below:
• 0x0000 - 0x3ff: Instruction Memory - Contains 2
10 of bytes for text segment.
• 0x0400 - 0x7ff: Data Memory - Contains 2
10 of bytes for global variables, and function stack.
• 0x0800 - 0x8ff: Virtual Routines - Accesses to these address will cause special operations to be
• 0xb700 +: Heap Banks - Hardware managed 128 x 64 bytes banks of dynamically allocate-able
Your machine also has a total of 32 registers, as well as a PC (program counter) that points to the
address of the current instruction in memory. Each of the general-purpose registers can store 4 bytes
(32 bits) of data that can be used directly as operands for instructions. All registers are general purpose except for the first one, which has an address of 0. This register is called the zero register,
as any read from it will return a value of 0. Writes to the zero register are ignored.
During execution you should not store any information about the state of the machine outside
of the virtual memory devices and the register bank.
You should not consider special purpose registers.
ID проекта: #36669653