Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some questions about Apple IIc and Assembly Programming

173 views
Skip to first unread message

tomatos

unread,
Mar 20, 2009, 11:18:21 PM3/20/09
to
Hey guys, I'm a freshmen computer science student who's interested in
learning assembly on the apple iic and I was hoping that someone could
help me get started. I've got an apple iic with green phosphor monitor
in great condition, a copy of Apple II Assembly Language by Marvin L.
De Jong., as well as DOS 3.3 and ProDOS 8 diskettes (thanks
Syndicomm!)

Unfortunately the book doesn't cover the basics of how to create an
assembly file or run it through an assembler, and I am otherwise
lacking in documentation. How do I go about doing this? I can CREATE a
file, but can't figure out how to begin editing it. Also: I have the
original 255 ROM and thus the monitor does not include the mini-
assembler; does DOS 3.3 or ProDOS have an assembler built in? If not,
how can I get one?

Any help you can give me is _greatly_ appreciated! It is hard to learn
when you must load all programs directly into memory via the monitor
in machine code.

winston19842005

unread,
Mar 20, 2009, 11:40:52 PM3/20/09
to
On 3/20/09 11:18 PM, in article
271ec6f0-09cc-4329...@o11g2000yql.googlegroups.com, "tomatos"
<detachm...@gmail.com> wrote:

> Hey guys, I'm a freshmen computer science student who's interested in
> learning assembly on the apple iic and I was hoping that someone could
> help me get started.

Ok, who's the troll?

(just kidding!)

Really, I haven't met a computer science student since I started back this
semester who could even program a bubble-sort in Java, because they are used
to calling pre-programmed methods! (I started in CS back in 1984, and am
still trying to finish a bachelor's, now in CIS, so I'm not that smart, I
guess...)

Good for you!

Wish I could help you out, the Apple is not my forte. Nevertheless, I have a
great deal of respect for a CS student who wants to touch a machine and
learn what it is like on the "bare metal"...

Jonno Downes

unread,
Mar 21, 2009, 1:31:39 AM3/21/09
to
On Mar 21, 2:18 pm, tomatos <detachment2...@gmail.com> wrote:
> Hey guys, I'm a freshmen computer science student who's interested in
> learning assembly on the apple iic and I was hoping that someone could
> help me get started. I've got an apple iic with green phosphor monitor
> in great condition, a copy of Apple II Assembly Language by Marvin L.
> De Jong., as well as DOS 3.3 and ProDOS 8 diskettes (thanks
> Syndicomm!)

Assuming your objective is to be able to code programs that *run on*
an Apple 2, rather than wanting to restrict yourself to *programming
on*, I'd strongly recommend use the ca65 cross assembler (which will
run on windows, mac, *nix, whatever) so you can use all the modern
editing facilities like copy & paste, search & replace, etc. ca65 is
part of the cc65 package - http://www.cc65.org/

I'd suggest you look at the adtpro project files - http://adtpro.sourceforge.net/
which as well as being the source for a tool you will find absolutely
essential if you are doing cross-development, will also show you what
a well structured ca65 project looks like (with Make files that not
only compile the source code and link to an executable binary, but
also go on to build a bootable disk image you can load into an
emulator or transfer to your real apple (via ADTPro) to execute).

p.s. - welcome - it's a fun journey!

Regards,

Jonno

Jonno Downes

unread,
Mar 21, 2009, 1:37:16 AM3/21/09
to
BTW - if you really do want to do it the hard way, I believe you can
get to the mini assembler by
1) loading integer basic (from a DOS 3.3. master disk)
2) call -151 (to get into monitor)
3) F666G (to jmp to mini assembler)

Instructions for using the mini assembler are on the apple support
website (!?!!) http://support.apple.com/kb/TA40023

Regards

jonno

Michael J. Mahon

unread,
Mar 21, 2009, 5:18:18 AM3/21/09
to

What you're missing is an assembler and its manual.

An excellent one in wide use in the Apple II community is Merlin.
It and its documentation have been released as freeware, and it
is available on the web:

>http://mirrors.apple2.org.za/ftp.apple.asimov.net/images/programming/assembler/merlin/


-michael

******** Note new website URL ********

NadaNet and AppleCrate II for Apple II parallel computing!
Home page: http://home.comcast.net/~mjmahon/

"The wastebasket is our most important design
tool--and it's seriously underused."

