Tesla-A4D8 User Manual

  • Sam_Hayzen
    13th Jan 2018 Member 2 Permalink
    
    Tesla-A4D8 Micro Micromanagement Computer
    
    Description:
    	The T-A4D8 is one of the smallest computers on Powder Toy at 84x54 pixels in size.
    	The operations the A4D8 has available to it are limited, but it makes up for it in its small size, relatively high speed, and compact data I/O.
    
    
    Physical:
    	The T-A4D8 has four registers, PC, A, B, and C. PC is 4-Bit, and A, B , and C are 8-Bit.
    	The A4D8 has one flag, the Overflow ('o') flag.
     
    ROM:
    	The A4D8 has two 8-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 a 16-bit format, with the low byte for bank one and the high byte for bank two.
    	Example:
    		If you wanted to store an '18' in bank 2 and an '2C' in bank 1, you would write an "182C" to the first pixel of the drive.
    
    Pinout:
    	The T-A4D8 has two I/0 ports
    
    	The input port, located on the top right, takes an 8-Bit raw spectra number.
    	The output port, located on the bottom right, outputs an 8-Bit raw spectra number.
    
    Commands:
    
    	The A4D8 uses only the low nybble in its instructions, leaving the high nybble mainly unused. The jp a4 opcode is an exception, using the high nybble as the parameter.
    
    
    
    	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 register or flag
    
    	Inc
    		Increment a register's value
    
    	jp
    		Jump to a point in the program
    
    
    
    	Opcodes:
    
    	|Decimal
    	|  |Hexidecimal
    	|  | |Binary
    	|  | |    |Effects flag
    	|  | |    | |Length in bytes
    	|  | |    | | |Mneumonic
    	|00|0|0000|0|1|bs
    	|01|1|0001|1|1|ld a,Input
    	|02|2|0010|0|1|ld Output,b
    	|03|3|0011|1|2|ld a,d8
    	|04|4|0100|0|2|ld b,d8
    	|05|5|0101|1|1|ld a,b
    	|06|6|0110|0|1|ld b,a
    	|07|7|0111|0|1|ld c,a
    	|08|8|1000|1|1|ld a,c
    	|09|9|1001|o|1|add a,b
    	|10|A|1010|o|1|inc a
    	|11|B|1011|0|1|inc b
    	|12|C|1100|o|1|inv a
    	|13|D|1101|o|1|inv o
    	|14|E|1110|0|1|jp a4
    	|15|F|1111|0|1|jp no,a4
    
    	Flags:
    		0:Does not effect flags
    		o:Sets flag based on state
    		1:Sets defined flag

    Edited 13 times by poodiepie. Last: 19th Aug 2018