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
bentley
8406fd84d6
rgbasm: return EX_USAGE for option errors
2010-01-15 19:42:17 -07:00
bentley
5694d6907c
rgbasm: use getopt(3) instead of hand-rolled flag parsing
2010-01-15 19:40:35 -07:00
bentley
c3e212d399
stop a strcpy() warning on OpenBSD
2010-01-15 19:15:24 -07:00
bentley
7474cee70d
rgbasm: use errx() for some error messages
...
Need to replace fstk_Dump to fix the rest of the error messages
2010-01-15 18:51:14 -07:00
bentley
bd84313462
remove GAMEBOY/PCENGINE conditionals (this is a Game Boy assembler)
2010-01-15 17:18:58 -07:00
bentley
4feaa929ff
fix usage fill character info
2010-01-15 17:05:06 -07:00
bentley
48fd34c923
rgbasm: remove option for random fill character
2010-01-15 17:04:34 -07:00
bentley
b63924ebf4
remove endianness code (this is solely a Game Boy assembler now)
2010-01-15 16:46:26 -07:00
bentley
24c1613f06
remove mswin-type define -- this is UNIX
2010-01-15 16:35:10 -07:00
anthony
8f5e767615
list new default init values in usage information (rgbasm, xlink)
2010-01-05 14:21:42 -07:00
anthony
ed3e35e628
set default fillchar for rgbasm to 0, not random
2010-01-05 14:01:32 -07:00
anthony
a014537837
reran indent (whitespace changes)
...
Merging lai's source with this one is very irritating because
they have different indentation styles. I couldn't find what profile
vegard used for his version, so I used these flags (which should bring
the source close to KNF):
-bap
-br
-ce
-ci4
-cli0
-d0
-di0
-i8
-ip
-l79
-nbc
-ncdb
-ndj
-ei
-nfc1
-nlp
-npcs
-psl
-sc
-sob
2009-12-30 12:51:32 -07:00
Anthony Bentley
6c1dd85c9a
add support for partial binary includes (from lmod00)
2009-09-12 18:46:08 -06:00
Anthony Bentley
50a8bbd414
Make grammar specifications yacc-compatible
2009-09-11 21:40:39 -06:00
Vegard Nossum
f81bcc722a
build: merge everything to a single top-level Makefile
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 10:08:32 +02:00
Vegard Nossum
a216855093
Move src/asmotor.h to top-level include/
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 09:29:07 +02:00
Vegard Nossum
cd779b9511
asm: moved includes to include/asm/
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 09:14:19 +02:00
Vegard Nossum
26150fa9d4
asm: add newlines to the ends of yaccprt[134].y
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 09:05:39 +02:00
Vegard Nossum
85f382ffad
asm: run dos2unix on yaccprt1.y
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 09:03:53 +02:00
Vegard Nossum
3c82b1ae03
Fixed warnings and some style issues
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 08:51:55 +02:00
Vegard Nossum
b6c749ffbd
Run `indent' on the whole tree
...
Can't indent the .y files yet, they need special treatment.
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:59:46 +02:00
Vegard Nossum
660f5daac3
Add .gitignore files
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:40:13 +02:00
Vegard Nossum
94fad97aed
Switch line terminators from CRLF to LF
...
Argh, that obnoxious platform again... ;-)
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:32:12 +02:00
Vegard Nossum
0d9739535e
Use spaces instead of tabs after CPP directives
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:26:46 +02:00
Vegard Nossum
0ce5efb3c5
build: remove obsolete objs* directories
...
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:17:03 +02:00
Vegard Nossum
48c34238eb
asm: improve Makefile
...
Make the generated object files explicit and add a "clean" target.
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com >
2009-06-11 07:04:47 +02:00