[Coco] Assembly Help
Chad H
chadbh74 at hotmail.com
Tue Sep 2 22:54:38 EDT 2014
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 :/
I hope I'm not too far off, but wouldn't surprise me.
*.BIN single/multisegment bootloader for ROM Pak
BINDES EQU BINLOD-EXECJP
ORG 49152
* VARIABLES
EXECJP RMB 2 2 BYTE POINTER FOR EXECUTION
ADDRESS
* LOADEr
LOADER LDA #85
BININ LDX #BINDES+49152 INIT XFER DATA ADDRESS
OFFSET
CHKBLK LDA ,X+ GET BLOCK TYPE
BYTE (00 = PREAMBLE, 255=POSTAMBLE)
BNE ENDBIN IF >0 THEN
MUST BE END OF .BIN DATA (POSTAMBLE)
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?
BNE XFER NO
JMP CHKBLK CHECK NEXT
BLOCK
ENDBIN LDD ,X++ GET LENGTH
(0000)
LDY ,X++ GET EXECUTION
ADRESS(Y)
STY EXECJP
JMP [EXECJP]
BINLOD FCB 255
More information about the Coco
mailing list