Instruction manual

fc02 d3 0c out (0ch),a ;lba bits 8 - 15 = "track"
fc04 3a 35 fc ld a,(diskno)
fc07 d3 0d out (0dh),a ;lba bits 16 to 20 used for "disk"
fc09 3e e0 ld a,11100000b ;LBA mode, select drive 0
fc0b d3 0e out (0eh),a ;drive/head register
fc0d 3e 30 ld a,30h ;Write sector command
fc0f d3 0f out (0fh),a
fc11 db 0f wr_wait_for_DRQ_set: in a,(0fh) ;read status
fc13 e6 08 and 08h ;DRQ bit
fc15 ca 11 fc jp z,wr_wait_for_DRQ_set ;loop until bit set
fc18 7e write_loop: ld a,(hl)
fc19 d3 08 out (08h),a ;write data
fc1b 23 inc hl
fc1c db 0f in a,(0fh) ;read status
fc1e e6 08 and 08h ;check DRQ bit
fc20 c2 18 fc jp nz,write_loop ;write until bit cleared
fc23 db 0f wr_wait_for_BSY_clear: in a,(0fh)
fc25 e6 80 and 80h
fc27 c2 23 fc jp nz,wr_wait_for_BSY_clear
fc2a db 0f in a,(0fh) ;clear INTRQ
fc2c e6 01 and 01h ;check for error
fc2e c9 ret
fc2f ;
fc2f ; the remainder of the cbios is reserved uninitialized
fc2f ; data area, and does not need to be a Part of the
fc2f ; system memory image (the space must be available,
fc2f ; however, between"begdat" and"enddat").
fc2f ;
fc2f 00... track: defs 2 ;two bytes for expansion
fc31 00... sector: defs 2 ;two bytes for expansion
fc33 00... dmaad: defs 2 ;direct memory address
fc35 00... diskno: defs 1 ;disk number 0-15
fc36 ;
fc36 ; scratch ram area for bdos use
fc36 begdat: equ $ ;beginning of data area
fc36 00... dirbf: defs 128 ;scratch directory area
fcb6 00... all00: defs 31 ;allocation vector 0
fcd5 00... all01: defs 31 ;allocation vector 1
fcf4 00... all02: defs 31 ;allocation vector 2
fd13 00... all03: defs 31 ;allocation vector 3
72