[A83] Re: Assembly Studio 8x


[Prev][Next][Index][Thread]

[A83] Re: Assembly Studio 8x




Apparently, there is a bug in the Assembly Studio 8x preprocessor that
causes it to incorrectly process any assembler directives inside a skipped
conditional.  For example, the following program would fail to assemble:

test.asm:
#if 0
#define foo
#endif

It would give a bogus error:

Error #110 in test.asm, Line 2: Unrecognized preprocessor directive:
"#define"

I'd be willing to fix the bug, if Jeremy would do a new release (since I
have no idea how to generate an MSI, and do not want to do a release of his
program).  Jonah might have fixed this in cz80, in which case all that would
be needed is to do a new release (or simply put a fixed executable on
asmstudio.acz.org).

For now, you can work around it by using two include files, one for the 83,
and one for the 83+.  You will have to manually change which file is
included depending on which calc you want to assemble for, but this should
be a minor inconvenience, considering it won't happen very often.

You can generate the two include files from the original ION include file
using the following shell script.  This should under a UNIX variant or
Cygwin, if it has a C-Compatible Compiler Preprocessor (cpp) with options
compatible to gcc's:

#!/bin/sh
gen()
{
    cat ion.inc | sed "s/^#define/;#define/" | \
    cpp -P -C -nostdinc -undef -DTI$(echo -n $1 | sed "y/p/P/") | \
    sed "s/^;#define/#define/" > ion-$1.inc
}
gen 83
gen 83p

Simply include either ion-83.inc or ion-83p.inc in your source.  If you want
to continue using the progstart #ifdef, then you will still need to define
either TI83 or TI83P.

> A while back, I tried to use Assembly Studio 8x as an IDE to code Ion
> programs (83 plus) in.  I've tried manipulating my code in many ways, but
> it seems I always have errors with the #define statements in
> ion.inc.  Quite often my "bcall"s go as unrecognized instructions.  What
do
> I need to do to make an Ion program in Assembly Studio?  I've had success
> with the UltraEdit-asm.bat combo, so it should work.  What modifications
do
> I need to make to the code?  I'm hoping David Phillips will be able to
help
> me out, but anyone else who knows the program well may be able to help
> too.  I've had the same errors in both Windows ME and Windows 95.





Follow-Ups: References: