Commit Graph

18 Commits

Author SHA1 Message Date
ISSOtm
fa0fa4d5ac Significantly overhaul OPT code
Simplify the mess that was option setting (2 redundant variables !?)
Move options to a separate file
Have "modules" own their options, and OPT only access them (less redundancy)
Simplify code, respect naming conventions better
2021-01-22 10:41:09 +01:00
Rangi
165bd8cb71 Allow 'dw' and 'dl' to apply to characters of strings
Fixes #568

The old behavior of `dw "string"` can be replicated with `dw ("string")`; likewise for dl
2020-12-11 11:02:20 +01:00
ISSOtm
304bb9f902 Remove most Hungarian notation in section module
Seriously, it sucks.
2020-09-06 20:43:13 +02:00
ISSOtm
14be01880d Move UNION code inside section.c
Improves organization and locality
2020-09-06 19:18:10 +02:00
ISSOtm
12b7cf3cd4 Move curOffset into section code
Improves organization
2020-09-06 18:50:19 +02:00
Matt Currie
f863a927c1 Make INCBIN's length argument optional
INCBIN can now be used with just a start position to include everything
from the start position until the end of the file.
2020-08-15 17:24:11 +12:00
ISSOtm
1f2f797cb9 Add section fragments
Fixes #517, and hopefully enables RGBDS as a SDCC back-end
2020-07-21 19:56:46 +02:00
James Larrowe
bdf397bba7 Add empty data directive warning
Fixes #516
2020-05-06 09:50:28 -04:00
ISSOtm
665412c073 Implement mid-section alignment directive
Fixes #254.
2020-04-08 12:29:00 +02:00
ISSOtm
b0ec8468e6 Allow specifying offset in addition to alignment 2020-04-08 00:40:41 +02:00
ISSOtm
cb52ae0f26 Implement unionized sections in RGBASM
This touched a lot more code than initially expected, for two reasons.

First, this broke a big RGBASM assumption: that sections are always being
written to at their end. This plus other problems required touching
basically the entirety of `section.c`.

Second, I tried different solutions to solve the above problem, and along
the way I cleaned up many things around. (I believe that keeping this to
"cleanup" commits yields subpar results, and since it's boring they get
postponed anyways.)

RGBLINK support still needs to be added, but this will come next.
2020-03-22 11:06:17 +01:00
ISSOtm
4cc24f4369 Add ds cnt, byte syntax
As suggested by https://github.com/rednex/rgbds/issues/350#issuecomment-498030458
The order `count` then `byte` was decided after some discussion:
- First argument consistent with single-arg syntax
- Intuitive at least to some people other than myself
- Consistent with other assemblers, at least ca65
2020-02-23 22:43:50 +01:00
ISSOtm
91b65c9380 Add include guards and license header to section.h 2020-02-13 15:57:27 +01:00
ISSOtm
eb0d75711a Implement LOAD/ENDL blocks
Basically implements and closes rednex#274.
2020-02-10 03:39:09 +01:00
ISSOtm
2f60e0a59e Use meaningful types for byte output functions 2020-02-10 03:36:51 +01:00
ISSOtm
a4fe274c25 Unify all section declarations 2020-02-10 03:35:55 +01:00
ISSOtm
34597ce6a0 Mark some section functions as const 2020-02-10 03:34:58 +01:00
ISSOtm
d0ec35628f Split section management into its own file 2020-02-10 03:34:58 +01:00