Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3741 > unrolled thread

Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)?

Started byBenoit0123 <bgilon@free.fr>
First post2017-07-31 11:41 +0000
Last post2017-07-31 10:41 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)? Benoit0123 <bgilon@free.fr> - 2017-07-31 11:41 +0000
    Re: Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)? Marco Verpelli <mverpelli@libero.it> - 2017-07-31 05:24 -0700
      Re: Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)? Benoit0123 <bgilon@free.fr> - 2017-07-31 16:43 +0000
        Re: Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)? Marco Verpelli <mverpelli@libero.it> - 2017-07-31 10:41 -0700

#3741 — Something weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)?

FromBenoit0123 <bgilon@free.fr>
Date2017-07-31 11:41 +0000
SubjectSomething weird with Merlin 8 (2.48 for DOS 3.3/2.58 for ProDOS)?
Message-ID<benoit0123-1501501537@macgui.com>
While designing a tiny utility for extending DOS 3.3 in some directions
lately, I found what I am currently considering a strange behavior from
Merlin..
Here is a very simple source file that illustrates this:
 1  TR ON
 2  ORG $4000
 3
 4  LDA #LONG
 5
 6 FNDVAR2 NOP
 7  DS \
 8 LONG EQU *-FNDVAR2
 9  END
Illegal forward ref in line: 8.
But the LONG is still correctly computed (accoring to listing) as value $FE.
However, whenever I change line 2 so that the distance between *(from line
8) and FNDVAR2 becomes greater than 256 bytes (i.e. 2 ORG $3FFE), the error
is not raised anymore.
My current thinking (but w/o any concrete fact) is that it might be
connected to how the page zero adressing is handled within Merlin 8.
I noted the same behavior in v2.48 (DOS3.3) and v2.58 (ProDOS) of Merlin 8.

Any feedback would be welcome in this thread..
Thank you for reading,
Benoît

-- 
Growing old is mandatory..
growing up is optional..
But the other way round is as true.

[toc] | [next] | [standalone]


#3742

FromMarco Verpelli <mverpelli@libero.it>
Date2017-07-31 05:24 -0700
Message-ID<273d4c75-8b83-4539-87ac-e83ce38ada16@googlegroups.com>
In reply to#3741
It seems to me that this is the case in the manual on page 87.

NOTE: The assembler will not permit an EQUate to a zero page number after the label equated has been used, since bad code could result from such a situation . Also see the section on Variables.

(1) For Example:

1 LABEL LDA #LEN
2 LABEL DFB $00
3 DFB $01
4 LEN EQU * - LABEL

When assembled, this will give an "ILLEGAL FORWARD REFERENCE IN LINE 4" ERROR message. The solution is as follows:

1 LDA #END - LABEL
2 LABEL DFB $00
3 DFB $01
4 END

Marco

[toc] | [prev] | [next] | [standalone]


#3743

FromBenoit0123 <bgilon@free.fr>
Date2017-07-31 16:43 +0000
Message-ID<benoit0123-1501519676@macgui.com>
In reply to#3742
Marco Verpelli wrote:
> It seems to me that this is the case in the manual on page 87.
> 
> NOTE: The assembler will not permit an EQUate to a zero page number after
> the label equated has been used, since bad code could result from such a
> situation . Also see the section on Variables.
> 
> (1) For Example:
> 
> 1 LABEL LDA #LEN
> 2 LABEL DFB $00
> 3 DFB $01
> 4 LEN EQU * - LABEL
> 
> When assembled, this will give an "ILLEGAL FORWARD REFERENCE IN LINE 4"
> ERROR message. The solution is as follows:
> 
> 1 LDA #END - LABEL
> 2 LABEL DFB $00
> 3 DFB $01
> 4 END
> 
> Marco
>
Thank you Marco, that is exactly that. Shame on I. I should have read the
"not fucking manual" this time too.
Benoît



-- 
Growing old is mandatory..
growing up is optional..
But the other way round is as true.

[toc] | [prev] | [next] | [standalone]


#3744

FromMarco Verpelli <mverpelli@libero.it>
Date2017-07-31 10:41 -0700
Message-ID<a6c8ce6c-ed8a-48c6-815d-db42dcc6ebf7@googlegroups.com>
In reply to#3743
Don't panic!
The only assembly I was taught is for HP-1000.
All the other things I know I learned the hard way.

Marco

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web