[Coco] MultiBoot - multiple boot files on one disk (can someone dis-asm this for me?)
Don Barber
don at dgb3.net
Mon Mar 3 20:53:05 EST 2025
The first two bytes are 'OS' in ascii which the DOS command looks for to
ensure its loaded a valid boot track.
Thanks,
Don
On 3/3/25 20:36, Sean Conner via Coco wrote:
> It was thus said that the Great Allen Huffman via Coco once stated:
>
>> One of out utilities I was most proud of was MultiBoot. “Back in the day”
>> when you had different boot floppies (for the BBS with those drives, for
>> the hard drive, for the Sierra games, etc.) Terry and I came up with an
>> idea of swapping the os9boot file out dynamically. MultiBoot was the
>> result. Type “DOS” and a menu comes up showing the boot files on the disk.
>> Select one and go. One disk, multiple boot files (up to 16, space
>> permitting, if I recall).
>>
>> Terry wrote the RS-DOS portion that lives on the “DOS” track, and the code
>> it ran from there, and I wrote the OS-9 frontend. You’d point it to a disk
>> with multiple os9boot files and add the ones you wanted.
>>
>> Unfortunately, I do not have Terry’s assembly source — but I do have the
>> data that made it up:
>>
>> char mb_sec34_1[] = { /* Terry's RS-DOS DOS startup code... 50 bytes */
>> 79,83,134,13,151,211,204,56,0,221,209,12,211,142,0,234,204,2,0,237,132,
>> 134,33,214,211,237,2,220,209,237,4,173,159,192,4,109,6,38,8,76,129,61,37,
>> 221,126,57,0,126,215,9
>> };
>>
>> Is there anyone out there who might do me a favor of turning this back
>> into the assembly? I’d like to include it with the GitHub repo I am
>> putting together of all the Sub-Etha Software stuff.
> Here's the assembly for the above data:
>
> inbuf equ $D1
> sector equ $D3
>
> DCOPCv equ $EA
> DCOPC equ 0
> DCDRV equ 1
> DCTRK equ 2
> DSEC equ 3
> DCPBT equ 4
> DCSTA equ 6
>
> startup clra ; ???
> comb ; ???
> lda #13 ; starting sector - 1
> sta sector
> ldd #$3800 ; buffer address
>
> again std inbuf ; save updated buffer ptr
> inc sector
> ldx #DCOPCv ; smaller than LDX [$C006]
> ldd #READ*256+0 ; read op, drive 0
> std DCOPC,x ; tell RS-DOS
> lda #33 ; track 33
> ldb sector ; get sector number
> std DCTRK,x ; tell RS-DOS
> ldd inbuf ; get buffer
> std DCBPT,x ; tell RS-DOS
> jsr [DSKCON]
> tst DCSTA,x ; check status
> bne done
> inca ; adjust buffer
> cmpa #$3D ; are we done? (last address $3CFF)
> blo again ; if not, continue
> jmp $3900 ; jump to starting code
> done jmp $D709 ; report I/O error to BASIC
>
> I'm puzzled by the first two instructions, which do nothing. I'm also
> curious that it loads data off the last five sectors of track 33. The DOS
> track is track 34, not 33, and it's an entire track, and a granual in RS-DOS
> is 9 sectors, not 5.
>
> I haven't fully disassembled the larger blob as it looks like it'll take
> more work as there appear to be gaps in the instruction stream. Do you
> recall which address the other blob was assembled to?
>
> -spc
>
More information about the Coco
mailing list