K Architecture
Short for "Kitty"
😺
The K architecture features a 16-bit CPU with 16-bit memory addressing, and a 32-bit math co-processor. The instruction set is relatively simple, for details, see Writing Kasm. For information on how to use the Kasm assembler, see Kasm Documentation
Building the Emulator
Building the emulator is a fairly straightforward process. Just grab the source and build it.
Required Software
- Java - JDK 8 (either Oracle JDK or OpenJDK)
- Apache Maven 3.0.0 (version 3.3.0 is recommended)
git
is completely optional. Without git, you can download the sources directly from the repository using the
menu at the top.
Build It!
All of these steps require shell access. This means you will be using a Terminal of some sort (or possibly quitting Xorg and just using the system console).
Obtain the Source
If you are using git
, the source can be obtained easily:
git clone https://felinewith.me/LadySerenaKitty/kcpu.git
Or you can download the source directly from the repository. Be sure you rename the extracted folder to kcpu
.
Compiling
Compiling the source is the easy part. Thankfully, mvn
makes it really easy.
mvn package
That's it! The program JAR is now located in target/
along with the JavaDoc JAR.
Running the Emulator
After building the emulator, you probably want to run it. There's one extra step you need before it will run.
mvn dependency:copy-dependencies
This will place the runtime dependencies into the appropriate folder. You can now run the emulator.
./kcpu.sh
You probably won't see anything and that's okay. Add the -v
or --verbose
command line options to watch the
processor executing instructions.
./kcpu.sh -v
There are some other options which may be useful:
./kcpu.sh -h