-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvmdesign.txt
More file actions
28 lines (24 loc) · 754 Bytes
/
vmdesign.txt
File metadata and controls
28 lines (24 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pcspkrplay VM
26 registers a-z
o octave
d divisor
b BPM
l duration
all overs are general purpose
instructions
b and d reserved for legacy extended commands
n* note nr play note
m move r nr load register
a add r nr add
s subtract r nr subtract
c compare r nr set flags for comparison
i jump if not equal nr jump position if not equal (zero flag unset)
e jump if equal nr jump position if equal (zero flag set)
g jump if greater nr jump if greater than
l jump if less nr jump if less than
j jump nr jump always
> branch nr push location on to stack and jump
r return pop location off of stack and jump
f clear flags clear flags from comparison
h halt end execution
note also exists as nonextended commands