calib...@freenet.de

unread,
Mar 21, 2009, 6:52:08 AM3/21/09
to
On 21 Mrz., 10:18, "Michael J. Mahon" <mjma...@aol.com> wrote:
>
> What you're missing is an assembler and its manual.
>
> An excellent one in wide use in the Apple II community is Merlin.
> It and its documentation have been released as freeware, and it
> is available on the web:

Michael, you're programming him to ask next how to make
the disks so that he can feed them to his IIc! ;-)

Perhaps adding that he can find many infos in the Apple FAQs
will enable him to go that route. Also the search function in
Google Groups is immensely helpful as there are already lots
of threads about it.

While I agree that Merlin is one of the best choices to program
directly on the Apple I hesitate to recommend it until he got some
sort of mass storage device (unless he wants to handle disks
a lot) and use a cross assembler instead.
Limitless mass storage capacity, easy transfers of data into the
host environment and the ease of consulting reference
documentation on the same screen (PDF- or text files) are the
main advantages - not even mentioning a speed advantage that is
incomparable to anything running on any Apple II hardware.

General FAQ:
http://home.swbell.net/rubywand/A2FAQs2CONTENT.html

Programming FAQ:
http://home.swbell.net/rubywand/csa2pfaq.html
*especially the first three questions*

bye
Marcus

John B. Matthews

unread,
Mar 21, 2009, 10:25:03 AM3/21/09
to
In article
<5a3819cf-3739-4bb8...@v23g2000pro.googlegroups.com>,
Jonno Downes <jonn...@gmail.com> wrote:

Oddly, the one I remember used '!':

*f666g
*!300:jsr fc58
! lda #c1
! jsr fded
! rts
!
*300l
*300g

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

tomatos

unread,
Mar 21, 2009, 11:21:16 AM3/21/09
to
On Mar 20, 11:40 pm, winston19842005 <bjjlya...@NOSPAMbellsouth.net>
wrote:

> On 3/20/09 11:18 PM, in article
> 271ec6f0-09cc-4329-bcdb-82ff183b6...@o11g2000yql.googlegroups.com, "tomatos"

>
> <detachment2...@gmail.com> wrote:
> > Hey guys, I'm a freshmen computer science student who's interested in
> > learning assembly on the apple iic and I was hoping that someone could
> > help me get started.
>
> Ok, who's the troll?
>
> (just kidding!)
>
> Really, I haven't met a computer science student since I started back this
> semester who could even program a bubble-sort in Java, because they are used
> to calling pre-programmed methods! (I started in CS back in 1984, and am
> still trying to finish a bachelor's, now in CIS, so I'm not that smart, I
> guess...)
>
> Good for you!
>
> Wish I could help you out, the Apple is not my forte. Nevertheless, I have a
> great deal of respect for a CS student who wants to touch a machine and
> learn what it is like on the "bare metal"...

Haha, thanks for the comment. Since I wasn't around in 1984 I can't
offer a comparison, but there definitely seems to be a general lack of
curiosity among many of my classmates. Personally I love CS, but I'm
not sure why these people are in this major if they have such an
apathetic attitude towards learning. Good luck with your degree!

On Mar 21, 1:37 am, Jonno Downes <jonno...@gmail.com> wrote:
> BTW - if you really do want to do it the hard way, I believe you can
> get to the mini assembler by
> 1) loading integer basic (from a DOS 3.3. master disk)
> 2) call -151 (to get into monitor)
> 3) F666G (to jmp to mini assembler)
>
> Instructions for using the mini assembler are on the apple support
> website (!?!!)http://support.apple.com/kb/TA40023
>

> Regards
>
> jonno

I wish I could do this, but it appears that the original ROM for the
apple iic does not have the mini-assembler :(

On Mar 21, 1:31 am, Jonno Downes <jonno...@gmail.com> wrote:
> On Mar 21, 2:18 pm, tomatos <detachment2...@gmail.com> wrote:
>
> > Hey guys, I'm a freshmen computer science student who's interested in
> > learning assembly on the apple iic and I was hoping that someone could
> > help me get started. I've got an apple iic with green phosphor monitor
> > in great condition, a copy of Apple II Assembly Language by Marvin L.
> > De Jong., as well as DOS 3.3 and ProDOS 8 diskettes (thanks
> > Syndicomm!)
>
> Assuming your objective is to be able to code programs that *run on*
> an Apple 2, rather than wanting to restrict yourself to *programming
> on*, I'd strongly recommend use the ca65 cross assembler (which will
> run on windows, mac, *nix, whatever) so you can use all the modern
> editing facilities like copy & paste, search & replace, etc. ca65 is

