8 Bit Compiler

Docs

;

Arguments: Comment, Modifies: None

Ignored. Anything following a semicolon is ignored by the compiler.


@ (Variables)

Arguments: Name, Value, Modifies: None

Compiler directive. Used to reference an address to store a value.


@ (Functions)

Argument: Name, Modifies: None

Compiler directive. Used to reference an address midway through a program to jump to.


.value

Argument: Value, Modifies: None

Compiler directive. Typically used to set the starting value of a variable.


NOP

Argument: None, Modifies: None

No operation. Does nothing, and waits one instruction cycle, typically five clock cycles.


JMP

Argument: Address, Modifies: Memory

Jump. Jumps to the given address.


ADD

Argument: Address, Modifies: Memory

Add. Adds the current values of the A register and B register and writes it to the given address.


SUB

Argument: Address, Modifies: Memory

Subtract. Subtracts the current values of the B register from the A register and writes it to the given address.


STA

Argument: Address, Modifies: Memory

Store A. Stores the current value of the A register to the given address.


ATB

Argument: None, Modifies: B Register

A to B. Moves the content of the A register to the B register.


ADA

Argument: None, Modifies: A Register

Add to A. Adds the current value of the A register to the current value of the B register and stores it to the A register.


ADB

Argument: None, Modifies: B Register

Add to B. Adds the current value of the A register to the current value of the B register and stores it to the B register.


LDA

Argument: Address, Modifies: A Register

Load to A. WritesLoads the value at the given address to the the A register.


LDB

Argument: Address, Modifies: B Register

Load to B. Writes the value at the given address to the the B register.


LIA

Argument: Value, Modifies: A Register

Load Immediately to A. Loads the given value to the the A register.


LIB

Argument: Value, Modifies: B Register

Load Immediately to B. Loads the given value to the the B register.


JZ

Argument: Address, Modifies: None

Jump Zero. Jumps to the given address if the zero flag is set.


JC

Argument: Address, Modifies: None

Jump Carry. Jumps to the given address if the carry flag is set.


OUT

Argument: Address, Modifies: Ouput

Output. Writes the value at the given address to the output register.


HLT

Argument: None, Modifies: None

Halt. Halts the processor and stops all execution.