Rangi
5fd636ac4b
Implement floored / and divisor-sign % operators ( #745 )
...
Fixes #703
2021-02-21 16:14:44 -05:00
Rangi
d049ffc0f0
Handle string literals within macro arguments ( #685 )
...
Fixes #683 and #691
The lexer's raw mode for reading macro args already attempted
to handle semicolons inside string literals, versus outside ones
which start comments. This change reuses the same function for
reading string literals in normal and raw modes, also handling:
- Commas in strings versus between macro args
- Character escapes
- {Interpolations} and \1-\9 args inside vs. outside strings
- Multi-line string literals
Macro args now allow escaping '\', '"', and '\\'.
A consistent model for expanding macro args and interpolations,
within macro args, string literals, and normal context:
- "{S}" should always equal the contents of S
- "\1" should always act like quoting the value of \1
2021-02-16 22:44:25 -05:00
Rangi
8c0275480c
Allow ds to take multiple values to repeat for a count ( #725 )
...
Fixes #722
2021-02-16 22:01:23 -05:00
Rangi
76d6ef8695
Implement LOAD UNION and LOAD FRAGMENT
...
Fix #632
2021-02-17 03:42:06 +01:00
Rangi
8f20620c16
Allow shifting macro arguments by a negative amount
...
Fixes #733
2021-02-14 16:21:00 +01:00
Rangi
fb39c3a70e
Consistently refer to "directives", not "pseudo-ops"
...
Some docs and warnings already referred to SECTION and
db/dw/dl "directives", but others used "pseudo-ops".
2021-01-19 15:03:22 +01:00
ISSOtm
57b734a7df
Reinstate RL into the _RS family
...
Removal of colon-less labels lifted the grammar ambiguity that
prevented `RL` from being usable as a variable declarator.
Thus, reinstate its functionality.
2021-01-11 01:38:03 +01:00
Rangi
62bea23c49
Implement BREAK to exit REPT and FOR loops
...
Fixes #684
2021-01-08 21:13:23 +01:00
Rangi
77279984a5
Implement STRRPL
...
Fixes #660
STRRPL(str, "", new) does nothing
(warn about it with -Wempty-strrpl)
2021-01-04 00:20:35 +01:00
Rangi
669a392fcd
Revise the rgbasm(5) docs
2021-01-02 08:29:57 +01:00
ISSOtm
51ce0b038a
Remove removed features from documentation
2021-01-02 02:47:13 +01:00
Rangi
a70ecba06f
Implement PRINT and PRINTLN ( #672 )
...
Fixes #669
Closes #368
Closes #624
Deprecate PRINTT, PRINTV, PRINTI, and PRINTF
Default STRFMT("%f") to 5 fractional digits like "{f:}"
Any use of string formatting will share this default
2021-01-02 02:37:32 +01:00
Rangi
9d2d5cfcfe
Implement REDEF to allow redefining EQUS string equates
...
Fixes #677
2021-01-02 01:49:00 +01:00
ISSOtm
18f3c8ff9a
Un-document deprecated _PI
2021-01-02 01:43:49 +01:00
Rangi
895ec5564d
Update mathematical functions ( #675 )
...
Document the existing `ROUND`, `CEIL`, and `FLOOR` functions
Also update the trig function docs for searchability
Implement `POW` and `LOG`
Addresses part of #675
Implement ** for integer exponents
** has higher precedence than -, like Python, so -3**4 == -(3**4) == 81
2021-01-02 01:39:20 +01:00
Rangi
7bb6f71f0b
Change FOREACH to FOR ( #680 )
2021-01-02 00:46:26 +01:00
Rangi
c0ce1da4c3
Implement STRFMT and more printf-like format specifiers for string interpolation ( #646 )
...
Fixes #570
Fixes #178
Use errors for inapplicable format spec flags instead of -Wstring-format
2020-12-29 22:53:15 +01:00
Rangi
6874f694e5
Implement FOREACH ( #658 )
...
This acts like `REPT` with a variable automatically
incremented across a range of values
Fixes #432
2020-12-29 21:30:42 +01:00
Rangi
255b8bf9ba
Implement """triple-quoted""" multi-line strings
...
Fixes #589
2020-12-19 12:34:32 +01:00
Rangi
ad6f17cd93
Support SOURCE_DATE_EPOCH for reproducible builds
...
See https://reproducible-builds.org/docs/source-date-epoch/
Fixes #286
2020-12-19 01:09:45 +01:00
Rangi
0956d300c4
Document \#
2020-12-14 10:48:03 +01:00
ISSOtm
8f2a894b88
Add anonymous labels
...
Fix #497
2020-12-14 10:14:40 +01:00
Rangi
ce58f6d6be
Allow {symbol} interpolation outside of strings
...
Fixes #629
Closes #631
2020-12-13 23:53:16 +01:00
ISSOtm
417cceb0de
Document dw and dl with strings
2020-12-11 11:02:20 +01:00
ISSOtm
e54e02dc77
Correct underscore-in-number documentation
...
No radix actually allows underscores at the beginning of a literal
2020-12-10 16:01:18 +01:00
ISSOtm
2bf3b08d76
Document underscores in numeric literals
2020-12-10 15:40:59 +01:00
Rangi
58739b0bf2
Implement STRRIN, like STRIN but searching from the right
2020-12-10 15:32:17 +01:00
ISSOtm
462fd7539c
Prohibit nested macros
...
After discussion (starting there:
https://github.com/gbdev/rgbds/pull/594#issuecomment-706437458
), it was decided that plain nested macros should not be
allowed.
Since #590 is fixed, EQUS can be used as a workaround;
multiline strings (#589 ) will make that easier on the
user when implemented.
Fixes #588 , supersedes and closes #594 .
Additionally, closes #388 .
2020-12-09 10:44:39 +01:00
ISSOtm
fd721ca480
Document optional RB/RW/RL argument
2020-12-09 09:39:46 +01:00
ISSOtm
4de6266442
Add explanation of how EXPORT works
...
Fixes #608
2020-12-08 21:07:24 +01:00
ISSOtm
9028fb5391
Fix mistakes in RGBDS man pages
...
As reported by `mandoc -Wall`
2020-10-23 01:02:59 +02:00
anderoonies
5230104852
documentation for block comments
2020-10-19 18:05:37 +02:00
ISSOtm
6a8ae643d5
Mention that SHIFT updates _NARG
...
Fixes #598
2020-10-11 02:13:30 +02:00
ISSOtm
914856342c
Fix incorrect documentation of accepted sym names
...
No, they cannot start with a digit!
2020-10-11 01:57:27 +02:00
ISSOtm
66784b7122
Fix documentation not mentioning SECTION FRAGMENTsyntax
2020-09-20 00:06:51 +02:00
ISSOtm
54f2d99ce7
Apply two minor fixes to rgbasm(5)
...
Mustn't → must not
Add a comma to INCBIN sentence to mirror INCLUDE's
2020-09-17 20:45:58 +02:00
ISSOtm
5e63527190
Update repo link at bottom of all man pages
2020-09-15 16:00:17 +02:00
Eldred Habert
76331d1c4a
Merge pull request #552 from mattcurrie/incbin-length-optional
...
Make INCBIN's length argument optional
2020-08-23 00:11:54 +02:00
Matt Currie
c389e8dccb
Fix typo
...
'arugment' => 'argument'
2020-08-17 13:57:58 +12:00
ISSOtm
fcfecc6e82
Improve description of @ symbol
...
As requested by someone on GBDev
2020-08-15 15:23:11 +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
Brayden Morris
83aa456d05
Fix error in documentation about unary not
2020-07-13 09:32:43 -06:00
ISSOtm
0157ba63d3
Document whitespace before local labels
2020-04-08 15:08:29 +02:00
ISSOtm
9e3d8b22cb
Document new intra-section align
...
Also sneak in two code style fixes forgotten in last commit
2020-04-08 15:01:36 +02:00
ISSOtm
5039af6af1
Document new "unionized section" feature
2020-03-26 23:50:30 +01:00
ISSOtm
9113647d41
Fix incorrect macro used for x-ref
2020-03-26 23:11:01 +01:00
ISSOtm
713eef9ef2
Update mandoc style sheet
2020-03-26 23:11:01 +01:00
ISSOtm
7635a2fc74
Reword and give an example of symbol interpolation
2020-03-26 23:11:01 +01:00
ISSOtm
7955447ca4
Overhaul man pages
2020-03-26 23:11:01 +01:00