2022-12-15 22:35:46 +01:00
|
|
|
Instructions:
|
2023-01-05 23:47:32 +01:00
|
|
|
INP 0b0001 | +Adress
|
|
|
|
OUT 0b0010 | +Adress
|
|
|
|
LDA 0b0011 | +Adress
|
|
|
|
STA 0b0100 | +Adress
|
|
|
|
INC 0b0101 | no Adress
|
|
|
|
DEC 0b0110 | no Adress
|
2023-03-27 10:50:12 +02:00
|
|
|
JPP 0b0111 | +Adress/Label
|
2023-04-14 16:54:10 +02:00
|
|
|
JPZ 0b1000 | +Adress/Label
|
|
|
|
JPN 0b1001 | +Adress/Label
|
|
|
|
JPU 0b1010 | +Adress/Label
|
2023-01-05 23:47:32 +01:00
|
|
|
EOJ 0b1011 | no Adress
|
2022-12-15 22:35:46 +01:00
|
|
|
|
|
|
|
Instruction format, [] means optional:
|
2023-05-02 07:49:46 +02:00
|
|
|
instruction [mem_adress]; [Comment]
|
2022-12-27 16:48:57 +01:00
|
|
|
|
|
|
|
Memory:
|
|
|
|
32 Bit Data with
|
|
|
|
28 Bit Adresess-> 24Mb Memory
|
|
|
|
|
|
|
|
Instruction Layout:
|
|
|
|
XXXXYYYYYYYYYYYYYYYYYYYYYYYYYYYY
|
2023-01-05 23:47:32 +01:00
|
|
|
X: Instruction Opcode (4bit)
|
2023-03-27 10:50:12 +02:00
|
|
|
Y: Memory Adress (28bit)
|
|
|
|
|
|
|
|
Labels will get resolved by a preprocessor and transformed to adresses on assembling time
|
2023-09-05 00:42:36 +02:00
|
|
|
A label can be defined at any position in a instruction (except in the comment) by writing $label_name.
|
|
|
|
So you could e.g. write
|
|
|
|
|
|
|
|
$label OUT 35
|
|
|
|
|
|
|
|
but also
|
|
|
|
|
|
|
|
OUT $label 35
|
|
|
|
|
|
|
|
Note that the first variant is recommendet for readability
|