mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
25efb00769cb1a16fe3ab643e4b63d33402a5bcc
The bug showed up when a semicolon was located anywhere after \". These three test cases are syntaxically correct but didn't compile: 1) SECTION "HOME", HOME db "\";" 2) SECTION "HOME", HOME db "\"" nop ; 3) SECTION "HOME", HOME db "\"" ; The problem was located in yy_create_buffer(). Basicaly, this function loads an entire source file, uniformizes EOL terminators and filters out comments without touching literal strings. However, bounds of literal strings were wrongly guessed because \" was interpreted as two characters (and so the double quote was not escaped). In test 1, the string terminates early and so ;" is filtered out as it was a comment and so the assembler complains of an unterminated string. In test 2 and 3, the string is in fact interpreted as two strings, the second one terminates at EOF in these cases and so comments are not filtered out and that makes the assembler complains. A special case must be taken into account: 4) SECTION "HOME", HOME db "\\" ; So we need to ignore \\ as well. Note that there is still a problem left: in yy_create_buffer() a string may span multiple lines but not in the lexer. However in this case I think the lexer would quit at the first newline so there should be nothing to worry about.
----------------
RGBDS README
----------------
RGBDS (Rednex Game Boy Development System) is a free assembler/linker package
for the Game Boy and Game Boy Color. It consists of:
- rgbasm (assembler)
- rgblink (linker)
- rgbfix (checksum/header fixer)
rgbds-linux is a fork of the original RGBDS which aims to make the programs
more like other UNIX tools.
Installing RGBDS (UNIX)
=========================
To build the programs on a UNIX or UNIX-like system, just run in your terminal:
make
Then to install the compiled programs and manual pages, run (with appropriate
privileges):
make install
After installation, you can read the manuals with the man(1) command. E.g.,
man 1 rgbasm
Note: the variables described below can affect installation behavior when given
on the make command line. For example, to install rgbds in your home directory
instead of systemwide, run the following:
mkdir -p $HOME/{bin,man/man1,man/man7}
make install PREFIX=$HOME
PREFIX: Location where RGBDS will be installed. Defaults to /usr/local.
BINPREFIX: Location where the RGBDS programs will be installed. Defaults
to ${PREFIX}/bin.
MANPREFIX: Location where the RGBDS man pages will be installed. Defaults
to ${PREFIX}/man.
Q: Whether to quiet the build or not. To make the build more verbose, clear
this variable. Defaults to @.
Installing RGBDS (Windows)
============================
Windows builds are available here: http://anthony.bentley.name/rgbds/
Copy the .exe files to C:\Windows\ or similar.
Description
Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
asmassemblyassembly-languageassembly-sm83cplusplusgame-boygame-developmentgameboygamedevgbdevgbz80sm83
Readme
MIT
18 MiB
Languages
C++
68%
Assembly
18%
Shell
6.8%
Yacc
5%
CMake
1%
Other
1%