The UNLOCK.I include file resides on the Kyan Pascal 2.x Utilities Disk 1.
- function unlock(var fylename:pathstring):integer;
Source Code
function unlock(var fylename:pathstring):integer;
var
fullname:pathstring;
begin
unlock:=0;
add_device(fylename,fullname);
#a
stx unsave
ldx #$10
uopn1 lda $340,x
cmp #$ff
beq uopn2
txa
clc
adc #$10
tax
cpx #$80
bne uopn1
ldy #$81
jmp uleave
unsave db 0
uopn2 lda #$24
sta $342,x
lda #5
clc
adc _sp
sta $344,x
lda #0
adc _sp+1
sta $345,x
jsr $e456
uleave tya
ldy #25
sta (_sp),y
ldx unsave
#
end;
No comments:
Post a Comment