Anthony J. Bentley
3e4350afa4
Don't cast calls to malloc().
2014-09-26 00:39:29 -06:00
Anthony J. Bentley
0d07caba60
Remove inconsistent version numbering.
2014-09-25 20:56:15 -06:00
Anthony J. Bentley
3992ce2502
Separate errors that shouldn't have been combined in the first place.
2014-09-25 20:40:25 -06:00
Anthony J. Bentley
215d6f0c5b
Revert 97d431d1f4ad404e282e3781bd195be3f053734d; it breaks things.
2014-09-24 03:40:50 -06:00
Anthony J. Bentley
d7319ecd00
Remove rgblib.
...
I have never used it and it's probably been broken for years.
2014-09-24 03:03:42 -06:00
Anthony J. Bentley
d661b3a532
Now that we replace missing libc functions, switch back to err().
2014-09-24 02:50:39 -06:00
Anthony J. Bentley
97d431d1f4
rgbasm: Avoid unnecessary filename copying.
2014-09-24 00:52:00 -06:00
Anthony J. Bentley
45b6872e2a
rgbasm: Fix TOCTOU and reduce buffering.
2014-09-24 00:23:40 -06:00
Anthony J. Bentley
056109652d
rgbasm: Don't allocate an unnecessary buffer.
2014-09-23 22:22:39 -06:00
YamaArashi
2bf31870a7
Cleaned up lexer
...
- separated the lexer into multiple functions so it is more readable
- fixed issue with long label names in macro arguments
- added error checking code to prevent buffer overflows
2014-08-22 21:44:18 -07:00
YamaArashi
6198cc185c
Remove __LINE__
2014-08-22 01:52:21 -07:00
YamaArashi
e4571bc0fc
Make _NARG work
2014-08-21 19:53:42 -07:00
Anthony J. Bentley
46269240c8
Merge branch 'update-legacy-instructions' of https://github.com/yenatch/rgbds
2014-08-21 11:29:34 -06:00
YamaArashi
b1269ab53a
Improve rgbasm performance
2014-08-21 02:57:43 -07:00
Anthony J. Bentley
3ecd169cd6
Revert previous commit. asmy.y is autogenerated from other .y files.
2014-02-21 03:20:44 -07:00
Anthony J. Bentley
2dab1474b8
asmy.y should not be in gitignore.
2014-02-21 00:56:34 -07:00
Anthony J. Bentley
0f488b6759
Remove unused alloca() implementation.
2014-01-31 00:01:42 -07:00
yenatch
2ff286223b
add instruction "ld hl, sp+nn"
...
The previous "ld hl, [sp+nn]" is incorrect, but remains for compatibility.
2014-01-14 11:51:18 -05:00
yenatch
0ffa4ce9ef
rgbasm: let rgblink try to import undefined symbols
...
Manual imports are inconvenient and don't provide any functionality.
2014-01-07 18:14:58 -05:00
yenatch
fd4b5c8925
rgbasm: update manpage to include -v
2013-12-03 21:58:39 -05:00
yenatch
bc99ee2210
rgbasm: -v option (verbose)
2013-12-03 00:25:12 -05:00
Anthony J. Bentley
de269987f7
Add "jp hl" as a valid instruction.
...
"jp [hl]" has been around for decades even though it makes no sense.
This is better.
2013-09-05 20:51:58 -06:00
Anthony J. Bentley
7770827cce
Redefine consistent names for section types, and document the changes.
2013-07-31 22:14:31 -06:00
Anthony J. Bentley
7ab9742299
Implement SRAM sections.
2013-07-31 20:15:40 -06:00
Anthony J. Bentley
da19380cc4
Add a new WRAMX section type, for banked (CGB) WRAM sections.
2013-06-19 21:19:51 -06:00
Anthony J. Bentley
ab47428c0e
Improve error message.
2013-05-28 02:23:48 -06:00
Anthony J. Bentley
23b29a9ae1
Fix bug recently introduced to fatalerror().
2013-05-28 02:22:49 -06:00
Anthony J. Bentley
35448887af
Implement VRAM banks.
2013-05-23 13:44:12 -06:00
Anthony J. Bentley
6ccd386587
Make it possible to disable emitting nop after halt.
2013-05-19 17:56:41 -06:00
Anthony J. Bentley
34d40a67c9
Remove unused variable.
2013-05-19 17:08:44 -06:00
Anthony J. Bentley
c21c0f458f
Improve error messages.
2013-05-19 17:07:34 -06:00
Anthony J. Bentley
51c01e3aad
Remove some dead code.
2013-05-19 16:14:31 -06:00
Anthony J. Bentley
d0d85abb97
Fix accidental case fallthrough.
2013-05-19 15:51:40 -06:00
Anthony J. Bentley
6579743410
Add support for 8 MiB ROMs, the largest size possible with MBC5.
2012-12-26 21:41:47 -07:00
Anthony J. Bentley
b90406861d
Readability (whitespace).
2012-12-26 21:12:52 -07:00
Anthony J. Bentley
2f35d10373
Merge pull request #5 from vegard/lexer-fix-for-bentley
...
Prevent lexer from reading beyond the end of the buffer
2012-12-01 22:46:21 -08:00
Vegard Nossum
2dfd937d7f
Prevent lexer from reading beyond the end of the buffer
...
On Linux, valgrind complains about the overflow like this:
Pass 1...
==20054== Invalid read of size 1
==20054== at 0x406CDA: yylex (lexer.c:396)
==20054== by 0x40207C: yyparse (asmy.c:2921)
==20054== by 0x4086AF: main (main.c:351)
==20054== Address 0x503a102 is 0 bytes after a block of size 23,538 alloc'd
==20054== at 0x402994D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20054== by 0x406411: yy_create_buffer (lexer.c:147)
==20054== by 0x404FE3: fstk_RunInclude (fstack.c:243)
==20054== by 0x4025F5: yyparse (asmy.y:744)
==20054== by 0x4086AF: main (main.c:351)
==20054==
This is a bit of a crude fix which simply exits the hashing loop when
we reach the end of the string. We should probably do some kind of
length calculation on the buffer instead.
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2012-10-21 06:06:54 +02:00
Vegard Nossum
eb4f790a82
Include getopt.h (fix compilation on GNU/Linux)
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2012-10-21 06:05:30 +02:00
Anthony J. Bentley
5d6559f15f
Remove nonstandard <err.h>.
...
This provides some really nice functions, but does not exist in some
environments (particularly MinGW).
2011-12-02 01:23:23 -07:00
Anthony J. Bentley
b1a2c664a9
Revert use of system exit codes.
...
While well‐intentioned, in practice this hurts portability and
really, nobody checks the return codes anyway.
2011-06-04 21:33:03 -06:00
Anthony J. Bentley
009ac34f32
Remove unnecessary comments from manpage sources
2011-04-10 00:15:35 -06:00
Anthony J. Bentley
9a9d071024
Oops: remove escape that was keeping manpage date from being parsed
2011-04-10 00:12:19 -06:00
Anthony J. Bentley
114871d46d
Move manuals to the main source directories.
2010-12-22 14:23:35 -07:00
bentley
2a3cd65ee8
rgbasm: improve "undefined macro" error message
2010-01-18 20:41:34 -07:00
bentley
5f23215c5d
rgbasm: improve error message for failed INCBIN
2010-01-18 17:42:54 -07:00
bentley
b1469902d6
filesize() function was unused! guess I'll remove it
2010-01-18 15:45:38 -07:00
bentley
761656c54b
fopen does not take a "t" mode
...
"t" is a nonportable way of opening files in text mode. Windows
opens files in text mode by default anyway, and in UNIX there is
no text mode. (Passing "t" to fopen is undefined in standard C.)
2010-01-18 15:40:19 -07:00
bentley
0d16e5c573
rgbasm: fix usage (-p, not -z)
2010-01-18 14:41:24 -07:00
bentley
02e6220742
standardize on -p for setting pad value
2010-01-15 20:04:37 -07:00
bentley
860c9883bb
rgbasm: fix usage information
2010-01-15 19:50:58 -07:00