Eldred Habert
0c8cdd92d6
Make instruction descriptions more proper English
...
Use articles where appropriate
Use adjectives where it makes sense
2021-05-24 22:07:36 +02:00
Rangi
80a376f045
Syntax errors resets the lexer right away
...
`DEF`, `REDEF`, etc disable EQUS expansion, and reading
macro or OPT arguments sets the lexer to raw mode.
Syntax errors resume normal parsing at the line's end,
but should resume normal tokenization even before that.
2021-05-22 16:08:55 -04:00
Rangi
0068c1375c
Syntax error message hints to indent macro invocations
...
This message is only printed for identifiers parsed as
`T_LABEL` (since they're at the start of a line) but
already defined as macros. Otherwise it may not be
relevant, e.g. for `MyLabel;:` or `My Label::`.
2021-05-22 14:58:26 +02:00
ISSOtm
872af9c7ed
Remove dead store in linker script CRLF handling
2021-05-21 17:20:47 -04:00
ISSOtm
06ea7b20bf
Reinstate "empty filename" assertion in __FILE__ callback
...
This assertion was mentioned by a comment, but deleted for some reason.
2021-05-21 17:20:47 -04:00
ISSOtm
a3c4652bfd
Fix dead stores in charmap_ConvertNext
...
Also cleanup / rearrange some of the function while we're at it.
2021-05-21 17:20:47 -04:00
Rangi
5ad48851ed
Allow error messages for subsequent syntax errors ( #892 )
...
Fixes #891
2021-05-21 17:04:27 -04:00
ISSOtm
e3b7339dd6
Save UNION stack when using PUSHS as well
...
This allows using the latter within the former
2021-05-21 09:47:27 +02:00
ISSOtm
69d7f84502
Reset LOAD offset when changing SECTIONs
...
This would cause spurious section overflow messages, since the load offset
is added to the section's when computing its size.
2021-05-21 09:37:17 +02:00
ISSOtm
e970b6d6eb
Update Zsh completions with CLI changes
...
Also fix some misc. issues with them, and fix an incorrect reported ID for MBC1
2021-05-15 19:21:39 +02:00
ISSOtm
d9cce3fa1f
Update TPP1 canonical name to "TIMER", not "RTC"
...
See previous commit
2021-05-15 19:13:24 +02:00
Rangi
23721694ea
Comment that anonymous labels internally start with '!'
...
`startsIdentifier` should not accept this character so
anonymous labels won't conflict with nonymous ones.
2021-05-15 12:57:22 -04:00
ISSOtm
aa02958e18
Fix mandoc warnings
2021-05-15 12:23:05 +02:00
ISSOtm
011d4ec392
Use the Ad macro for RST addresses
...
Sy has no semantic meaning, and Ad may fix how the "x" is rendered
in the HTML export
2021-05-15 12:03:20 +02:00
ISSOtm
afbaf10185
Fix MBC help string
...
It's called TIMER, not RTC >_<
2021-05-15 11:25:09 +02:00
Rangi
6a5e2f439e
Fix the STRFMT documentation in rgbasm(5)
...
Fixes #886
2021-05-09 17:23:57 -04:00
Rangi
fba77c4dce
Specify to update the release branch in RELEASE.rst
...
This is done manually after publishing a release.
2021-05-08 23:44:53 -04:00
Rangi
830df360ae
Specify that all .sh files need Unix line endings
...
The `git config --global --unset core.autocrlf` command
was failing in the "Create release artifacts" workflow,
so this is an alternate method of fixing issue #841 .
v0.5.1
2021-05-08 23:22:31 -04:00
Rangi
c75551b1b3
Release 0.5.1
2021-05-08 22:38:20 -04:00
Rangi
5a38f6e148
rgbasm supports "Q16.16" fixed-point literals
...
"Qm.n" signifies an m-bit two's complement integer
with n fractional bits.
<https://en.wikipedia.org/wiki/Q_(number_format) >
2021-05-06 23:17:08 -04:00
Rangi
869021f47d
Fix -Wformat build warnings on macOS
...
C arithmetic promotes certain expressions to `int`,
so formatting has to use "%d" or "%x", not inttypes.h.
Fixes #883
2021-05-04 21:28:57 -04:00
Eldred Habert
c06985a7ad
Fix incorrect lexing of "$ff00+c" ( #882 )
...
Fixes #881 by moving the task from the lexer to the parser.
This both alleviates the need for backtracking in the lexer,
removing what is (was) arguably a hack, and causes tokenization
boundaries to be properly respected, fixing the issue mentioned above.
Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com >
2021-05-05 02:04:19 +02:00
ISSOtm
c502804192
Update winflexbison to 2.5.24
...
Updates Bison to 3.7.4, removing support for VS2015
https://github.com/lexxmark/winflexbison/releases/tag/v2.5.24
2021-05-05 01:57:16 +02:00
ISSOtm
75f1bcde31
Make SECTION size overflow non-fatal
...
Fixes #538
2021-05-04 15:34:20 +02:00
ISSOtm
60b85298a9
Fix all memory leaks in RGBLINK
...
At least all that were reported in the tests.
Partial fix for #709 , that only leaves RGBASM to be fixed... oh boy!
2021-05-03 12:50:14 +02:00
ISSOtm
8bbafb7200
Rename out_ functions in section.c to sect_
...
More consistent with convention used everywhere, and makes it easier to
know which file the functions come from.
2021-05-03 12:22:14 +02:00
ISSOtm
75ce230dce
Make UNION-related errors non-fatal
2021-05-03 10:57:14 +02:00
ISSOtm
1d01268249
Remove LOAD FRAGMENT
...
It's very troublesome, with flaky semantics and a very restricted use space.
2021-05-03 10:51:55 +02:00
ISSOtm
02cb5a0526
Avoid performing invalid actions on LOAD errors
...
These are rejected because they could lead to incorrect behavior,
so then don't do it...
2021-05-03 10:46:52 +02:00
Rangi
8397b3d8ec
.sym file sorts symbols from zero-length sections first
...
This will, for instance, ensure that a zero-length
`SECTION "NULL", ROM0[0] / NULL::` comes first.
2021-05-02 17:57:20 -04:00
Rangi
296e5489c9
rgblink adjusts patches' PC offsets when merging FRAGMENTs
...
Fixes #869
2021-05-02 23:54:42 +02:00
Rangi
9ab9d0f39c
Output all SECTION UNION/FRAGMENT symbols in .sym files
...
Fixes #809
2021-05-02 23:51:17 +02:00
ISSOtm
6e1a5dcc9d
Add TPP1 support
...
Fixes #846
2021-05-02 19:09:53 +02:00
Jakub Kądziołka
d360d03403
Enable address sanitizer in develop builds ( #834 )
...
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2021-05-02 18:08:03 +02:00
Rangi
e9bfe849ad
Allow OPT to toggle -h
2021-05-02 11:06:53 +02:00
Rangi
665eb916a2
OPT L acts like -L and *dis*ables optimizing LD to LDH
...
Fixes #867
2021-05-02 11:06:53 +02:00
Rangi
04788e15af
Fix a potential out-of-bounds array access in RGBGFX
...
This was caught by ASAN for pokered's gfx/battle/minimize.png.
2021-05-01 22:33:54 -04:00
ISSOtm
dcb8c69661
Fix UAF in lexer capture
...
Fixes #689
2021-05-02 03:24:18 +02:00
ISSOtm
cc6b70f1d5
Add option to list accepted MBC names and clarify man page
...
Referring to "Pan Docs names" skims over a lot of details.
Add `-m help` to list accepted names for clarity
2021-05-02 00:39:42 +02:00
ISSOtm
38a9a613da
Make data output outside of a SECTION non-fatal
2021-05-01 23:48:48 +02:00
ISSOtm
ad9a766a56
Allow dollar-prefixed hex for RGBFIX -m
...
Fixes #872
2021-05-01 23:48:23 +02:00
Eldred Habert
21b59c4651
Reinstate PUSHS clearing the SECTION scope ( #870 )
...
* Reinstate PUSHS clearing the SECTION scope
Otherwise you can use `PUSHS` to simulate the old `ds -21`, and possibly cause bugs
* Have PUSHS push LOAD block state as well
It does not make sense not to, and coud cause bugs.
2021-05-01 23:30:09 +02:00
ISSOtm
3ffdd50909
Test that RGBFIX does nothing when given no flags
2021-05-01 14:16:45 +02:00
Rangi
ca36422ac9
Parse 'ld hl, sp - <e8>' correctly
...
Fixes #864
2021-05-01 11:08:01 +02:00
Rangi
8e4ba8d2e4
Allow REDEF for EQU constants
...
Fixes #853
2021-04-29 12:24:07 +02:00
Rangi
ee67f1039c
Fix REDEF EQUS behavior
...
Redefining an EQUS constant will now update its filename,
like redefining a SET/= constant.
Attempting to redefine as EQUS a non-EQUS constant will
print an appropriate error message.
This also standardizes on `sym` versus `symbol` as a
variable name (which pairs with `symName`).
2021-04-28 12:11:26 -04:00
Rangi
d37aa93a7d
Port some cleanup from the WIP 'strings' branch
...
This is mostly variable renaming
2021-04-28 11:58:56 -04:00
Rangi
bba532193b
Port some cleanup from PR #847
...
- Update some whitespace formatting
- Factor out some functions
- Free data after outputting to an object file
2021-04-28 11:58:56 -04:00
GreenAndEievui
b4814b06b9
Updated RGBFIX to report when non-zero bytes are overwritten
...
Also updated many .err files with the new warning.
2021-04-28 11:57:43 -04:00
Rangi
4ee2eb845b
Clone test repositories with earlier --shallow-since dates
...
The previous dates were not reliably downloading the
necessary commit IDs for checkout to work.
2021-04-27 17:27:23 -04:00