• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

apple ii assembler resources

Hi,

I'm trying to learn 6502 assembler programming for the apple iie, but I'm having a hard time finding documentation.

I've found some 80s tutorials in text format but they're far from useful.

Can anybody point me to the right direction?

Cheers, Nahuel

 
Text and PDF versions of Randy Hyde's book on Apple II assembly language programming are available to download from various places. Also, http://www.obelisk.demon.co.uk/6502/ is an excellent introduction to 6502 programming.

Ken

edit: I forgot to mention the Apple Assembly Line archives. These are also all available online.

 
thanks for the info.

I've found that book and it seems a bit useful. Perhaps i will have to buy some printed book from amazon eventually.

Another problem: which assembler to use?!

the text recommends Lisa, which is freely avaialble.

However I've also found S-C assembler available, as well as ENI (a modernish assembler ).

furthermore, there are payed ones such as ORCA/M.

Since no assembler is compatible with each other I need to choose the best option of course.

Any suggestions?

 
Either S-C assembler or Lisa is fine, and I'd use whichever one matches the text you are following - Lisa for the book and S-C for Apple Assembly Line articles. S-C also has optional Z-80 support that may be useful if (like me) you use a Z80 card in an Apple II. Merlin is another option - that to me looks quite good but I have not used it yet.

Ken

 
Are you wishing to edit and assemble on the Apple II itself, or on your "other" computer? I like the power of the ca65 assembler (part of the cc65 toolchain: http://www.cc65.org/). I can use my everyday editor, debug on an emulator, then do later testing on the physical Apple. Folks also use the older assemblers directly on emulators to speed them up.

 
erhm, well, since i am learning at the moment, speed is not much of an issue. I would me more interested in using the real thing if possible. I will check cc65 however.

On the apple ii itself then, which assembler should I use?

I don't quite understand why one assembler can't assemble the others' code, since a C program will work on *any* C compiler.

 
On the apple ii itself then, which assembler should I use? I don't quite understand why one assembler can't assemble the others' code, since a C program will work on *any* C compiler.
Well, not every C compiler can compile every C program. You run into issues when you start using vendor specific additions (i.e. stuff that is not defined in the C standard). The same goes for assembly language, only there is much less standardization when it comes to assembly language. (The CPU vendor will set the instruction set and maybe a reference assembler, but beyond that everything is fair game.)

Though I'm sure that you could get away with assembling the same code on two assemblers if you stuck to the bas instruction set and maybe labels.

Assembler speed, the internal editor, and macros are likely the most important features while selecting an Apple II assembler.

 
yes well, since i'm a complete ignorant on features of the assembly programs available I'm asking for a recommendation which assembler to use.

 
Given the scant details you've divulged so far... there isn't one that's "best." Pick one. Merlin is probably the one that is the closest to a defacto standard.

But if you're just wanting to dabble, your IIe has a mini-assembler built right in. Just CALL -151 from BASIC, then hit the exclamation point to get into it. See:

http://www.atariarchives.org/mlb/chapter3.php

 
Hi again,

which kind of information would you like me to provide?

I have already tried the monitor program (call -151), i don't have the mini assembler (the one with the ! prompt) since my IIe is not ehanced.

Mainly what I want in the future is to program some nice little games. Also I would like an assembler that would like me to progress and do more advanced stuff as I learn of course.

I'm using lisa 2.5 since it's the only one I could get. I found lisa 3.x but when i run it my computer freezes (same result on my emulator).

Thanks for all the help so far

 
which kind of information would you like me to provide?
* Is this your first foray into assembly language? Or do you already know x86, MC68k, 6809?

If it's your first, then you probably want to start off by picking up any of a number of good machine language books; the one I pointed you to earlier ("Machine Language for Beginners") is a good one, though it sprinkles in lots of the 6502 variants of the day - Commodore, Apple, Atari.

If it's one of many assembly languages you know, then you really only need to become familiar with the 6502 architecture and common programming practices for it. This is a reasonable reference to that end.

* Do you prefer to type on your Mac in a modern editor, or do you relish the true retro feel of typing on the II?

If you prefer the comforts of a modern editor, then use a cross-assembler like SB, a65, or ca65. The a65 link has some nice notes about the "workflow" of cross-assembling. If you want the full retro experience, then use Google to locate downloadable (or purchasable) images of whatever you're after. Asimov is a popular clearinghouse:

ftp://ftp.apple.asimov.net/pub/apple_II/images/utility/programming

In that directory, I see hfassembler.dsk.gz, lisa.gz, merlin_pro_2.47.dsk.gz. Your choice of base operating system may affect what retro assembler you use, too. Merlin Pro, on ProDOS, makes it hard to run assembled programs under DOS 3.3. And the reverse is true for DOS-based assemblers. Another vote for cross-assembly.

I have already tried the monitor program (call -151), i don't have the mini assembler (the one with the ! prompt) since my IIe is not ehanced.
Oops. Ok, you need to boot your DOS 3.3 master diskette and let it load the Integer language. Then you can CALL -151 and hit the !.

Mainly what I want in the future is to program some nice little games. Also I would like an assembler that would like me to progress and do more advanced stuff as I learn of course.
I think you, like me, want to use "modern" tools like editors, source code repositories and such, then test on virtual hardware. That's the way I do it on the ADTPro project: http://adtpro.sourceforge.net/developing.html

So, again, unless you really really want to go retro... you ought to look at cross-assembly.

 
Hi thanks for the detailed help!

And also thanks for ADTPro, it's a great program! i couldn't live without it.

I am new to the assembly language (only played with 8086 asm ages ago). I'll look into the books you mention, although getting them in the UK might be complicated, that's what I much prefer online documentation when available.

I don't mind using every now and then my everyday mac. However I'm a big supporter of doing it the retro way. Specially when i'm learning, since i'm in no hurry to assemble a 5 line program.

I'll look into cross assembly however, it sounds like a good way to learn and code. Which one is the easiest to use on a mac, cc65?

I have downloaded the lisa version from asimov, it's not the newest, but i'll do i guess.

If I want to assemble on my apple IIe (unehanced, 128k), should I go for merlin then?

Finally, if you could recommend me an editor on the apple II that would be nice as well.

Thanks a lot!, Nahuel

 
Hi thanks for the detailed help!And also thanks for ADTPro, it's a great program! i couldn't live without it.
You're welcome on all counts.

I am new to the assembly language (only played with 8086 asm ages ago). I'll look into the books you mention, although getting them in the UK might be complicated, that's what I much prefer online documentation when available.
Follow the link. It is online. ;-)

