FPA-1
Information
The pseudo command syntax described here is the FPA-1 variant which was found in the Hagley Museum and Library: Sarnoff/RCA Collection -Joseph A. Weisbecker's archived manuscripts and materials. So far no copy of the FPA-1 source or any SW using it has been found.
The FPA-1 program code should be located between address 200-2FF, 300-3FF is available for TV patterns or additional FPA-1 code. The TV pattern table is located at 00F0-00FF and can be changed as needed. 15 FPA-1 variable V0-VE are available, V0 is used for the carry flag and V1 for the keyboard input byte.
Definitions
aaa | 12 bit address |
kk | 8 bit constant |
l | 4 bit constant |
n | 4 bit constant |
x | Register number Vx (x = 0 to F) |
y | Register number Vy (y = 0 to F) |
z | Register number Vz (y = 0 to F) |
. | Not used, value doesn't matter |
1..9, A..F | Hexadecimal digits |
Syntax
Opcode | Mnemonic | Parameter | Definition |
---|---|---|---|
5xyz | ADD | Vz, Vx+Vy | Vz = Vx + Vy, V0 = carry |
5xyx | ADD | Vx, Vy | Vx = Vx + Vy, V0 = carry |
2aaa | CALL | aaa | Call subroutine at aaa. The subroutine must end in E0 (which is the 'FPA-1' equivalent of RETURN). Note only 1 level call is allowed |
Daaa | DELAY | aaa | Wait aaa/60 seconds |
Bxkk | DRW | Vx, kk | Draw pattern in Vx (00-0F) on screen position kk. Pattern number selects one of sixteen 7-byte patterns from a table. 7-byte pattern is drawn on screen position kk. |
Cxkk | DRW2 | Vx, kk | Draw 8-byte pattern starting in page 3 address Vx on screen position kk. |
0aaa | JZ | V0, aaa | Jump to aaa if V0 = 0 |
1aaa | JNZ | V0, aaa | Jump to aaa if V0 != 0 |
3aaa | JP | aaa | Jump to aaa |
4aaa | KEY | aaa | Input byte into V1 if ready, otherwise jump to 0aaa |
8xy. | LD | B, Vy, Vx | Store BCD value of Vx in Vy, Vy+1 and Vy+2, Vy will point to last byte of the converted number |
7xkk | LD | Vx, kk | Vx = kk |
5xyz | LD | Vz, Vx+Vy | Same as ADD: Vz = Vx + Vy, V0 = carry |
6xyz | LD | Vz, Vx-Vy | Same as SUB: Vz = Vx - Vy, V0 = carry |
E0 | RETURN | Return from CALL by restoring R9 to PC (R5) | |
9xln | RND | Vx, l, n | Vx = random number between (or equal to) l and n, l and n are 4 bit max. |
6xyz | SUB | Vz, Vx-Vy | Vz = Vx - Vy, V0 = carry |
6xyx | SUB | Vx, Vy | Vx = Vx - Vy, V0 = carry |
An | VIDEO | ON | Video display enabled & clear display, resolution 32x32 if n=4, 16x64 if n=8 |