Sample Solutions For KySMet Encoding And Assembler

There are actually three different sample solutions here. There is also an Implementor's Notes document to go with either the first or third version: Latex source and PDF.

The First Version

The following is the AIK code for the sample solution.

Sample Solution For KySMet Encoding And Assembler


Sample Assembly Language Input


An Alternative...

Here's another way to do this... but avoiding having the second word missing an opcode field. The trick is that an opcode (15) is reserved to mean "continuation of address in previous call, jump, or jumpf." This is not hard to implement because the continuation actually works a lot like lu8. Is it better than the first encoding? It depends on how you implement things... probably not.

The following is the AIK code for the sample solution.

Sample Solution For KySMet Encoding And Assembler


Sample Assembly Language Input


Another Alternative

Finally, let's go back to my first encoding, but use .alias to show groupings.

The following is the AIK code for the sample solution.

Sample Solution For KySMet Encoding And Assembler


Sample Assembly Language Input



EE480 Advanced Computer Architecture.