rmac
5 years agoExtended switch -s to also warn about automatically applied 68000 optimisations....
ggn [Mon, 16 Nov 2015 11:53:02 +0000 (13:53 +0200)]
Extended switch -s to also warn about automatically applied 68000 optimisations. Added switch -w to turn off all automatic optimisations.

5 years agoTEXT/DATA/BSS sizes printed at the end of assembly only when -v is invoked.
ggn [Mon, 16 Nov 2015 11:54:03 +0000 (13:54 +0200)]
TEXT/DATA/BSS sizes printed at the end of assembly only when -v is invoked.

5 years agoASCII art logo, because why not.
ggn [Mon, 16 Nov 2015 11:49:53 +0000 (13:49 +0200)]
ASCII art logo, because why not.

5 years agoFix for assembly getting stuck in an infinite loop when a INCLUDEd file inside an...
ggn [Mon, 16 Nov 2015 11:39:50 +0000 (13:39 +0200)]
Fix for assembly getting stuck in an infinite loop when a INCLUDEd file inside an if/endif statement contains unbalanced if/endifs.

5 years agoBump version #, also create "docs" subdir for documentation. :-)
Shamus Hammons [Sat, 14 Nov 2015 21:24:43 +0000 (15:24 -0600)]
Bump version #, also create "docs" subdir for documentation. :-)

5 years agoNew directive: PRGFLAGS sets GEMDOS PRG flags (such as Fastload, etc)
ggn [Sat, 14 Nov 2015 17:57:21 +0000 (19:57 +0200)]
New directive: PRGFLAGS sets GEMDOS PRG flags (such as Fastload, etc)

5 years agoBump version #.
Shamus Hammons [Sat, 14 Nov 2015 16:42:53 +0000 (10:42 -0600)]
Bump version #.

5 years agoFix for initial plus in expression throwing a "bad expression error"
ggn [Fri, 13 Nov 2015 08:27:46 +0000 (10:27 +0200)]
Fix for initial plus in expression throwing a "bad expression error"

5 years agoFix segfaulting when building .prg target on linux and cygwin.
ggn [Wed, 11 Nov 2015 13:43:34 +0000 (15:43 +0200)]
Fix segfaulting when building .prg target on linux and cygwin.

5 years agoTentative fix for bug #55. Thanks to ggn for reporting!
Shamus Hammons [Wed, 11 Nov 2015 03:44:44 +0000 (21:44 -0600)]
Tentative fix for bug #55. Thanks to ggn for reporting!

5 years agoBump version #.
Shamus Hammons [Wed, 11 Nov 2015 02:42:11 +0000 (20:42 -0600)]
Bump version #.

5 years agoNew keyword ^^ABSCOUNT counts bytes defined in current .abs section.
ggn [Tue, 10 Nov 2015 20:46:53 +0000 (22:46 +0200)]
New keyword ^^ABSCOUNT counts bytes defined in current .abs section.

5 years agoRe-introduced .abs mnemonic (it was renamed to .offset for some reason) like madmac.
ggn [Tue, 10 Nov 2015 09:06:38 +0000 (11:06 +0200)]
Re-introduced .abs mnemonic (it was renamed to .offset for some reason) like madmac.

5 years agoFix for bug where ^^FOO mnemonics were parsed incorrectly.
Shamus Hammons [Tue, 10 Nov 2015 19:38:30 +0000 (13:38 -0600)]
Fix for bug where ^^FOO mnemonics were parsed incorrectly.

5 years agoComplete MADMAC manuals. Thanks to ggn for contributing this!
Shamus Hammons [Tue, 10 Nov 2015 00:35:20 +0000 (18:35 -0600)]
Complete MADMAC manuals. Thanks to ggn for contributing this!

5 years agoChange extension to .prg when invoked with -p.
ggn [Mon, 9 Nov 2015 21:02:48 +0000 (23:02 +0200)]
Change extension to .prg when invoked with -p.

5 years agoBumping the patch level for the last commit. :-P
Shamus Hammons [Tue, 10 Nov 2015 00:30:16 +0000 (18:30 -0600)]
Bumping the patch level for the last commit. :-P

5 years agoFix for bug #51. Apparently 10 tokens weren't enough for modern programming!
ggn [Mon, 9 Nov 2015 21:03:47 +0000 (23:03 +0200)]
Fix for bug #51. Apparently 10 tokens weren't enough for modern programming!

5 years agoRemoved generated file from project.
Shamus Hammons [Sun, 1 Nov 2015 15:30:22 +0000 (09:30 -0600)]
Removed generated file from project.