> part of the cc65 package -http://www.cc65.org/
>
> I'd suggest you look at the adtpro project files -http://adtpro.sourceforge.net/


> which as well as being the source for a tool you will find absolutely
> essential if you are doing cross-development, will also show you what
> a well structured ca65 project looks like (with Make files that not
> only compile the source code and link to an executable binary, but
> also go on to build a bootable disk image you can load into an
> emulator or transfer to your real apple (via ADTPro) to execute).
>
> p.s. - welcome - it's a fun journey!
>
> Regards,
>
> Jonno

Aha! That's perfect, and it will let me use all of the software I
need. Unfortunately because my computer does not have a RS-232 port
I'll have to get a USB -> RS-232 adaptor in addition to the RS-232 ->
DE-9 cable. That means it'll be a few more weeks before I can really
dive into this. Oh well, it's a small price to pay.

Dutch

unread,
Mar 21, 2009, 2:23:56 PM3/21/09
to

Don't forget to switch to integer basic with 'INT' before entering the monitor.

Dutch

lyricalnanoha

unread,
Mar 21, 2009, 6:13:39 PM3/21/09
to

On the INTBASIC ROM, you go into the monitor and type F666G. On the
Enhanced //e, EDM, //c and IIgs, you go into the monitor and type !

-uso.

Jonno Downes

unread,
Mar 21, 2009, 6:41:30 PM3/21/09
to
On Mar 22, 2:21 am, tomatos <detachment2...@gmail.com> wrote:
> Aha! That's perfect, and it will let me use all of the software I
> need. Unfortunately because my computer does not have a RS-232 port
> I'll have to get a USB -> RS-232  adaptor in addition to the RS-232 ->
> DE-9 cable. That means it'll be a few more weeks before I can really
> dive into this. Oh well, it's a small price to pay.- Hide quoted text -

In the meantime, could you be testing and debugging your code on one
of the many emulators available?

Michael J. Mahon

unread,
Mar 21, 2009, 8:03:01 PM3/21/09
to
calib...@freenet.de wrote:
> On 21 Mrz., 10:18, "Michael J. Mahon" <mjma...@aol.com> wrote:
>> What you're missing is an assembler and its manual.
>>
>> An excellent one in wide use in the Apple II community is Merlin.
>> It and its documentation have been released as freeware, and it
>> is available on the web:
>
> Michael, you're programming him to ask next how to make
> the disks so that he can feed them to his IIc! ;-)
>
> Perhaps adding that he can find many infos in the Apple FAQs
> will enable him to go that route. Also the search function in
> Google Groups is immensely helpful as there are already lots
> of threads about it.
>
> While I agree that Merlin is one of the best choices to program
> directly on the Apple I hesitate to recommend it until he got some
> sort of mass storage device (unless he wants to handle disks
> a lot) and use a cross assembler instead.
> Limitless mass storage capacity, easy transfers of data into the
> host environment and the ease of consulting reference
> documentation on the same screen (PDF- or text files) are the
> main advantages - not even mentioning a speed advantage that is
> incomparable to anything running on any Apple II hardware.

I certainly agree if he is planning to write large programs
and doesn't enjoy using the Apple II hardware he has.

For small to moderate sized programs, speed is hardly an issue,
and the Apple II is quite adequate.

WRT the issue of creating disks, I presume that he's already done
that, but if he hasn't, he will need to learn that, too--unless
he just wants to program "virtual Apple II's".

> General FAQ:
> http://home.swbell.net/rubywand/A2FAQs2CONTENT.html
>
> Programming FAQ:
> http://home.swbell.net/rubywand/csa2pfaq.html
> *especially the first three questions*

For me, writing programs for an Apple II and running them on an
emulator is interesting only insofar as it facilitates my running
them on a real Apple II. ;-)

Cross development is appropriate in some cases, but for me it
suggests that the native platform just isn't suitable for self-
hosting, which I find not to be true at all.

Part of the "retro" experience is using the tools and techniques
that shaped the platform and its applications, IMHO.

John B. Matthews

