Post by Amelorate on May 1, 2015 18:55:53 GMT
Info:
b28 is the first instruction set available to the public when the first microprocessors were made. It is designed to be simple, low-level, and fast. (I will expand on the microprocessor lore later, but basically in my current lore this is pre-NT just after microprocessors were invented. Space exploration was done without them.)
Registers:
P -- Primary
Stores data and instruction arguments. Max: 263 Min: -263
S -- Secondary
Stores data and instruction arguments. Max: 263 Min: -263
L -- Location
Stores the location of the currently executing instruction. Max: 256 Min: 0
B -- Bit
Stores the number of bits to be outputted in an IO operation. Max: 63 Min: 0
Instructions:
[Register Manipulation]
SWAP -- Swap P and S. [1]
INCR -- Add 1 to P. [2]
SPTO -- S = P. [3]
PSTO -- P = S. [4]
[Math]
ADDP -- P = P + S. [5]
SUBT -- P = P - S. [6]
ZERO -- P = 0. [7]
ANDP -- P = AND P and S to P. [8]
IORP -- P = Inclusive OR P and S. [9]
EORP -- P = Exclusive OR P and S. [10]
NOTP -- P = NOT P. [11]
LEFT -- P = Left shift P. [12]
RIGH -- P = Right shift P. [13]
EQUL -- P = 1 if P = S. Else P = 0. [14]
[Program Manipulation]
NOOP -- Do nothing for a cycle. [0]
GOTO -- L = P [15]
IFGO -- If S != 0, L = P. [16]
PRGM -- Instruction at P = S next poweron or APLY. [17]
APLY -- Update the program, then ZERO SWAP ZERO GOTO. [18]
[IO]
BITS -- B = P. [19]
OUTP -- Output B bits of P to pin S. [20]
INPU -- Input B bits to P from pin S. [21]
Notes:
Example Programs and Pinouts:
[Hi!]
Outputs Hi! to a 8 bit ASCII text only screen.
Pinout:
O0: Screen
Program: (An instruction with x[NUMBER] is repeated NUMBER times)
INCRx8
BITS
ZERO
INCRx72
OUTP
INCRx33
OUTP
ZERO
INCRx33
OUTP
b28 is the first instruction set available to the public when the first microprocessors were made. It is designed to be simple, low-level, and fast. (I will expand on the microprocessor lore later, but basically in my current lore this is pre-NT just after microprocessors were invented. Space exploration was done without them.)
Registers:
P -- Primary
Stores data and instruction arguments. Max: 263 Min: -263
S -- Secondary
Stores data and instruction arguments. Max: 263 Min: -263
L -- Location
Stores the location of the currently executing instruction. Max: 256 Min: 0
B -- Bit
Stores the number of bits to be outputted in an IO operation. Max: 63 Min: 0
Instructions:
[Register Manipulation]
SWAP -- Swap P and S. [1]
INCR -- Add 1 to P. [2]
SPTO -- S = P. [3]
PSTO -- P = S. [4]
[Math]
ADDP -- P = P + S. [5]
SUBT -- P = P - S. [6]
ZERO -- P = 0. [7]
ANDP -- P = AND P and S to P. [8]
IORP -- P = Inclusive OR P and S. [9]
EORP -- P = Exclusive OR P and S. [10]
NOTP -- P = NOT P. [11]
LEFT -- P = Left shift P. [12]
RIGH -- P = Right shift P. [13]
EQUL -- P = 1 if P = S. Else P = 0. [14]
[Program Manipulation]
NOOP -- Do nothing for a cycle. [0]
GOTO -- L = P [15]
IFGO -- If S != 0, L = P. [16]
PRGM -- Instruction at P = S next poweron or APLY. [17]
APLY -- Update the program, then ZERO SWAP ZERO GOTO. [18]
[IO]
BITS -- B = P. [19]
OUTP -- Output B bits of P to pin S. [20]
INPU -- Input B bits to P from pin S. [21]
Notes:
- There are 256 max instructions on 1 chip.
- A chip poweroffs if it reaches the end without an APLY
- A chip powerons if it receives 1 on pin 0.
Example Programs and Pinouts:
[Hi!]
Outputs Hi! to a 8 bit ASCII text only screen.
Pinout:
O0: Screen
Program: (An instruction with x[NUMBER] is repeated NUMBER times)
INCRx8
BITS
ZERO
INCRx72
OUTP
INCRx33
OUTP
ZERO
INCRx33
OUTP