-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specasm v9 #12
Merged
Merged
Specasm v9 #12
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A new linker directive, zx81, has been added which changes the default org address to 16514 and instructs the linker to transliterate all string and character literals from ASCII to their equivalent ZX81 encoding, where available. Samake has also been updated to support the generation of .p files. Signed-off-by: Mark Ryan <[email protected]>
We don't allow more than 64 files in a binary and I doubt we'll ever allow more than 256. So no need to use 16 bit integers to keep track of the number of object files we have. Signed-off-by: Mark Ryan <[email protected]>
This is necessary to provide enough space for including files with the + directive as the /specasm/ has to be prepended and a .x has to be potentially appened. This will reduce the maximum number of pending files from 35 to 23 when processing includes, but hopefully that will be enough. Without this change the + directive is fairly useless. Signed-off-by: Mark Ryan <[email protected]>
This syntax was understood by the parser but not by the formatter or the linker, and so resulted in corrupted text in specasm and incorrectly encoded instructions. All fixed now. To get this all to fit we had to free a bit of space in line_dump.c. We did this by factorising an array of register names. This saved more memory than expected so maybe we should move all those arrays outside of the functions in which they are used. Signed-off-by: Mark Ryan <[email protected]>
The instead of this. Signed-off-by: Mark Ryan <[email protected]>
As recently discovered, having initialized arrays inside functions seems to be more expensive than the equivalent static arrays. As we've had problems with local static arrays let's make those arrays global and save some bytes. Signed-off-by: Mark Ryan <[email protected]>
To make room for more exciting code in link_obj.c. Signed-off-by: Mark Ryan <[email protected]>
Add unit test support. Specasm now supports .t files which can include unit test code. This code is included in a separate binary with a .tst suffix created by the linker. The .tst file contains a jump table to all the test functions (functions that begin with a Test prefix) and the contents of the .t files as well as the contents of all the .x files. Samake has been modified to generate BASIC test harnesses that invoke all the Test* functions found in the .tst binary printing their results to the screen. .t files are not included when directories are included using - or + but can be explicitly included by name. Signed-off-by: Mark Ryan <[email protected]>
Signed-off-by: Mark Ryan <[email protected]>
With clang-format. Signed-off-by: Mark Ryan <[email protected]>
The documents can be read directly on the spectrum. Signed-off-by: Mark Ryan <[email protected]>
The linker no longer understands label subtraction and will emit an error if ask to process any old .x files that still use it. The error should explain to the user how they can resolve the issue by loading the offending file into specasm and re-saving it. This saves about 400 bytes. Signed-off-by: Mark Ryan <[email protected]>
The ld instruction was reporting the wrong error code when used with labels or expressions and the number of strings in the .x were exhausted. The user should have seen a "Too many strings" error, but instead they were confronted with a "Bad register" error which was very confusing. Should all be fixed now. Signed-off-by: Mark Ryan <[email protected]>
It just wastes bytes and 4 of our 32 characters on the screen. Signed-off-by: Mark Ryan <[email protected]>
The length was previously hardcoded to 8. This commit modifies uses the LEN keyword to determine the correct length.
which contains routines that can be used in unit tests to determine which registers have changed. Signed-off-by: Mark Ryan <[email protected]>
Add a .BAS extension so that they're recognized by all file browsers. Signed-off-by: Mark Ryan <[email protected]>
For the v9 release. Signed-off-by: Mark Ryan <[email protected]>
It seems that the stat command has a different interface on MacOS and Linux. Signed-off-by: Mark Ryan <[email protected]>
The sanitizer found that error strings containing paths might end up being truncated as such error messages might not fit into 96 bytes. We now allow 4 lines for linker error messages. Signed-off-by: Mark Ryan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specasm v8 contains numerous updates and improvements: