-
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 v10 #13
Merged
Merged
Specasm v10 #13
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
The linker reported an error when a 12 character label appeared in an equ statement, due to an incorrect comparison. The bug is fixed and a test has been added. Signed-off-by: Mark Ryan <[email protected]>
Otherwise, statements that allow labels to be used directly without the expression syntax would be ambiguous, e.g., .hl equ 1000 ld a, (hl) Signed-off-by: Mark Ryan <[email protected]>
A failure encountered during saving no longer messes up the UI. Load failure when openning a non-existant file now behaves the same way as other failures, i.e., the cursor stays on the command prompt. Signed-off-by: Mark Ryan <[email protected]>
In the salink output. Also, make sure we don't try to display more than 11 characters for the image and the map name. The print routines aren't designed to handle cases where more characters are written that fit on a row. Using them in this way will cause memory corruption. Signed-off-by: Mark Ryan <[email protected]>
Specasm reported an error when users tried to open or save a file using a relative path, e.g., ../code.x. This commit fixes that bug. Signed-off-by: Mark Ryan <[email protected]>
Specasm was confusingly reporting a bad register error instead of a too many strings error, which is quite confusing. Signed-off-by: Mark Ryan <[email protected]>
There was a bug in the linker which led to a multiply defined org statement error when linking test programs if the project being tested contained an org statement in a .x file. Signed-off-by: Mark Ryan <[email protected]>
There's now a 128 version of the Specasm editor. The 128 version of Specasm is faster than the 48 version as none of its code or data (apart from the clipboard) is resides in contended memory. The Next version of Specasm has also been updated to use 16kb banks rather than 8kb banks. This unifies the paging mechanism used by the 128 and next versions of Specasm, and so simplifies the code, but also increases the size of the clipboard on the Next version from 8 to 16kb, which should be large enough to store the entire contents of any file. Finally, we add a unitest tap file for the 128kb Spectrum and modify the existing Next unittest program to use 16kb banks, to be consistent with the editor. salink still uses 8kb banks on the Next and there's no 128 kb version yet. Signed-off-by: Mark Ryan <[email protected]>
The code that manages the clipboard is moved into the main section. Signed-off-by: Mark Ryan <[email protected]>
We now have a custom 128 bootstrap helper that contains the calibration code and some bankswitching code. The bank switching code in the bootstrap helper and in specasm_trampolines_128.c should be Amstrad friendly, using non-contended memory banks on both Amstrad and Sinclair machines (although this has only been tested on Sinclair machines and Harlequin based clones). The location of the keyboard calibration parameter has been changed to be just above the top of the stack. The old address seems to hang Amstrad machines. Signed-off-by: Mark Ryan <[email protected]>
Two new commands, t and fl, can be used to compute the machine cycles and t states and also the flags modified by selected blocks of code. Signed-off-by: Mark Ryan <[email protected]>
The compiler was complaining about missing brackets. Signed-off-by: Mark Ryan <[email protected]>
On the 128 and Next only. Signed-off-by: Mark Ryan <[email protected]>
The drawing code for the 48 and 128 kb versions of specasm has been re-written in assembler resulting in an almost 3x performance boost. The Next drawing code has yet to be rewritten, althought this isn't so crucial as the Next version runs at 8x the speed of the Spectrum versions. Signed-off-by: Mark Ryan <[email protected]>
As the editor re-formats entered lines, indenting instructions and adding spaces after commas, it's possible for the user to enter an instruction that when formatted is > 32 characters, and so cannot be displayed by the editor. This was overflowing memory. We fix the bug by checking that the length of formatted lines are <= 32 characters, preventing the user for entering the line if its formatted length is too long. We also fix another issue with the formatting of short comments used in long lines. saimport is also modified on non ZX platforms to check that the formatted length of a parsed line is <= 32 characters, returning an error if it is not. Unfortunately, the ZX versions of saimport cannot perform this check as there's not enough memory free, so for now a warning has been added to the documentation. Signed-off-by: Mark Ryan <[email protected]>
These additional key strokes can now be used in selection mode which makes it much quicker to select large blocks of text. This works on the 48kb as well as the 128 and Next. Signed-off-by: Mark Ryan <[email protected]>
This was previously disallowed for some reason and there was a whole pile of code designed to prevent it. Remove this code, free up some space in specasm and allow jp $a000. This was already permitted with the call instruction so it should work with jp as well. Signed-off-by: Mark Ryan <[email protected]>
Previously, the linker did now allow character literals in expressions. This was an oversight rather than something which was done intentionally, so we fix this now. Signed-off-by: Mark Ryan <[email protected]>
+ includes, i.e., includes relative to the /specasm directory only worked if they were present in the main project folder. They did not work from sub folders as the linker was treating them as relative paths. This is all fixed now. Signed-off-by: Mark Ryan <[email protected]>
Previously, it was impossible to save a .t file whose filename contained a single letter, excluding the extension, e.g., w.t. It was also not possible to save a .x file with a single letter when explicitly specifying the extension, e.g, > s w.x Both this issues have now been fixed. Signed-off-by: Mark Ryan <[email protected]>
Mostly by copying the files from the 48kb release. Signed-off-by: Mark Ryan <[email protected]>
Signed-off-by: Mark Ryan <[email protected]>
Make sure we always return to the calling bank once the called function has returned. Previously, the bank mapped back in after the function had returned was hard coded which was very fragile and resulted in a bug in version v9 of specasm which could cause memory corruption during linking. Signed-off-by: Mark Ryan <[email protected]>
This saves space in the Next version of salink where there's not enough stack stack to process deep expressions. This change helps but still isn't enough to prevent the stack overwriting the bss_section with very deep expressions. Signed-off-by: Mark Ryan <[email protected]>
This speeds things up and makes the code slightly smaller. Signed-off-by: Mark Ryan <[email protected]>
We use a parallel stack to try to save space on the stack. Signed-off-by: Mark Ryan <[email protected]>
In the main binary. We need it for the stack. Signed-off-by: Mark Ryan <[email protected]>
So we can keep an eye on that stack. Signed-off-by: Mark Ryan <[email protected]>
From 9 to 5. There's just not enough stack space left for 9 levels of recursion and I don't really want to sacrifice the precious RAM used for any of the other buffers, e.g., number of labels. Since using 9 levels of recursion on earlier versions of Specasm would have rebooted your Spectrum, this is unlikely to break any programs. Also, the depth limit now applies to bracketed expressions as well, e.g., ((((((1)))))) won't compile any more. It won't reboot your Spectrum either. Signed-off-by: Mark Ryan <[email protected]>
It seems that closing and deleting an empty file causes some sort of sd card corruption, which prevents the SD card from subsequently being mounted on macos without being repaired. The Next doesn't have this issue. So on ESXDOS we now ensure that the binary the linker is creating when an error occurs has at least one byte written to it before we close and delete it. Signed-off-by: Mark Ryan <[email protected]>
Code analysis did not work for instructions that contained expressions. Signed-off-by: Mark Ryan <[email protected]>
The format of the error message from TstCheckRegs had changed breaking some of the unit tests. Also a lot of the tests didn't disable interrupts and save and restore iy and the prime registers, which led to crashes and weird behaviour. I think I must have originally just tested this on the Next. The tests all work on a Spectrum now. Signed-off-by: Mark Ryan <[email protected]>
The parameter to the function that handles page down in select mode had a parameter of the wrong type. Signed-off-by: Mark Ryan <[email protected]>
To specasm v10 Signed-off-by: Mark Ryan <[email protected]>
markdryan
force-pushed
the
markdryan/v10
branch
from
September 24, 2024 19:32
93df876
to
15de634
Compare
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.
Version v10 of Specasm includes the following enhancements and fixes: