Rangi
81327b0d99
Merge branch 'master' of https://github.com/gbdev/rgbds
2021-04-13 09:31:35 -04:00
Rangi
c0859e64f7
fstk_FindFile checks for sprintf failure
2021-04-13 09:31:05 -04:00
Rangi
3e0b7d428f
Fix an unclosed file and unfreed memory in out_BinaryFileSlice
...
Use 'goto cleanup' in both out_BinaryFileSlice and out_BinaryFile
2021-04-13 09:19:59 -04:00
ISSOtm
ba3428314b
Add contact info for potential contributors
...
I'm going on a break, but I'll stay available if anyone wants to contribute.
2021-04-13 00:27:49 +02:00
Rangi
bcb78f5d18
Define __RGBDS_VERSION__ as the output of rgbasm --version (sans "rgbasm")
...
Fixes #824
2021-04-09 19:42:48 +02:00
ISSOtm
de7d1facf3
Add assertion that an expansion's total len doesn't overflow
...
Typically not needed because the recursion depth limit should prevent it,
but it might help debug weird lexer issues.
2021-04-03 18:31:30 +02:00
Rangi
310d34c655
Comment on REG_SP and REG_AF both being 3
...
No instruction needs to distinguish them both
2021-03-31 18:41:42 -04:00
Rangi
39c38f9838
Add a test case for unattainable SECTION UNION alignment
...
This test cases used to fail an assertion in `make develop`
2021-03-31 16:09:52 -04:00
Rangi
576b063519
Fix unattainable alignments to address 0
...
Fixes #818
2021-03-31 16:06:15 -04:00
Rangi
596e17ee61
Factor out a common strlen into beginExpansion
...
This avoids the possibility of `size` not matching `str`
2021-03-31 14:41:38 -04:00
Rangi
363b3d0134
Flush stdout after PRINTLN
...
This allows debug PRINTLN statements to run even if
subsequent rgbasm directives cause a crash.
2021-03-31 11:22:41 -04:00
Rangi
c7ed9a275e
Do not expand empty strings
...
Fixes #813
2021-03-31 10:21:04 -04:00
Rangi
49aac2961d
Warn about backwards FOR loops with -Wbackwards-for (-Wall)
...
Fixes #816
2021-03-31 10:00:21 -04:00
Rangi
3741bd4617
Speed up the div-mod test case
...
Test various explicit cases, not nested `for` loops
over thousands of cases
2021-03-31 09:37:23 -04:00
Jakub Kądziołka
937c9888a4
Robustly disallow overwriting builtin symbols ( #817 )
2021-03-31 09:03:57 -04:00
Rangi
61a9bfd33c
Some tests use the new macro <name> syntax
...
This happens to make quine.asm shorter
2021-03-31 00:00:18 -04:00
Jakub Kądziołka
d08bcc455d
Handle errors when opening source file
...
Before this commit, opening a file for which the user didn't have
permission resulted in a "Bad file descriptor" error.
2021-03-30 23:35:50 +02:00
Rangi
aaa92659ea
Require a plus sign in ld hl, sp + <e8>
...
Fixes #810
2021-03-30 13:05:21 -04:00
Rangi
be877134e5
Remove support for ld bc/de/hl/sp for ld hl, bc/de/hl/sp
...
Fixes #811
2021-03-30 13:01:49 -04:00
Rangi
d05703c692
Release 0.5.0-rc2
v0.5.0-rc2
2021-03-28 17:15:44 -04:00
Rangi
5dbfafcc55
Update man page copyrights to 2021
2021-03-28 16:37:15 -04:00
Rangi
a265b85d9d
Report "1 error", not "1 errors", when assembly is aborted
...
This matches other such pluralized error messages
2021-03-28 15:55:32 -04:00
Rangi
28abf03c0a
Output USED space, not FREE space, in the .map file
...
Fixes #808
2021-03-28 15:49:44 -04:00
Rangi
7e7f92f18c
Assign section locations to all UNIONs/FRAGMENTs
...
Fixes the test case from #800
The `out.gb` output was corrected, since the two "test"
fragments have a different order in ROM than in SRAM.
It is effectively:
; ROM0[$0000], fragments ordered by size
jr Label
dw Label
db 0
; SRAM[$a000], fragments ordered by .o order
ds 1 ; db 0
ds 2 ; jr Label
Label: ; $a003
ds 2 ; dw Label
2021-03-28 15:21:17 -04:00
Eldred Habert
7461170956
Add LOAD FRAGMENT pc test ( #800 )
...
Reproduces a reported problem, fix pending
2021-03-28 15:11:20 -04:00
Rangi
57d966d6e0
Merge pull request #804 from Rangi42/normal-backslash
...
Backslash in normal lexer mode must be a line continuation
2021-03-26 13:33:11 -04:00
Rangi
17752d7094
Backslash in normal lexer mode must be a line continuation
...
Macro args were already handled by `peek`, and character escapes
do not exist outside of string literals.
This only affects the error message printed when a non-whitespace
character comes after the backslash. Instead of "Illegal character
escape '%s'", it will print "Begun line continuation, but
encountered character '%s'".
2021-03-26 13:23:05 -04:00
ISSOtm
4216f0a9b0
Init top-level fstack node line number
...
It still gets written to the object file, generating Valgrind warnings
about using uninitialized memory. To silence those errors, and make
output more reproducible, init the line no to a dummy (0) value.
2021-03-25 11:26:58 +01:00
ISSOtm
e3fde986ad
Remove hashmap collision warning
...
It was only used to check hashmap collision rate in the wild,
but it no longer has a purpose and produces spurious messages
2021-03-23 21:34:08 +01:00
Rangi
aa99ed056c
Do not evaluate an untaken ELIF's condition
...
Fixes #764
2021-03-23 16:20:24 +01:00
ISSOtm
46d6652df1
Fix missing .sym/.map symbols in SECTION UNION/FRAGMENTs
...
Only the first "slice"'s symbols were considered, forgetting some symbols
2021-03-22 23:23:06 +01:00
ISSOtm
5406674cdd
Install groff to build PDFs correctly in CI
2021-03-20 02:09:47 +01:00
ISSOtm
5d2e2e2182
Make docs update script also produce PDFs
...
See rgbds-www#12
2021-03-20 01:53:26 +01:00
ISSOtm
a929f36bc5
Replace UTF-8 hyphens with ASCII ones in man pages
2021-03-20 01:25:17 +01:00
ISSOtm
bdb84a901f
Use sub-sections for the different symbol types
...
This will make them appear in the ToC, and generate HTML anchors for them
2021-03-19 11:04:22 +01:00
Rangi
093631ca0b
Revise rgbasm(5) string symbol documentation
...
Clarify the differences between EQUS expansion and {interpolation}
2021-03-19 01:48:36 +01:00
Rangi
7e127a4e52
Don't expand string symbols in MACRO and FOR symbol names
...
Explicit {interpolation} can still achieve this, but
to match DEF, REDEF, and PURGE, these new directives that
define symbols do not expand string EQUS.
2021-03-19 01:48:36 +01:00
Rangi
b8093847dc
New definition syntax with leading DEF keyword
...
This will enable fixing #457 later once the old
definition syntax is removed.
2021-03-19 01:48:36 +01:00
Rangi
8d1b56bcf5
rgblink identifies patches' PC sections after reading all sections
...
Fixes #794
2021-03-18 23:53:54 +01:00
ISSOtm
5fb7fcf461
Fix description of rgbgfx -h
...
The old description was backwards and mostly confusing.
2021-03-18 15:35:01 +01:00
Rangi
ee900ae7a3
Add a missing newline to a verbosePrint
2021-03-17 20:53:25 -04:00
ISSOtm
3ca58e13dc
Fix verbose messages claiming non-existent errors
...
They were confusing when trying to debug other things
2021-03-14 18:52:16 +01:00
ISSOtm
aaa4e17454
Add verbose messages for early exit from -MG
...
Should help debugging Make invocations
2021-03-14 18:28:05 +01:00
daid
a81d383f75
Alignment mask was incorrectly checked for 1 instead of 0
...
This caused an `ALIGN[1]` to be ignored.
2021-03-11 13:24:59 +01:00
ISSOtm
60019cf476
Fix a bunch of Clang warnings
...
As reported by #789
Should avoid relying on 32-bit int (for implicit conversions)
and account for more extreme uses of RGBDS.
2021-03-10 10:56:57 +01:00
ISSOtm
5a6a44cbc1
Fix master documentation updater
...
Its path was not synced with a recent change
2021-03-10 01:15:51 +01:00
ISSOtm
b61a187b19
Add forgotten __RGBDS_RC__ symbol
v0.5.0-rc1
2021-03-10 01:09:18 +01:00
ISSOtm
6382f13647
Release 0.5.0-rc1
2021-03-10 01:04:23 +01:00
ISSOtm
714d39c86f
Make some INCBIN errors non-fatal
2021-03-10 01:02:45 +01:00
ISSOtm
f11241c2ae
Add INCBIN tests
2021-03-10 01:02:45 +01:00