What offset? The index? BUFFER-POINTER B-P channel index Set r/w pointer within buffer It's 0, so the start of the buffer. I think you can just set the index anywhere and write a single byte if you want. The 7 at the end is the length of the command On 02/11/2020 19:55, vtgearhead wrote: > The CBM Commander program has a mode to copy a D64 image back to floppy. > There are two outer loops that iterate over track and sector (with lookup > table to account for differing sector counts) and this logic inside (i = > track, j = sector): > > cbm_read(2,fileBuffer,256); > > cbm_write(DST_CMDSTAT,"b-p 3 0", 7); // ???? > cbm_write(3,fileBuffer,256); > cbm_write(DST_CMDSTAT,buffer, sprintf(buffer, "u2 3 0 %u %u", i+1, j)); > > File #2 is open on the source, #3 on target disk ('#') and DST_CMDSTAT is > channel 15 on the target drive. It all makes perfect sense except for the > 'b-p' command. I cannot understand why that offset is required when writing > data into the target buffer. This may be basic platform knowledge, but I > cannot find any discussion of it. I'm looking hard at this code because the > target diskette ends up with a small chunk of data that's mismatched with > the source file. >Received on 2020-11-02 23:00:03
Archive generated by hypermail 2.3.0.