unread,
Mar 21, 2009, 10:04:16 PM3/21/09
to
In article
<alpine.DEB.0.99.0...@andisteele.dosius.ath.cx>,
lyricalnanoha <lyrica...@usotsuki.hoshinet.org> wrote:

> On Sat, 21 Mar 2009, John B. Matthews wrote:
>
> > In article
> > <5a3819cf-3739-4bb8...@v23g2000pro.googlegroups.com>,
> > Jonno Downes <jonn...@gmail.com> wrote:
> >
> >> BTW - if you really do want to do it the hard way, I believe you can
> >> get to the mini assembler by
> >> 1) loading integer basic (from a DOS 3.3. master disk)
> >> 2) call -151 (to get into monitor)
> >> 3) F666G (to jmp to mini assembler)
> >>
> >> Instructions for using the mini assembler are on the apple support
> >> website (!?!!) http://support.apple.com/kb/TA40023
> >
> > Oddly, the one I remember used '!':
> >
> > *f666g
> > *!300:jsr fc58
> > ! lda #c1
> > ! jsr fded
> > ! rts
> > !
> > *300l
> > *300g
>

> On the INTBASIC ROM, you go into the monitor and type F666G. On the
> Enhanced //e, EDM, //c and IIgs, you go into the monitor and type !

D'oh. Thanks!

BLuRry

unread,
Mar 22, 2009, 2:10:01 PM3/22/09
to

FWIW, JACE is not nearly as capable an emulator as Kegs or AppleWin,
but it does have complete CPU, Sound and Graphics (well graphics are a
hack-job but they look "correct" enough) -- the reason I bring it up
is that you can load a pre-assembled object file and execute it
directly via pressing F3. This saves a lot of the problem of making a
disk image or figuring out how to transfer stuff around. Believe me,
if you're experimenting and trying to learn assembly (or re-learn in
my case sometimes), it's important to have a fast turn-around between
the time you assemble and the time you can test you code to see what
else is broken. ;-D

If interested, grab the source from subversion SVN and build with Java
6 (I recommend NetBeans since that is how the project is structued,
but you're welcome to use whatever suits your fancy as long as you're
comfortable with building arbitrary java source trees)

http://sourceforge.net/projects/java-ace/

I've been using ACME cross assembler for a few years with good luck.
Haven't looked into the pros/cons between Acme and CC65, other than
there's probably a lot more CC65 users out there. :-D

http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/

-B

rtk

unread,
Mar 23, 2009, 1:22:40 PM3/23/09
to
On Mar 20, 9:18 pm, tomatos <detachment2...@gmail.com> wrote:
> Hey guys, I'm a freshmen computer science student who's interested in
> learning assembly on the apple iic and I was hoping that someone could
> help me get started.

Wonderful! Learning from the bare metal up is something that seems to
be sorely lacking these days.

The advice you've already received is good but I'd go with what
Michael said: use Merlin and use the real hardware.

If you are having trouble getting actual floppies with Merlin for your
IIc send me an email with your address and I'll mail you some along
with basic notes on using Merlin. It is straightforward, an old-
fashioned line editor.

Again, echoing Michael, if you have the real hardware, why use an
emulator? (Says Ron who to this day still uses an Apple IIgs at work,
though primarily only as a terminal to a Linux box for CUDA
development)

The 6502 is a very simple processor and easy to learn. If you find
you like the low-level stuff, it might be interesting for you to next
move on to something like the simple PIC microcontrollers (10F
series), they use an even simpler instruction set.

Finally, this document might be helpful to you as well:

http://www.geocities.com/oneelkruns/asm1step.html

Good luck and stick with it! You won't get this in your Java book!

Ron

tomatos

unread,
Mar 30, 2009, 11:03:43 PM3/30/09
to
Thank you for your comments everyone, you have all been very helpful!
I just ordered the necessary cables so it shouldn't be long before I
can really get started. I've looked at Merlin and have decided that I
definitely want to develop and run everything on the IIc itself
instead of using an emulator or cross assembler. After all, I've got
this beautiful machine so I might as well put it to good use! Some of
these posted websites are really great and have answered a lot of
questions I had too. Well that's all for now, although I'm sure that
I'll have more questions as I go along.

sicklittlemonkey

unread,
Mar 30, 2009, 11:57:36 PM3/30/09
to
On Mar 31, 12:03 pm, tomatos <detachment2...@gmail.com> wrote:
> I've looked at Merlin and have decided that I
> definitely want to develop and run everything on the IIc itself

