| 8989312 by David Griffiths at 2010-08-23 |
1 |
B E T A B L O C K E R (C) 2010 Dave Griffiths |
|
2 |
--------------------------------------------- |
|
3 |
|
|
4 |
Betablocker is a 8 bit processor with 256 bytes of memory. It's capable only of playing music, and it's threads of execution (which share the same memory) never crash or cease execution. |
|
5 |
|
|
6 |
You write into memory in order to edit programs literally as they are running. |
|
7 |
|
|
8 |
Instruction Set |
| 41deb63 by David Griffiths at 2010-08-23 |
9 |
|
|
10 |
Instr Oper Push Pop Description |
|
11 |
---------------------------------------------------------------------------- |
|
12 |
NOP 0 0 0 Does nothing |
|
13 |
ORG 0 0 0 Program start |
|
14 |
EQU 0 1 2 Push 1 if top 2 items in stack are equal, otherwise 0 |
|
15 |
JMP 1 0 0 Sets program counter |
|
16 |
JMP 1 0 0 If top is 0, sets program counter |
|
17 |
PSHL 1 1 0 Pushes literal to stack |
|
18 |
PSH 1 1 0 Pushes value at this address |
|
19 |
PSHI 1 1 0 Indirect push address at address |
|
20 |
POP 1 0 1 Pop stack to address |
|
21 |
POPI 1 0 1 Indrect pop stack to address at address |
|
22 |
ADD 0 1 2 Adds top 2 items and pushes result |
|
23 |
SUB 0 1 2 Subtracts top 2 items and pushes result |
|
24 |
INC 0 1 1 Increments top of stack |
|
25 |
DEC 0 1 1 Decrements top of stack |
|
26 |
AND 0 1 2 Pushes bitwise AND of top two stack items |
|
27 |
OR 0 1 2 Pushes bitwise OR of top two stack items |
|
28 |
XOR 0 1 2 Pushes bitwise XOR of top two stack items |
|
29 |
NOT 0 1 1 Pushes bitwise NOT of tow stack item |
|
30 |
ROR 1 1 1 Bitwise right rotate top of stack |
|
31 |
ROL 1 1 1 Bitwise left rotate top of stack |
|
32 |
PIP 1 0 0 Increments addr in-place (push increment pop) |
|
33 |
PDP 1 0 0 Decrements addr in-place (push decrement pop) |
|
34 |
DUP 0 1 0 Duplicates top of stack |
|
35 |
NOTE 0 0 1 Plays current instrument at pitch from top of stack |
|
36 |
VOX 0 0 1 Changes current instrument to top of stack |