However I'm a big supporter of doing it the retro way. Specially when i'm learning, since i'm in no hurry to assemble a 5 line program.
Definitely start with the mini-assembler (or even just the monitor) for the really small stuff. It's likely to be more painful to go through the full-blown assembler steps. And besides, you need to have a firm grasp of the details anyway. Sooner or later, you'll end up in the monitor during debugging.

I'll look into cross assembly however, it sounds like a good way to learn and code. Which one is the easiest to use on a mac, cc65?
They're all command-line, so they're all equally easy to use on the Mac. :-)

If I want to assemble on my apple IIe (unehanced, 128k), should I go for merlin then?
I think Merlin is the Lingua Franca of assembly as far as Apple II goes. But you'll see every syntax on earth; it'll pay to be fluent in them all. There's only so much you can do in a 6502 assembler: pretty soon you get used to .da or DAT or .byte or whatever they want to call data definitions in any particular dialect.

Finally, if you could recommend me an editor on the apple II that would be nice as well.
I'll have to leave that to the experts. I'd be lost without instantaneous global search/replace and a keyboard-full of cursor control keys. :-)

 
Hello again,

So far i've read Randy Hyde's book (very useful) as well as the introduction to the 6502 in the obelisk.demon.co.uk. I've looked at the beginners' assembly book but didn't find it that useful (at least not after reading randell's book).

I find myself now with the knowledge of basic asm commands, how to display text, basic i/o, etc. However i don't think i can make anything really useful. Besides something that does some calculation, has some loops and displays characters.

In these texts there aren't many examples of practical projects (especially regarding graphics since I'm interested in game programming for the apple II) or ideas about what to do to learn these things.

After what i've read, where should i continue to learn about these things?

Cheers, Nahuel

 
You should probably learn by creating a set of challenges for yourself, then trying to solve those challenges. If you bump into problems, you do some research or simply ask other people for help.

For example:

1. Switching to graphics mode then drawing a dot. (I.e. learn how to use graphics.)

2. Have the dot move across the screen in 10 seconds. (I.e. learn how to implement animation.)

3. Draw two dots on the screen, one which is player controlled and one which attempts to chase the player. (I.e. learn interactivity and "A.I." techniques.)

4. Add some walls onto the screen which neither dot can pass through. (I.e. learn collision detection.)

5. Repeat 1-4 with a sprite that looks like a character. (I.e. advance your graphics skills.)

6. Repeate 5 with an animated sprite that looks like a running character. (I.e. advance your animation skills.)

And so forth.

 
There are still a few active programmers haunting comp.sys.apple2.programmer

I've found that my stupid newbie questions are generally answered with patience and encouragement. Certainly a valuable resource.

 
thanks for all the ideas you have given me.

i still need a bit more information about the graphic modes, interrupts and other technical info on the apple II.

What kind of reference do you recommend?

I would greatly appreciate an online one

thanks

 
Something fun to do is Google for a list of the undocumented commands. Some of them seem pretty useless, but there's a few gems hidden in there that for some reason someone felt weren't worth including in the 'official' instruction set.

 
i still need a bit more information about the graphic modes, interrupts and other technical info on the apple II.What kind of reference do you recommend?

I would greatly appreciate an online one
As Kallikak mentioned earlier, Bob Sander-Cederlof's Apple Assembly Line archive is a great resource. Several articles go into hi-res and animation detail:

http://homepage.mac.com/bobsc/aal/

 
Back
Top