TITLE TurboDOS formater for M-Drive/H ; Assemble with M80 or compatible assembler. .Z80 ; This program formats a 2 Megabyte M-Drive/H to all E5Hs. It is optimized ; primarily for speed since the whole thing is easily less than 1 allocation ; block long anyway. ; 09/11/87 Rev 0 Bob Clyne Initial coding. ; M-Drive ports. Set for whatever ports you are using. HBASE EQU 040H HDATA EQU HBASE ;M-drive data port. HADDR EQU HBASE+1 ;M-drive address port. ASEG ORG 100H START: XOR A ;Zero the accumulator. OUT (HADDR),A ;Send to M-drive address port to tell drive OUT (HADDR),A ;to start at address 0. OUT (HADDR),A LD B,A ;Set B to 0. LD C,HDATA ;Set C to M-drive data port. LD E,250 ;Setup E as loop counter. LD HL,BUFFER ;Point to buffer. FMTLP: ;Format loop. REPT 16 ;Each of the following 2 instructions formats OTIR ;256 bytes, by repeating them 16 times we OTDR ;format 8K each time through the loop. ENDM DEC E ;Decrement the loop counter. JR NZ,FMTLP ;Loop if not done. JP 0 ;Reset system if done. ; Buffer contains the format bytes. BUFFER: REPT 258 DB 0E5H ;Value to format to. ENDM END