Tesla-A4D4 User Manual

  • Sam_Hayzen
    10th Jan 2018 Member 0 Permalink
    Tesla-A4D4 Micro Micromanagement Computer
    
    Description:
    	The T-A4D4 is the second smallest computer on Powder Toy at 98x52 pixels in size.
    	The operations the A4D4 has available to it are limited, but it makes up for it in its small size and high speed.
    
    
    Physical:
    	The T-A4D4 Only has three registers: PC, A, and B, A being the ALU. And it only has one flag, the Carry flag. 
    
    ROM:
    	The A4D4 has two 4-bit, 16 byte banks of embedded Read Only Memory.
    	The active bank switches when the Program Counter overflows, or the BS instruction is encountered.
    	
    	The ROM is stored in an 8-bit format, with the low nybble for bank one and the high nybble for bank two.
    	Example:
    		If you wanted to store an '8' in bank 2 and an 'F' in bank 1, you would write an "8F" to the first pixel of the drive.
    
    Pinout:
    	The T-A4D4 has eight pins for I/0
    
    	0:Input bit 3
    	1:Input bit 2
    	2:Input bit 1
    	3:Input bit 0
    	4:Output bit 3
    	5:Output bit 2
    	6:Output bit 1
    	7:Output bit 0
    
    Commands:
    	Nop
    		No Operation
    
    	bs
    		Bank Switch
    
    	ld
    		Load a value into a register.
    
    	Add
    		Add a value to A. The result is stored in A.
    
    	Inv
    		Invert a value or flag
    
    	Inc
    		Increment a register's value
    
    	jp
    		Jump to a point in the program
    
    	Stop
    		Stop the computer
    
    
    	Opcodes:
    
    	|Decimal
    	|  |Hexidecimal
    	|  | |Binary
    	|  | |    |Effects flag
    	|  | |    | |Length in bytes
    	|  | |    | | |Mneumonic
    	|00|0|0000|0|1|Nop
    	|01|1|0001|0|1|bs
    	|02|2|0010|0|1|ld Output,a
    	|03|3|0011|0|1|ld b,Input
    	|04|4|0100|0|2|ld a,d4
    	|05|5|0101|0|2|ld b,d4
    	|06|6|0110|0|1|ld a,b
    	|07|7|0111|0|1|ld b,a
    	|08|8|1000|c|1|add a,b
    	|09|9|1001|c|1|Inv a
    	|10|A|1010|c|1|inc a
    	|11|B|1011|c|1|inc b
    	|12|C|1100|0|1|jp a4
    	|13|D|1101|0|1|jp nc,a4
    	|14|E|1110|c|1|Inv c
    	|15|F|1111|0|1|Stop

    Edited 3 times by poodiepie. Last: 26th Feb 2018