ggn [Fri, 30 Oct 2015 17:30:21 +0000 (19:30 +0200)]
Fix for bug that happened when a called macro inside an if/endif block would have a syntax error: the assembler would get stuck in an infinite loop (Error: mismatched .endif)
Shamus Hammons [Sun, 1 Feb 2015 02:49:38 +0000 (20:49 -0600)]
Fixed a nasty bug that dropped symbols that shouldn't have been.
This stemmed from the fact that EQUR symbols somehow made it on to the
symbol declaration list. If such symbol was later .equrundef'd, it would
find it's way back onto the the sdecl list *twice*, with the result
that any symbols that came after it would be summarily discarded into
the ether. Really, really bad mojo.
Shamus Hammons [Fri, 14 Nov 2014 04:26:00 +0000 (22:26 -0600)]
Fix for bug #29.
Whoever put this stuff together made a HUGE mistake in its alignment
pseudo-ops. Basically, before this fix, alignment directives in a RISC
section had absolutely NO guarantees of efficacy. This is what happens
when you bodge things together without extensive testing! Note that if
you had some RISC code that you had to wave a dead chicken at to get it
to work, it will probably not work any longer as the assembler will now
do what you tell it to. ;-)
This is a big enough change that it merits a minor version bump; we're
now at 1.3.0. :-)
Shamus Hammons [Sat, 17 May 2014 20:56:15 +0000 (15:56 -0500)]
Fixed word reversed fixup problem.
For some reason, there was code in several places that marked fixups/symbols
as belonging to a RISC section when it was clearly not the case. As a result,
it caused serious problems by reversing words in 68K sections just because a
symbol had been seen in a MOVEI # statement in a RISC section. Probably not
the last nasty surprise in this pile of spaghetti. :-/
Shamus Hammons [Mon, 13 Jan 2014 03:44:04 +0000 (21:44 -0600)]
Added "legacy mode" to assembler, which is on by default.
Apparently MAC did fixups for programmers who forgot that they couldn't
put a MOVEI immediately after a JUMP or JR, so we do the same to keep
legacy code assembling (though we may flip the default to OFF at some
time in the future :-P). If you don't like the assembler doing stuff like
that behind your back, you can tell it not to by adding the -n switch to
your command line.
There are lots of other cases that the user should be warned about with
RISC code; these will be added in future commits. :-)
Shamus Hammons [Sat, 9 Nov 2013 15:01:57 +0000 (09:01 -0600)]
Fixed subtle bug in expr().
Basically, expr() was looking at the token following the one it was
looking at and bypassing the longer parse path if it found an EOL token
there. Problem is, some tokens have follow on values and so can be
considered compound tokens. In this case, the EOL token codes to 101,
having a constant with a value of 101 will not evaluate correctly in
this case as the CONST token is a compound token.
The short of this is that making assumptions is BAD! Don't do it! It
WILL come around to bite you in the ass eventually, in the form of
subtle bugs that are difficult to chase down. Assume nothing!
Shamus Hammons [Wed, 13 Feb 2013 02:14:47 +0000 (20:14 -0600)]
Fixed .cargs problem, more code cleanup/fixup
Thanks to GroovyBee for reporting the .cargs problem! Also, pretty much
all of the remaining cruft coming from the misguided "GPU in Main" cult
has been removed. Never do in an assembler what you can do with either
macros or a good preprocessor!
Shamus Hammons [Tue, 12 Feb 2013 18:32:56 +0000 (12:32 -0600)]
First stab at removing cruft.
Removing all automatic code munging in the background by the RISC
compiler, including GPU in main idiocy. This means there are no more
built-in macros either. If you really needed this functionality, you can
put macros in your source code to do it. It doesn't belong in the guts
of the assembler.
Shamus Hammons [Sat, 2 Feb 2013 21:04:59 +0000 (15:04 -0600)]
Fixed compiler not checking for INCBIN in BSS sections.
Apparently the compiler did not care if an INCBIN happened in a BSS
section or not. Now the compiler cares and gives an error if you try to
do this terrible, terrible thing. :-D
Shamus Hammons [Mon, 26 Nov 2012 04:49:46 +0000 (22:49 -0600)]
Fixed problem with nested MACROs.
While the assembler is in better shape vis-a-vis 64-bitness, there's
still a long way to go towards refactoring the thing to remove all
the problems it has with crufty data structures, and I'm sure there's
still bugs left in things like the .rept directive.
Shamus Hammons [Sat, 24 Nov 2012 19:48:52 +0000 (13:48 -0600)]
First working 64-bit version of RMAC
There's still lots to do, like refactoring a bunch of stuff that's
still basically wrong, but that's par for the course. There may be
more things that need fixing (like the .rept function, for example).
Shamus Hammons [Fri, 23 Nov 2012 16:39:09 +0000 (10:39 -0600)]
Code cleanup and prepartion for 64-bit host fixes
I removed a few functions that are better off being handled by the
native system libraries (malloc for amem, strdup for nstring). Also,
cleaned up files in preparation for removing pointers from the token
stream--which is preventing RMAC from working on 64-bit systems.
Corrected definitions of BYTE, WORD and LONG to appropriate uintN_t values.. (it's warning like a mofo at the moment but tested and it assembled happily enough 68K and RISC)