5 years agoFix for bug #46 (thanks to ggn for reporting!).
Shamus Hammons [Sun, 1 Nov 2015 15:14:52 +0000 (09:14 -0600)]
Fix for bug #46 (thanks to ggn for reporting!).

5 years agoBump version # again. :-)
Shamus Hammons [Sun, 1 Nov 2015 14:53:46 +0000 (08:53 -0600)]
Bump version # again. :-)

5 years agoForce -fa when user passes -p.
ggn [Sat, 31 Oct 2015 13:36:34 +0000 (15:36 +0200)]
Force -fa when user passes -p.

5 years agoBump version number.
Shamus Hammons [Sun, 1 Nov 2015 14:44:51 +0000 (08:44 -0600)]
Bump version number.

5 years agoA few compiler warnings pacified.
ggn [Sat, 31 Oct 2015 11:02:40 +0000 (13:02 +0200)]
A few compiler warnings pacified.

5 years agoFix for bug that happened when a called macro inside an if/endif block would have...
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)

5 years agoFixed compilation on MinGW.
ggn [Thu, 22 Oct 2015 16:41:58 +0000 (19:41 +0300)]
Fixed compilation on MinGW.

5 years agoFix NULL pointer dereference bug.
Shamus Hammons [Wed, 7 Oct 2015 16:53:50 +0000 (11:53 -0500)]
Fix NULL pointer dereference bug.

5 years agoFix for bug #34 (equated reg in 1st operand of MOVEI).
Shamus Hammons [Wed, 7 Oct 2015 15:44:48 +0000 (10:44 -0500)]
Fix for bug #34 (equated reg in 1st operand of MOVEI).

Thanks to Linkovitch for reporting!

5 years agoFix for bug #33. Thanks to Linkovitch for reporting!
Shamus Hammons [Wed, 7 Oct 2015 15:21:55 +0000 (10:21 -0500)]
Fix for bug #33. Thanks to Linkovitch for reporting!

5 years agoFixed WARNING macro to be system agnostic, added doco for -p switch.
Shamus Hammons [Wed, 7 Oct 2015 03:23:59 +0000 (22:23 -0500)]
Fixed WARNING macro to be system agnostic, added doco for -p switch.

5 years agoVisual Studio 2015 project files. A few warnings about unused variables fixed.
ggn [Sun, 30 Aug 2015 18:12:34 +0000 (21:12 +0300)]
Visual Studio 2015 project files. A few warnings about unused variables fixed.

Signed-off-by: Shamus Hammons <jlhamm@acm.org>
5 years agoApplied patches from ggn for bugs #38, 40, & 41. Thanks!
Shamus Hammons [Wed, 7 Oct 2015 02:09:15 +0000 (21:09 -0500)]
Applied patches from ggn for bugs #38, 40, & 41. Thanks!

6 years agoFix for incorrect PACK/UNPACK generation. Thanks to A. Seed for reporting.
Shamus Hammons [Wed, 4 Mar 2015 03:12:13 +0000 (21:12 -0600)]
Fix for incorrect PACK/UNPACK generation. Thanks to A. Seed for reporting.

6 years agoFix for bad division in expressions. Thanks to A. Seed for reporting!
Shamus Hammons [Thu, 19 Feb 2015 16:04:29 +0000 (10:04 -0600)]
Fix for bad division in expressions. Thanks to A. Seed for reporting!

6 years agoFix for "*" getting bad section attributes, reported by A. Seed.
Shamus Hammons [Thu, 19 Feb 2015 14:56:14 +0000 (08:56 -0600)]
Fix for "*" getting bad section attributes, reported by A. Seed.

6 years agoRemoved spurious printf.
Shamus Hammons [Sun, 1 Feb 2015 03:16:15 +0000 (21:16 -0600)]
Removed spurious printf.

6 years agoFixed a nasty bug that dropped symbols that shouldn't have been.
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.

6 years agoMisc. whitespace cleanups, removal of unneeded code.
Shamus Hammons [Fri, 16 Jan 2015 17:16:33 +0000 (11:16 -0600)]
Misc. whitespace cleanups, removal of unneeded code.

6 years agoFix for spurious 'undefined register equate' error.
Shamus Hammons [Fri, 16 Jan 2015 14:24:24 +0000 (08:24 -0600)]
Fix for spurious 'undefined register equate' error.

6 years agoFixed bug with -l switch.
Shamus Hammons [Tue, 13 Jan 2015 17:06:11 +0000 (11:06 -0600)]
Fixed bug with -l switch.

