This project implements an emulator for a custom processor architecture. The processor's programming model includes the following features:
๐น Four 64-bit general-purpose registers
๐น A program counter
๐น A 64-bit address space
๐น 1-byte length for the content of each memory address
The instruction set of the emulator includes:
Basic Arithmetic Operations:
๐น ADD (Addition)
๐น SUB (Subtraction)
๐น MUL (Multiplication)
๐น DIV (Division)
Basic Bitwise Logical Operations:
๐น AND (Bitwise AND)
๐น OR (Bitwise OR)
๐น NOT (Bitwise NOT)
๐น XOR (Bitwise XOR)
Data Transfer Instructions:
๐น MOV (Move) with support for both direct and indirect addressing
Branching Instructions:
๐น JMP (Unconditional Jump)
๐น JE (Jump if Equal)
๐น JNE (Jump if Not Equal)
๐น JGE (Jump if Greater or Equal)
๐น JL (Jump if Less)
๐น CMP (Compare) with support for both direct and indirect branching
I/O Routines:
๐น Read a character from the keyboard into a register
๐น Output a character from a register to the screen
Processor Control:
๐น HALT (Stop Processor)
๐น RESUME (Resume Processor)
You can write text file that utilizes commands described above and save it to src/java/main/input directory. There are 2 example files already. You can than load them in application using file load command:
fl file_name.txt
Now you can step through each line of code using step(s) command, or just run entire program using run command.
Using help command, you can see other useful commands.