[Coco] Assembly Help

Tormod Volden lists.tormod at gmail.com
Wed Sep 3 06:33:01 EDT 2014


On Wed, Sep 3, 2014 at 4:54 AM, Chad H wrote:
> Ok, I haven't heard from 'theotherbob' yet so I'm throwing this out here .
> I know there are people here way smarter than me with this assembly stuff.
> I haven't tinkered with it really in 20 years.  Anywhoo.. I found his
> article and code archived here.
> http://www.oocities.org/theother_bob/PaulDpages/rompak.html  I used this in
> conjuction with the Color Basic Unravalled series to hopefully write a sort
> of 'bootloader' to join to .BIN file data and write that to a EPROM.  The
> idea is to mimic the 'LOADM' routine to transfer EPROM .BIN data to where it
> should go and then execute it automatically.  So far I've assembled the code
> below in the Rainbow IDE, combined the .BIN data at the end of the code
> (FF), and loaded into the M.E.S.S. emulator (CoCo 2) but it just hangs with
> a  blank green screen :/

>
>                 LDD        ,X++                       GET BLOCK LENGTH(D)
>
>                 LDY         ,X++                       GET BLOCK START
> ADDRESS(Y)
>
> XFER      LDA        ,X+                         GET SOURCE BYTE(A) FROM X
>
>                 STA        ,Y+                          PUT BYTE(A) AT Y
>
>                 DECD                                     MOVED BLOCK?

Register D is a combination of registers A and B. So if you load A,
you will overwrite the D value. Use for instance U for your counter.

Also, if this is an autorun cartridge it will start executing at
$C000, where you have your EXECJP variable. You could use location $9D
(BASIC default EXEC address) for that purpose.

Tormod


More information about the Coco mailing list