Turns out that the tokenClass buffer was too small, leading the eval()
function to dip into random memory. *facepalm*

6 years agoFix for bug #29.
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. :-)

6 years agoFixed word reversed fixup problem.
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. :-/

6 years agoFixed ignored label on rept line (bug #18)
Shamus Hammons [Fri, 14 Mar 2014 15:48:53 +0000 (10:48 -0500)]
Fixed ignored label on rept line (bug #18)

6 years agoFixed ignored last line with no EOL bug. (bug #19)
Shamus Hammons [Fri, 14 Mar 2014 14:05:35 +0000 (09:05 -0500)]
Fixed ignored last line with no EOL bug. (bug #19)

7 years agoFOR GREAT JUSTICE
Shamus Hammons [Wed, 26 Feb 2014 14:30:26 +0000 (08:30 -0600)]
FOR GREAT JUSTICE

7 years agoFix for extraneous newlines in .print directive.
Shamus Hammons [Sun, 23 Feb 2014 03:46:01 +0000 (21:46 -0600)]
Fix for extraneous newlines in .print directive.

7 years agoAdded "legacy mode" to assembler, which is on by default.
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. :-)

7 years agoFixed subtle bug in expr().
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!

7 years agoFixed assembler not complaining when using RISC regs in 68K mode.
Shamus Hammons [Fri, 13 Sep 2013 02:59:10 +0000 (21:59 -0500)]
Fixed assembler not complaining when using RISC regs in 68K mode.

7 years agoForgot minor release number bump. :-P
Shamus Hammons [Thu, 12 Sep 2013 15:00:35 +0000 (10:00 -0500)]
Forgot minor release number bump. :-P

7 years agoFixed segfault on encountering unexpected register in RISC section.
Shamus Hammons [Thu, 12 Sep 2013 14:44:40 +0000 (09:44 -0500)]
Fixed segfault on encountering unexpected register in RISC section.

7 years agoAdded deprecated keywords JPAD/NOJPAD for legacy code. :-)
Shamus Hammons [Sat, 30 Mar 2013 22:42:41 +0000 (17:42 -0500)]
Added deprecated keywords JPAD/NOJPAD for legacy code. :-)

8 years agoFix for last broken commit. Sorry about that!
Shamus Hammons [Tue, 5 Mar 2013 17:59:07 +0000 (11:59 -0600)]
Fix for last broken commit. Sorry about that!

8 years agoMore fixups to remove warnings, removal of more cruft.
Shamus Hammons [Tue, 5 Mar 2013 17:47:22 +0000 (11:47 -0600)]
More fixups to remove warnings, removal of more cruft.

8 years agoVarious code cleanups, mainly to do with RISC assembly.
Shamus Hammons [Mon, 4 Mar 2013 13:36:09 +0000 (07:36 -0600)]
Various code cleanups, mainly to do with RISC assembly.

8 years agoFix silly mask bugs, added check for use of undefined register equates.
Shamus Hammons [Sat, 2 Mar 2013 20:22:33 +0000 (14:22 -0600)]
Fix silly mask bugs, added check for use of undefined register equates.

8 years agoFix for slow .incbin performance.
Shamus Hammons [Wed, 27 Feb 2013 14:44:33 +0000 (08:44 -0600)]
Fix for slow .incbin performance.

8 years agoFixed subtle bug in section marking code.
Shamus Hammons [Sat, 16 Feb 2013 03:27:29 +0000 (21:27 -0600)]
Fixed subtle bug in section marking code.

Thanks to Linkvitch for helping find this one! Also, found and removed
some more 'GPU in Main' cruft hiding out in sect.c. Gone!

8 years agoRemoving cruft...
Shamus Hammons [Thu, 14 Feb 2013 19:23:45 +0000 (13:23 -0600)]
Removing cruft...

8 years agoAdded optimization flags to makefile (how long was THAT missing?)
Shamus Hammons [Thu, 14 Feb 2013 19:22:54 +0000 (13:22 -0600)]
Added optimization flags to makefile (how long was THAT missing?)

8 years agoAdded win32 cross-compilation script.
Shamus Hammons [Thu, 14 Feb 2013 00:49:17 +0000 (18:49 -0600)]
Added win32 cross-compilation script.

8 years agoForgot to bump patch level :-P
Shamus Hammons [Wed, 13 Feb 2013 18:52:49 +0000 (12:52 -0600)]
Forgot to bump patch level :-P

8 years agoAdded new .cstruct construct. Thanks to GroovyBee for the suggestion!
Shamus Hammons [Wed, 13 Feb 2013 18:51:43 +0000 (12:51 -0600)]
Added new .cstruct construct. Thanks to GroovyBee for the suggestion!

8 years agoFixed regression in RISC JR cc, <label> handling.
Shamus Hammons [Wed, 13 Feb 2013 03:01:34 +0000 (21:01 -0600)]
Fixed regression in RISC JR cc, <label> handling.

8 years agoFixed .cargs problem, more code cleanup/fixup
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!

8 years agoFirst stab at removing cruft.
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.

8 years agoBumped object size from 4MB to 6MB (ggn).
Shamus Hammons [Tue, 12 Feb 2013 14:30:29 +0000 (08:30 -0600)]
Bumped object size from 4MB to 6MB (ggn).

8 years agoForgot to bump patch level on version.h :-P
Shamus Hammons [Sun, 3 Feb 2013 22:44:40 +0000 (16:44 -0600)]
Forgot to bump patch level on version.h :-P

8 years agoFixed missing error reporting on fixup stage.
Shamus Hammons [Sun, 3 Feb 2013 17:59:21 +0000 (11:59 -0600)]
Fixed missing error reporting on fixup stage.

8 years agoFixed error reporting wrong file, off-by-one error in file record system.
Shamus Hammons [Sun, 3 Feb 2013 16:39:51 +0000 (10:39 -0600)]
Fixed error reporting wrong file, off-by-one error in file record system.

8 years agoFixed compiler not checking for INCBIN in BSS sections.
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

8 years agoFixed problem with nested MACROs.
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.

8 years agoSmall fix for FU_JR fixups.
Shamus Hammons [Sat, 24 Nov 2012 20:00:29 +0000 (14:00 -0600)]
Small fix for FU_JR fixups.

8 years agoFirst working 64-bit version of RMAC
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).