Just FYI, if you want to quickly test code, it's really easy to use
Big Mac (which is Merlin-- for DOS 3.3) and use ORG $8000 (I think)
and then after ASM to assemble you can use MON (IIRC!) to enter the
monitor, 8000G to test your code, and Ctrl-Y to get back to Big Mac.

Cheers,
Nick.

tomatos

unread,
Apr 5, 2009, 11:05:36 AM4/5/09
to
I just got my cables and I'm eager to get started, however I've run
into a little bit of trouble...

I followed the ADT Pro websites tutorial on bootstrapping and I now
have ADT Pro running on the IIc, however when I press 'R' to receive
and type the name of the file (In this case ADTPRO-1.1.2.DSK) it
simply says "WAITING FOR HOST REPLY, ESC CANCELS" and nothing else
happens. This also comes up when I try DIR and SEND. Does anyone know
what the problem may be?

Eric Rucker

unread,
Apr 5, 2009, 1:05:43 PM4/5/09
to

Check all baud rate settings in the configuration, make sure they
match, make sure everything's using the correct slot, etc., etc.
(ADTPro defaults to slot 2, IIRC.)

schmidtd

unread,
Apr 5, 2009, 5:16:16 PM4/5/09
to
On Apr 5, 1:05 pm, Eric Rucker <bhtoo...@gmail.com> wrote:
> On Apr 5, 11:05 am, tomatos <detachment2...@gmail.com> wrote:
>
> > I just got my cables and I'm eager to get started, however I've run
> > into a little bit of trouble...
>
> > I followed the ADT Pro websites tutorial on bootstrapping and I now
> > have ADT Pro running on the IIc, however when I press 'R' to receive
> > and type the name of the file (In this case ADTPRO-1.1.2.DSK) it
> > simply says "WAITING FOR HOST REPLY, ESC CANCELS" and nothing else
> > happens. This also comes up when I try DIR and SEND. Does anyone know
> > what the problem may be?

It depends on your cable. If you have an Imagewriter I cable, for
example, you'll want to try ticking the Imagewriter box on the serial
configuration dialog box.

> Check all baud rate settings in the configuration, make sure they
> match, make sure everything's using the correct slot, etc., etc.

Quite right. But the defaults should work out of the box if you have
the right cable.

> (ADTPro defaults to slot 2, IIRC.)

Actually, it dynamically adapts to wherever it finds a serial device.
Which will be slot 2 on a IIc. :-)

tomatos

unread,
Apr 6, 2009, 10:47:07 AM4/6/09
to
Ahh thanks... I feel stupid now. The server was set to 19200 bauds and
the client was set to 9200. But everything is working now and I now
have the Merlin assembler. Speaking of which, could someone point me
to some documentation for Merlin? I haven't been able to find anything
useful :(

JJ Sonick

unread,
Apr 6, 2009, 2:39:33 PM4/6/09
to

Here's a zip of text files of the docs (extracted from a disk image
with Cider Press):
http://www.mozomedia.com/apple2/downloads/merlin-doc.zip

Chapter 8 was missing from the disk image, but it seems (?) to be non-
essential.

There’s also other docs on the Textfiles Apple II pages, if you scroll
down to the M’s:
http://www.textfiles.com/apple/DOCUMENTATION/

Hope that helps,
Josh

Apple II Adventures
http://www.mozomedia.com/apple2/

paulrsm

unread,
Apr 7, 2009, 4:18:53 AM4/7/09
to
On Apr 6, 9:47 am, tomatos <detachment2...@gmail.com> wrote:
> Speaking of which, could someone point me to some
> documentation for Merlin? I haven't been able to find anything
> useful :(

Merlin documentation, in scanned PDF format, is available
on the csa2 gmail account.

--
Paul

tomatos

unread,
Apr 7, 2009, 10:05:54 PM4/7/09
to
Hrm, for some reason my last message didn't get posted.

Anyway, I want to say thanks to you both (JJ Sonick and paulrsm)
because those are some really great resources! I'm glad that I at
least now know where I can look for answers (besides bugging all of
you :P ). I just entered and ran my first program with Merlin so I'm
glad that at the very least nothing went wrong there. I'm really
excited about all of this, I really think that it'll give me the low-
level experience and understanding that I'm looking for.

0 new messages