[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Found a minor bug in Merlin-8 v2.58
Sheldon Simms <wssimms@gmail.com> wrote:
> On 2013-03-03 17:43:50 +0000, Antoine Vignau said:
>
>> Did you enter a "ORG $8000" in your code or was it assembled w/o?
>> If it was w/o, can you add it and reassemble?
>> antoine
>
> It is the same with or without an ORG.
>
> I ran across while I was trying to assemble part of Prodos. The prodos
> source listings floating around the net use some constructs that Merlin
> rejects as "illegal forward references", For example:
>
> lda #len
> ...
> msg asc "Hello"
> len equ *-msg
>
> I was rewriting the code to work around this and discovered this error
> when I forgot the '#' on the load.
Of course, issuing an "illegal forward reference" is an error, too, since
the # syntax means, by default, "use the low 8 bits of the value of the
expression" which can easily be computed during pass 2.
Many assemblers contain such annoyances, perhaps because almost every
assembler is the first assembler ever written by its author--often with
"quick and dirty" intent. ;-)
(As they say, "quick and dirty" is never quick, but always dirty. ;-)
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon