Assembly

Although the computer is primarily controlled by a set of 8-bit opcodes these can be tricky to work with when designing more complicated programs. As with many computers we can use a higher-level language which is more readable for a human but then will need converting into 8-bit opcodes for the computer to understand.

I have designed an assembly style language which is made up of a series of mnemonics that each map directly to an equivalent opcode. This makes it easier to create and maintain programs for the computer but still works at the basic hardware level of the computer. This is in contrast to a modern high-level language such as C# where each statement might compile down to a series of opcodes required to perform that action.

The list of available instructions is as follows:

Register to Register Copy

mov08-bit >dest:abcdm1m2xy,src:abcdm1m2xy16-bit >dest:xypc,src:mxyjas

Register Clear

clrtarget:abcdm1m2xy

Load Immediate

ldi08-bit >dest:ab,value:-16..1516-bit >dest:mj,value:0x0000..0xFFFFlabel

Arithmetic Ops

addition >addincrement >incdest:ad

Logic/Bitwise Ops

bitwise and >andbitwise or >orrbitwise xor >eorcompare B-C >cmpbitwise not >notrotate left >roldest:ad

Branching

subroutinejsrunconditionaljmpconditional!zerobnezerobeqcarrybcssignbmisignbltS | Zblelabel

Clock Control

hlthlr

Direct op-code

opcHex opcode (0x00..0xFF)Binary opcode