8 years agoCode cleanup and prepartion for 64-bit host fixes
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.

8 years agoNo more crash whith some assembler file :
SCPCD [Mon, 9 Jul 2012 15:28:06 +0000 (15:28 +0000)]
No more crash whith some assembler file :
the mask applied to "attr" in "fixup" function was wrong.

With a mask of 0x0200, other FU_xxx can match and unexpected behavior will arise.

9 years agoMore readability cleanups.
James Hammons [Thu, 19 Jan 2012 22:28:32 +0000 (22:28 +0000)]
More readability cleanups.

9 years agoCode cleanups.
James Hammons [Wed, 18 Jan 2012 02:06:46 +0000 (02:06 +0000)]
Code cleanups.

9 years agoFix problem in tokenizer that caused legit code to make assembler barf.
James Hammons [Wed, 18 Jan 2012 01:23:27 +0000 (01:23 +0000)]
Fix problem in tokenizer that caused legit code to make assembler barf.

9 years agoFix submitted by partycle: Make errors GNU compatible.
James Hammons [Wed, 11 Jan 2012 17:31:31 +0000 (17:31 +0000)]
Fix submitted by partycle: Make errors GNU compatible.

9 years agoRemoved Interactive Mode. Sorry, but the 1980s called and said they wanted
James Hammons [Mon, 2 Jan 2012 12:09:20 +0000 (12:09 +0000)]
Removed Interactive Mode. Sorry, but the 1980s called and said they wanted
their limited resource feature back. ;-)

9 years agoUpdated printf commands that were complaining about long-words as necessary.
Graeme Hinchliffe [Sun, 1 Jan 2012 18:22:47 +0000 (18:22 +0000)]
Updated printf commands that were complaining about long-words as necessary.

Updated date in copyright from 2011 to 2011-2012

9 years agoCreated a quick and dirty windows based makefile.
Graeme Hinchliffe [Sun, 1 Jan 2012 18:05:45 +0000 (18:05 +0000)]
Created a quick and dirty windows based makefile.

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)

9 years agocorrected main's deffinition and set it to return with 0 so make didn't cry
Graeme Hinchliffe [Wed, 28 Dec 2011 12:38:51 +0000 (12:38 +0000)]
corrected main's deffinition and set it to return with 0 so make didn't cry

9 years agoFix for USP token, submitted by ggn.
James Hammons [Tue, 27 Dec 2011 14:10:26 +0000 (14:10 +0000)]
Fix for USP token, submitted by ggn.

9 years agoVarious cleanups to fix compiler warnings.
James Hammons [Mon, 26 Dec 2011 23:54:45 +0000 (23:54 +0000)]
Various cleanups to fix compiler warnings.

9 years agoInitial commit.
James Hammons [Mon, 26 Dec 2011 22:50:27 +0000 (22:50 +0000)]
Initial commit.