Skip to content

Commit d13e817

Browse files
committed
Updated README
1 parent dbbc13e commit d13e817

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,40 @@ The Nibble Knowledge CPU has 8 instructions which are split into two different t
2727
* LOD: Load the accumulator with the nibble at the specified address.
2828
* STR: Store the nibble in the accumulator to the specified memory address.
2929

30+
31+
### Pseudo instructions ###
32+
To aid in disassembly a new metadata format for binary files is now included in the assembler as of v1.1.0.
33+
* INF - the information section must start with this, and this should be the first instruction of any file.
34+
* PINF - the start of the executable information section. Any unknown tuples within the executable information section are treated as pseudo instructions with a data field.
35+
* BADR - The base address of the binary file. Must be in the executable data section.
36+
* EPINF - the end of the executable information section.
37+
* DSEC - the memory location of the data section which should succeed the text section. Should be a label so that it is modified by the base address and can be reliably disassembled. If there is no data section, this should point to the end of the file.
38+
* Data section descriptors:
39+
* DNUM - the amount of data sections of the following size
40+
* DSIZE - the size
41+
* There should be as many DNUM/DSIZE pairs as there are unique groups of data sections. The example below is illustrative. These pairs must be in the same order as the data sections themselves.
42+
* EINF - end of the information section.
43+
44+
An example is below:
45+
```nasm
46+
INF
47+
PINF
48+
BADR 0x40
49+
EPINF
50+
DSEC datastart
51+
DNUM 0x2
52+
DSIZE 0x3
53+
DNUM 0x1
54+
DSIZE 0x9
55+
EINF
56+
LOD hello
57+
LOD isitmeyourelookingfor
58+
datastart:
59+
hello: .data 3 0x2
60+
isitmeyourelookingfor: .data 3 0x2
61+
.data 9 0x0
62+
```
63+
3064
### 2 data types ###
3165
AS4 recognises two inbuilt data types:
3266
* Numberical values. Format: ".data SIZE INITIALVALUE"

0 commit comments

Comments
 (0)