This project shows how to resolve different memory addresses. This was build specifically for a word addressable machine that has a memory of 200 words, each consisting of 4 decimal digits. The first digit is the opcode, the remaining three are the address fields.
javac Oslinker.java
This program takes in 1 argument:
- the input file
This program deals with four different addresses:
- An immediate operand, which the program does not change.
- An absolute address, which the program does not change.
- A relative address, which the program relocates.
- A external address, which the program resolves.
Use any of the address files in the given input files folder or make your own.
java Oslinker input-1.txt