[Coco] HDBDOS - RETRIEVE FIXED!!

Robert Gault robert.gault at att.net
Sun Jan 18 16:54:41 EST 2015


Chad,

I been trying something similar but for some reason my version of hdbdos.asm 
does not correctly use the fill statement at the end and I either get overflow 
past $2000 or inadequate filling with $39. Also the default positions for things 
like jump tables and the drive value table change location in memory.

Anyway I used

LD69A      pshs      B               SAVE SECTOR COUNTER
            ldu       #DBUF1          POINT U TO THE TABLE OF LOGICAL SECTORS
            ldb       B,U             * GET LOGICAL SECTOR NUMBER FROM TABLE AND
            stb       DSEC            * SAVE IT IN THE DSKCON VARIABLE
            ldu       #LD6D4          POINT U TO TABLE OF SECTOR FORMATTING DATA
            ldb       #$03            * GET FIRST 3 DATA BLOCKS AND
            bsr       LD6C8           * WRITE THEM TO BUFFER
            lda       DCTRK           = GET TRACK NUMBER AND STORE lT
            sta       ,X+             = IN THE RAM BUFFER
            lda       <DCDRV          should be $EB ie. drive #
            lsra                      0&1 become 0 while 2&3 become 1
            sta       ,x+
            lda       DSEC            * GET SECTOR NUMBER AND
            sta       ,X+             * STORE IT IN THE BUFFER
            ldb       #$09            = GET THE LAST NINE DATA BLOCKS AND
etc.

This did not work for me on my system but it could have been a problem compiling 
the code.

Robert



More information about the Coco mailing list