$EE0D/60941: Perform [N] - New (Format) command EE0D: 20 12 C3 JSR $C312 ; get drive number EE10: A5 E2 LDA $E2 ; drive number EE12: 10 05 BPL $EE19 ; not clear? EE14: A9 33 LDA #$33 EE16: 4C C8 C1 JMP $C1C8 ; 33, 'syntax error' Jump from $EE12: EE19: 29 01 AND #$01 EE1B: 85 7F STA $7F ; drive number EE1D: 20 00 C1 JSR $C100 ; turn LED on EE20: A5 7F LDA $7F ; drive number EE22: 0A ASL ; times 2 EE23: AA TAX EE24: AC 7B 02 LDY $027B ; comma position EE27: CC 74 02 CPY $0274 ; compare with end name EE2A: F0 1A BEQ $EE46 ; format without ID EE2C: B9 00 02 LDA $0200,Y ; first character of ID EE2F: 95 12 STA $12,X ; save EE31: B9 01 02 LDA $0201,Y ; second character EE34: 95 13 STA $13,X EE36: 20 07 D3 JSR $D307 ; close all channels EE39: A9 01 LDA #$01 EE3B: 85 80 STA $80 ; track 1 EE3D: 20 C6 C8 JSR $C8C6 ; format disk EE40: 20 05 F0 JSR $F005 ; erase buffer EE43: 4C 56 EE JMP $EE56 ; continue as below Jump from $EE2A: EE46: 20 42 D0 JSR $D042 ; load BAM EE49: A6 7F LDX $7F ; drive number EE4B: BD 01 01 LDA $0101,X EE4E: CD D5 FE CMP $FED5 ; 'A', marker for 1541 format EE51: F0 03 BEQ $EE56 ; ok EE53: 4C 72 D5 JMP $D572 ; 73, 'cbm dos v2.6 1541' Jump from $EE43, $EE51: EE56: 20 B7 EE JSR $EEB7 ; create BAM EE59: A5 F9 LDA $F9 ; buffer number EE5B: A8 TAY EE5C: 0A ASL EE5D: AA TAX EE5E: AD 88 FE LDA $FE88 ; $90, start of disk name EE61: 95 99 STA $99,X ; buffer pointer to name EE63: AE 7A 02 LDX $027A EE66: A9 1B LDA #$1B ; 27 EE68: 20 6E C6 JSR $C66E ; write filenames in buffer EE6B: A0 12 LDY #$12 ; position 18 EE6D: A6 7F LDX $7F ; drive number EE6F: AD D5 FE LDA $FED5 ; 'A', 1541 format EE72: 9D 01 01 STA $0101,X EE75: 8A TXA EE76: 0A ASL ; times 2 EE77: AA TAX EE78: B5 12 LDA $12,X ; ID, first character EE7A: 91 94 STA ($94),Y ; in buffer EE7C: C8 INY EE7D: B5 13 LDA $13,X ; and second character EE7F: 91 94 STA ($94),Y ; in buffer EE81: C8 INY EE82: C8 INY EE83: A9 32 LDA #$32 ; '2' EE85: 91 94 STA ($94),Y ; in buffer EE87: C8 INY EE88: AD D5 FE LDA $FED5 ; 'A' 1541 format EE8B: 91 94 STA ($94),Y ; in buffer EE8D: A0 02 LDY #$02 EE8F: 91 6D STA ($6D),Y ; and at position 2 EE91: AD 85 FE LDA $FE85 ; 18 EE94: 85 80 STA $80 ; track number EE96: 20 93 EF JSR $EF93 ; mark block as allocated EE99: A9 01 LDA #$01 ; 1 EE9B: 85 81 STA $81 ; sector number EE9D: 20 93 EF JSR $EF93 ; mark block as allocated EEA0: 20 FF EE JSR $EEFF ; write BAM EEA3: 20 05 F0 JSR $F005 ; pointer $6D/$6E to buffer, erase buffer EEA6: A0 01 LDY #$01 EEA8: A9 FF LDA #$FF EEAA: 91 6D STA ($6D),Y ; track following is zero EEAC: 20 64 D4 JSR $D464 ; write BAM EEAF: C6 81 DEC $81 ; decrement sector number, 0 EEB1: 20 60 D4 JSR $D460 ; read block EEB4: 4C 94 C1 JMP $C194 ; prepare disk status Previous Page / Next Page |