Spec Update

Removed Indirection Register.
Added new location type to replace use of indirection register.
Added logic instrictions NOT/AND/OR/XOR/SHL/SHR/BTS/BTC.
Increased port count to 255.
This commit is contained in:
2017-12-18 21:00:47 +00:00
parent 81d5b85f78
commit 1c79cff33f

View File

@@ -1,28 +1,27 @@
Features Features
- 1 16-bit Indirection register
- 4 16-bit Registers - 4 16-bit Registers
- 255 8-bit Flag Registers - 255 8-bit Flag Registers
- 8 8-bit Ports - 255 8-bit Ports
- 0 console in/out - 0 console in/out
- 1 tape in/out - 1 tape in/out
- 2-32 Reserved
- Others Implementation Specific
- Program Counter - Program Counter
- Call Stack 16 x 8-bit - Call Stack 16 x 16-bit
- 65535 x 8-bit Memory - 64K x 8-bit Memory
- MSB / big-endian - MSB / big-endian
Registers (R) Registers (R) A-D -> 0-3
A-D -> 0-3 Marker (:) :XYZ
Markers (:)
:NAME
Locations (@) Locations (@)
Code ASM Type Values Code ASM Type Values
0x0 P Port # 0x0 P Port 0-255
0x1 R Register A-D 0x1 R Register A-D
0x2 M Memory 0-65535 0x2 M Memory 0-65535
0x3 L Literal 0-65535 | 'a' | "a" | 0xFFFF 0x3 I Immediate 0-65535 | 'a' | "a" | 0xFFFF
0x4 F Flag 0-255 0x4 F Flag 0-255
0x5 A Address In Register A-D
Instructions Instructions
@@ -36,13 +35,6 @@ Code ASM
0x13 LOADL R @ 0x13 LOADL R @
0x14 SAVEH R @ 0x14 SAVEH R @
0x15 SAVEL R @ 0x15 SAVEL R @
Indirection
0x60 LOADI R
0x61 SAVEI R
0x62 CLRI
0x63 INCI
0x64 DECI
0x65 SETI R
Accumulator Accumulator
0x20 CLR R 0x20 CLR R
0x21 ADD R @ 0x21 ADD R @
@@ -51,11 +43,19 @@ Code ASM
0x24 MUL R @ 0x24 MUL R @
0x25 INC R 0x25 INC R
0x26 DEC R 0x26 DEC R
Logic
0x30 NOT R
0x31 AND R @
0x32 OR R @
0x33 XOR R @
0x33 SHL R 0-8 Shift Left
0x34 SHR R 0-8 Shift Right
0x35 BTS R 0-8 Bit Set
0x36 BTC R 0-8 Bit Clear
Stack Stack
0x40 CALL # 0x40 CALL #|:
0x41 RET 0x41 RET
Program Flow Program Flow
:Marker
0x50 HALT 0x50 HALT
0x51 JMP #|: 0x51 JMP #|:
0x52 JZ R #|: 0x52 JZ R #|: