Project 2

RSCPU-E

CPU Simulator

Programming Assignment

Enhance the RSCPU Simulator to support 16-bit operations while, like Intel, maintaining backward compatibility with RSCPU.

Note: the bus is still 8 bits, so all memory accesses still take place 8 bits at a time, only the operations have changed to 16 bits.

Add 16-bit versions of:

The 16-bit version is distinguished from the 8-bit version by the msb on in the opcode, e.g. 8-bit LDAC op code is 0000 0001 and the 16-bit LDAC op code is 1000 0001.

AC and R are expanded to 16 bits. However, to maintain backwards compatibility, an 8-bit operation must not affect the high-order 8 bits of the affected operand; e.g. an 8-bit add must not affect the high-order 8 bits of AC, an 8-bit LDAC must not affect the high-order 8 bits of AC, an 8-bit MVAC must not affect the high-order 8 bits of R, etc.

Fetch remains unchanged since op codes are still 8 bits.

Condition codes must be properly set.

Your program must output information as described for the RSCPU.

Submit your program

Use turnin to submit your program. Select  RSCPUECPP. Your file name must be rscpue.cpp. Your program must be written in C++. You are responsible for checking the output file generated by turnin to ensure that it turned in properly. Programs that do not compile are not worth any points. Programs that do not run to a normal completion are worth very little.

Please Note: my program is 1437 lines. If you wait until the day before this assignment is due, it is unlikely that you will be successful.


A link to my turnin .out file


 

© This project is copyright protected by Barbara Bracken

This page is maintained by Barbara Bracken
Last modified: 8/11/2024