The FORMAT.I include file resides on the Kyan Pascal 2.x Utilities Disk 1. It contains one function:
- FUNCTION Format(drivenum:integer; density :char):Integer;
Source Code
FUNCTION Format(drivenum:integer;
density :char):Integer;
BEGIN
format:=0;
#A
stx _t
ldy #8
lda (_sp),y
cmp #1
bcs f.OK
ldy #160
jmp f.leave
f.OK cmp #9
bcc f.nxt
ldy #160
jmp f.leave
f.nxt adc #$30
sta fdrive+1
ldy #7
lda (_sp),y
and #$DF
cmp #'S
beq s.den
cmp #'D
beq d.den
ldy #146
jmp f.leave
s.den lda #253
sta _t+1
jmp f.doit
d.den lda #254
sta _t+1
f.doit ldx #$10
fopn1 lda $340,x
cmp #$ff
beq fopn2
txa
clc
adc #$10
tax
cpx #$80
bne fopn1
ldy #$81
jmp f.leave
fdrive asc 'D1:'
db $9b
fopn2 lda _t+1
sta $342,x
lda #0
sta $34a,x
sta $34b,x
lda #>fdrive
sta $344,x
lda #<fdrive
sta $345,x
jsr $e456
f.leave tya
ldy #5
sta (_sp),y
ldx _t
#
END;
No comments:
Post a Comment