You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a rather large change that enables several assembly syntax features to support the Minimal 64x4 Home Computer. The major changes are:
* address operand type that support bit slicing when needed for things like local jumps and zero page addressing.
* .align directive to adjust current address to next configurable page boundary
* Support for embedded strings, which which are essentially .cstr data types without the .cstr directive.
* #mute and #unmute preprocessor directive to control the emission of byte code.
* Complete list of changes is in the CHANGELOG.
Also created the ISA configuration and sample code for the Minimal 64x4 Home Computer.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,17 @@ Changes that are planned but not implemented yet:
13
13
* Disallowed operands
14
14
* missing `:` after labels
15
15
* unknown labels
16
+
* Add named label scopes. This would allow a label to be defined in a specific scope that can be shared across files.
17
+
* Create a "align if needed" preprocessor directive paid that generates an `.align` directive is the bytecode in between the paid isn't naturally on the same page and can fit on the same page if aligned. An error would be benerated if the block of code can't fit on the same page regardless of alignment.
16
18
17
19
## [Unreleased]
20
+
* Added support for The Minimal 64x4 Home Computer with an example and updated assembler functionality to support it.
21
+
* Added `address` operand type that enables several features specific to absolute addresses, include slicing the address to support "short jump" type instructions.
22
+
* Added `.align` directive to align the current address to a multiple of a given value.
23
+
* Changed syntax highlight color theme name to be specific to the language rather than the generic "BespokeASM Theme" name.
24
+
* Added optional support for embedded strings in the assembly code. When enabled, strings can be ebdedded in the code withou a data directive such as `.cstr`. This is enabled by setting the `allow_embedded_strings` option in the `general` section of the configuration file to `true`.
25
+
* Added ability to mute byte code emission with the preprocessor directive `#mute` and unmute with `#unmute`.
26
+
* Improved handling of include directories by duplicating and normalizing all search paths.
18
27
19
28
## [0.4.1]
20
29
* added `.asciiz` as an equivalent data directive to `.cstr`
Copy file name to clipboardExpand all lines: docs/named-memory-zones-requirements.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,14 @@ A named memory zone is a contiguous address range in the allowable address space
14
14
* A named memory zone must be completely contained by the allowed memory space of the configured ISA.
15
15
* Multiple named memory zones may overlap with each other
16
16
* When byte code is assembled, multiple byte codes assigned to the same absolute memory address is a fatal error.
17
-
* Named memory zones are a compile time construct, and are intended to only be a means to manage memory ranges and byte code memory locations in assembly code.
17
+
* Named memory zones are a compile time construct, and are intended to only be a means to manage memory ranges and byte code memory locations in assembly code.
18
18
* Memory zones have a start and end absolute memory address. Byte code assigned to that memory zone with an absolute address outside of the memory zone's range will be an error.
19
19
* A memory zone's name cannot be also used for any label.
20
20
21
21
#### Creation
22
22
23
23
##### Global Memory Zone
24
-
By default, a memory zone named `GLOBAL` is defined to be the full range of memory addresses allowed by the instruction set configuration file. For example, if the ISA defines a 16-bit address type, then the `GLOBAL` memory zone will be addresses `0x0000` though `0xFFFF`.
24
+
By default, a memory zone named `GLOBAL` is defined to be the full range of memory addresses allowed by the instruction set configuration file. For example, if the ISA defines a 16-bit address type, then the `GLOBAL` memory zone will be addresses `0x0000` though `0xFFFF`.
25
25
26
26
The `GLOBAL` memory zone can be redefined in the ISA configuration to be a subset of what is permitted by the memory address bit size.
27
27
@@ -34,7 +34,7 @@ A memory zone can be defined with the following directive
34
34
35
35
Where `<memory zone name>` is an alphanumeric string with no spaces which will serve as the memory zone name, `<start address>` is the absolute address of the start of the memory zone, and `<end address>` is the absolute address of the end of the memory zone. Both `<start address>` and `<end address>` must be defined with integer literals.
36
36
37
-
Any defined memory zone must be fully contained in the `GLOBAL` memory zone.
37
+
Any defined memory zone must be fully contained in the `GLOBAL` memory zone.
38
38
39
39
##### ISA Configuration
40
40
A predefined memory zone can be defined in the instruction set configuration file. In the `predefined` section, a subsection named `memory_zones` can be defined. That second contains a list of dictionaries with the following keys:
@@ -56,7 +56,7 @@ By default, code in any given source file is assembled into the `GLOBAL` memory
56
56
.memzone <memory zone name>
57
57
```
58
58
59
-
Note that the `GLOBAL` memory zone name can be used this directive. Subsequent assembly code lines will be compiled into the indicated memory zone scope until the end of the current assembly file or another directive that changes the memory zone scope. Addresses assigned to the byte code will be per the code ordering.
59
+
Note that the `GLOBAL` memory zone name can be used this directive. Subsequent assembly code lines will be compiled into the indicated memory zone scope until the end of the current assembly file or another directive that changes the memory zone scope. Addresses assigned to the byte code will be per the code ordering.
60
60
61
61
Non-contiguous uses of a given memory zone scope will be compiled as if the assembly code in each use instance was concatenated together in the order processed by the assembler.
62
62
@@ -75,7 +75,7 @@ Where `<address offset value>` is the positive offset from the start of the spec
75
75
.org 0x0100 "variables"
76
76
```
77
77
78
-
Would be the same as setting the current origin to `0x2100` in the `GLOBAL` scope.
78
+
Would be the same as setting the current origin to `0x2100` in the `GLOBAL` scope.
79
79
80
80
Not specifying a `<memory zone name>` will cause the `<address offset value>` to be interpreted as an absolute address. So:
81
81
@@ -85,7 +85,7 @@ Not specifying a `<memory zone name>` will cause the `<address offset value>` to
85
85
86
86
Will set the current address to $3400. This absolute address interpretation is regardless of how the `GLOBAL` memory zone is defined.
87
87
88
-
When using `GLOBAL` as the `<memory zone name>` then `<address offset value>` will be interpreted as an offset form the start of the `GLOBAL` memory zone as it would with any other named memory zone. If the `GLOBAL` memory zone has not be redefined, the net effect is the same as using `.org` with an absolute address. However, if the start address of the `GLOBAL` memory zone has been redefined, then `<address offset value>` will be applied as an offset from the redefined start of `GLOBAL`.
88
+
When using `GLOBAL` as the `<memory zone name>` then `<address offset value>` will be interpreted as an offset form the start of the `GLOBAL` memory zone as it would with any other named memory zone. If the `GLOBAL` memory zone has not be redefined, the net effect is the same as using `.org` with an absolute address. However, if the start address of the `GLOBAL` memory zone has been redefined, then `<address offset value>` will be applied as an offset from the redefined start of `GLOBAL`.
89
89
90
90
91
91
### Memory Zone Error Conditions
@@ -94,4 +94,4 @@ The following conditions will be considered an error:
94
94
* A defined memory zone not fully contained by the `GLOBAL` memory zone.
95
95
* A memory zone defined more than once.
96
96
* Byte code that get assigned to the same absolute memory address.
97
-
* Memory zone names that have spaces or non-alphanumeric characters.
97
+
* Memory zone names that have spaces or non-alphanumeric characters.
BespokeASM has the ability to generate for various popular text editors a syntax highlighting language extension specific to this Ben Easter SAP-1 instruction set. [See the documentation](https://github.com/michaelkamprath/bespokeasm/wiki/Installation-and-Usage#installing-language-extensions) for information for on how to install and use the language extensions.
0 commit comments