Commit Graph

15 Commits

Author SHA1 Message Date
Antonio Niño Díaz
a6a47ff66d Implement HIGH() and LOW() operators
They work with the 16-bit registers BC, DE and HL, returning the
corresponding 8-bit register. HIGH() works with AF as well, returning A.

They also work with any kind of constant or symbol, generating a RPN
patch in the object file if the value is not defined at assembly time.

They work with macro arguments as well.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
2017-04-06 22:40:34 +01:00
AntonioND
e50e3e5a23 Remove trailing whitespace
Signed-off-by: AntonioND <antonio_nd@outlook.com>
2017-04-02 17:46:14 +01:00
AntonioND
7b8d4de35c Merge pull request #16 from yenatch/eval-rpn-bank
rgbasm: Evaluate BANK() arguments to verify they exist.
2017-02-27 21:21:45 +00:00
Ben10do
0a66e14307 Fix division by zero crashes in instructions
Previously, rgbasm could crash with a floating point exception if an
instruction includes a division or modulo by 0. Fixes #49.
2017-01-26 21:32:06 +00:00
stag019
ebc9a4b786 Merge include/link/types.h and include/asm/types.h into include/types.h 2015-03-07 16:04:07 -05:00
Anthony J. Bentley
e5e64b8cec rgbasm: trim ludicrously redundant comments. 2015-01-07 23:36:08 -07:00
yenatch
b2d523acde rgbasm: Evaluate BANK() arguments to verify they exist.
Symbols are created when using a label in the wild, even if they aren't defined. Solely using a symbol as an argument to BANK() skips this, so the symbol is never created.

This evaluates the argument instead of trying to find a symbol. This way, symbols that don't exist are created when passed into BANK().
2014-02-01 21:14:56 -05:00
Anthony J. Bentley
c21c0f458f Improve error messages. 2013-05-19 17:07:34 -06:00
bentley
bd84313462 remove GAMEBOY/PCENGINE conditionals (this is a Game Boy assembler) 2010-01-15 17:18:58 -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
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
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
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
b53e170781 Make all file names lowercase
This fixes a zip/platform artifact.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-11 06:25:27 +02:00