0 | 0 |
SixtyPical
|
1 | 1 |
==========
|
2 | 2 |
|
3 | |
This document describes the SixtyPical programming language version 0.5-PRE,
|
|
3 |
This document describes the SixtyPical programming language version 0.5,
|
4 | 4 |
both its execution aspect and its static analysis aspect (even though
|
5 | 5 |
these are, technically speaking, separate concepts.)
|
6 | 6 |
|
|
13 | 13 |
Types
|
14 | 14 |
-----
|
15 | 15 |
|
16 | |
There are two TYPES in SixtyPical:
|
|
16 |
There are three TYPES in SixtyPical:
|
17 | 17 |
|
18 | 18 |
* bit (2 possible values)
|
19 | 19 |
* byte (256 possible values)
|
|
20 |
* byte table (256 entries, each holding a byte)
|
20 | 21 |
|
21 | 22 |
Memory locations
|
22 | 23 |
----------------
|
|
120 | 121 |
|
121 | 122 |
### ld ###
|
122 | 123 |
|
123 | |
ld <dest-memory-location>, <src-memory-location>
|
|
124 |
ld <dest-memory-location>, <src-memory-location> [+ <index-memory-location>]
|
124 | 125 |
|
125 | 126 |
Reads from src and writes to dest.
|
126 | 127 |
|
|
134 | 135 |
changed by this instruction; they must be named in the WRITES lists, and they
|
135 | 136 |
are considered initialized after it has executed.
|
136 | 137 |
|
|
138 |
If and only if src is a byte table, the index-memory-location must be given.
|
|
139 |
|
137 | 140 |
Some combinations, such as `ld x, y`, are illegal because they do not map to
|
138 | 141 |
underlying opcodes.
|
139 | 142 |
|
140 | 143 |
### st ###
|
141 | 144 |
|
142 | |
st <src-memory-location>, <dest-memory-location>
|
|
145 |
st <src-memory-location>, <dest-memory-location> [+ <index-memory-location>]
|
143 | 146 |
|
144 | 147 |
Reads from src and writes to dest.
|
145 | 148 |
|
|
151 | 154 |
|
152 | 155 |
After execution, dest is considered initialized. No flags are
|
153 | 156 |
changed by this instruction (unless of course dest is a flag.)
|
|
157 |
|
|
158 |
If and only if dest is a byte table, the index-memory-location must be given.
|
154 | 159 |
|
155 | 160 |
### add dest, src ###
|
156 | 161 |
|