Page 1 of 1

Extended AIM65 Monitor supporting 65C02

Posted: Wed Jun 06, 2012 6:50 am
by 101010
Dear all!

I would like to use the additional opcodes provided by the 65C02 CPU with my AIM65. Particularly, I am talking about a Rockwell R65C02P4 not the R65C02S variant with the pin 1 vector pull.

Currently, I am using the AIM65 monitor to enter my routines. Do you know if somebody has already undertaken the task of rewriting it to support 65C02 opcodes?

Thank you.

- Alex

Re: Extended AIM65 Monitor supporting 65C02

Posted: Wed Jun 06, 2012 1:05 pm
by Dr Jefyll
Welcome 101010. (May I call you $2A for short? :) )

I am forwarding your question to a friend who knows more about AIM65 than I do. But probably your best bet is to write some assembler macros to support the new opcodes.

-- Jeff

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 1:46 am
by Nightmaretony
Greetings, 42. If y6ou want to know the REAL meaning of 42, count the spots on a pair of dice.

Is the source code for the AIM65 floating around and is it on eproms on the system or on 6530s?

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 4:00 am
by Dr Jefyll
OK, I located another topic here that deals with a similar issue. In the third post BDD lists some assembler macros for producing 65C816 instructions. The same idea could be applied to coax the AIM65 assembler to produce R65C02 instructions. Are you familiar with macro usage, Alex? Here's a very simple example just to convey the idea.

Code: Select all

PHX      .macro                ;push X
         .byte $DA
         .endm
This allows us to code PHX -- an R65C02 instruction -- just the same as if it were native to the AIM65 assembler. Single-byte opcodes are easy. Instructions that include operands require more effort. This is where it'd be handy to have the doc for the AIM65 assembler syntax (so we can code the macros correctly).

PS- Tony, I believe the assembler resides in eprom.

-- Jeff

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 4:04 am
by GARTHWILSON
Does the AIM-65's assembler allow macros though? I gave away my AIM-65 manual years ago so I can't look it up, but I would think the assembler was much too simple to do macros (unless it ran under Forth, which I know it did not).

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 4:38 am
by BigDumbDinosaur
Dr Jefyll wrote:
OK, I located another topic here that deals with a similar issue. In the third post BDD lists some assembler macros for producing 65C816 instructions.

A little OT, but the '816 macro list in that post was out-of-date, as I have extended it since then. I have updated it to reflect the most recent additions and corrections but we really should put the macros somewhere where anyone using the Kowalski simulator can find them.

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 5:16 am
by BigEd
A sticky thread with an attachment on the head post?
Cheers
Ed

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 5:25 am
by GARTHWILSON
It ought to go on the 6502.org website under "Source Code Repository" at http://6502.org/source/ , under "Monitors, Assemblers, and Interpreters".

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 8:27 am
by 101010
Thank you so far for all your suggestions.

My initial intention was to extend the AIM65 monitor code, burn it into one or more EPROMs and maybe giving up some part of the code (like BASIC). As I said I am currently not using the assembler but just the monitor ("I" instuction) of the AIM65 to hack in some small routines.

- Alex

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 2:50 pm
by BigDumbDinosaur
GARTHWILSON wrote:
It ought to go on the 6502.org website under "Source Code Repository" at http://6502.org/source/ , under "Monitors, Assemblers, and Interpreters".
Good luck on that. :D I sent something to Mike back in March for the Source Code Repository. It has yet to see the light of day.

Re: Extended AIM65 Monitor supporting 65C02

Posted: Thu Jun 07, 2012 3:17 pm
by orgwood
Hi, the AIM-65 monitor is in manual form and I also have a copy of the AIM-65/40 monitor manual, not the ROM images though! If I remember correctly, the 2 ROM set for the AIM-65 was split so that one ROM contained basic code and the E ROM contained all the subroutines - at least that's how I like to think of it. A programmer could then just modify the E ROM for new I/Os. If no one's put a copy of the monitor manual online, I can take a scan and post it and/or send it in PDF format to some place else

I'm not a software guy and have never used the assembler but if you're trying to get the AIM-65 to jump to specific address where code is located, you can use the assembler and Basic ROM start address - otherwise, I know that the "F" keys allow you to set up specific address to once the variables are loaded. I have a PROM Programmer that explains what locations need to be set up so that the 9000 block, where its ROM is located, can be jumped into using one of the F keys. I don't think this helps in any way and Mike Stein is probably the GoTo GUY on this one! :roll:

Re: Extended AIM65 Monitor supporting 65C02

Posted: Sat Jun 09, 2012 11:45 pm
by 101010
Yes, I surely may also go as 528, 4210, or 2A16! Initially I tried 10tacle for my account name based on my favorite Lucas Arts adventure game, but since I didn't receive an ack email from the board system I went for 101010. I like the connection to the Hitchhiker's Guide though.

Anyway, the assembler macros look great, I'll check if the AIM65 assembler supports macros after all. I also own the AIM65 monitor rom listing and I started deciphering the way they code the mnemonics, but I'll need some more free time to endeavor this project. So nobody seems to come up with my idea before...

Re: Extended AIM65 Monitor supporting 65C02

Posted: Mon Jun 11, 2012 1:22 am
by BigDumbDinosaur
101010 wrote:
Anyway, the assembler macros look great, I'll check if the AIM65 assembler supports macros after all. I also own the AIM65 monitor rom listing and I started deciphering the way they code the mnemonics, but I'll need some more free time to endeavor this project. So nobody seems to come up with my idea before...

Almost all decent assemblers support some kind of macro facility. In some cases, it is permissible to name a macro the same as a 65xx mnemonic, which is a great way to extend an existing instruction that has been given new addressing modes. Alas, the Kowalski simulator doesn't allow that, so I had to concoct some off-the-wall replacements for the 65C816 16 bit immediate and stack instructions. It looks strange in the source code but does work (except for forward long branches).

EDIT: BRL now works.