• Please review our updated Terms and Rules here

Merlin Assembler Problems

Mister_Al

Member
Joined
Jul 16, 2011
Messages
26
Okay, this has been plaguing me for awhile.

I downloaded the "Merlin" assembler to learn 6502 assembly, version 1.34. Everything seems to work except for two things:

1. The OBJ command always returns an error during assembly.
2. After assembling a program, using the ORG command to place it at location $300, I try running it via Merlin's monitor, but just get a listing for that particular line(plus or minus 2) rather than the program running.

I am running this on Virtual II 6.3.7, with an Apple II E ROM.

Does anyone know what's going on?
 
I don't know Merlin, but in other assemblers ORG is usually an assembler statement placed in the source to tell the assembler to assemble source for that starting address.
Like this
Code:
$ORG 0300H
; source code follows here
or something to that effect.
 
Last edited:
Hi,
Sorry I use this post for my question, with Merlin assembler on real Apple IIe

I want use this with address in data

LDA $C058

with
300 : LDY #$0
303 : LDA DATA,y
3xx : INY
3xx : BNE $0300

DATA DA (for define address) $C058,$C059,$C058,.......

And this not work because first data in DATA is C0 and not the address $C058.
How to my LDA DATA,y can read an address like if I write LDA $C058, LDA $C059, LDA $C058,.....

Thx
 
@Gliou welcome to the forum!

You might want to introduce yourself, in a new thread. It's always good to meet other folks doing software development on the Apple ][.

- Alex
 
Hi,
Sorry I use this post for my question, with Merlin assembler on real Apple IIe

I want use this with address in data

LDA $C058

with
300 : LDY #$0
303 : LDA DATA,y
3xx : INY
3xx : BNE $0300

DATA DA (for define address) $C058,$C059,$C058,.......

And this not work because first data in DATA is C0 and not the address $C058.
How to my LDA DATA,y can read an address like if I write LDA $C058, LDA $C059, LDA $C058,.....

Thx
Welcome. Perhaps you can provide a summary of what it is you're attempting to do. From the statement:

And this not work because first data in DATA is C0 and not the address $C058.​

I suspect what you're wanting to do is load the address $C058 into the accumulator. If this suspicion is correct then what you want to do is not possible. The 6502 is an 8 bit processor which cannot store a 16 bit address in any (aside from the program counter) of its registers. Thus the LDA DATA,y is doing exactly what it is supposed to do...load the 8 bit value $C0 into the accumulator.

Depending on what you are attempting to do you may need to use either (indirect, x) or (indirect),y instead.
 
Last edited:
Back
Top