home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
GEOSApps
/
UNLOCK.SRC.ARC
/
unLock
(
.txt
)
next >
Wrap
GEOS ConVerT
|
2019-04-13
|
4KB
|
174 lines
unLock
PRG formatted GEOS file V1.0
Epson FX-80
unLock.lnk
LASTER'S
ONVERTER
unLockTable0+
unLock
Write Image V2.0
Red Storm
geoWrite V1.1
This file was created with
Wrong is Write.
Written by Joe Buckley.
@;unLock
.if Pass1
.include geosSym
.include geosMac
.include unLockEqua
.endif
;__________________________________
.psect
beginprog: LoadB dispBufferOn, #(ST_WR_FORE | ST_WR_BACK)
lda #0 ;sets white pattern
jsr SetPattern
jsr i_Rectangle ;clears both screens
.byte 0,199
.word 0,319
LoadB dispBufferOn, #ST_WR_FORE
lda #0
jsr SetPattern
jsr i_Rectangle ;draws title box w/frame
.byte 150,195
.word 70,250
jsr i_FrameRectangle
.byte 150,195
.word 70,250
.byte 255
jsr i_PutString
.word 128
.byte 165,BOLDON,"- unLock -",PLAINTEXT,0
jsr i_PutString
.word 94
.byte 180,BOLDON,"Author: ",PLAINTEXT,"Nancy Wertzberger",0
contprog: LoadB opFlag, #0
LoadB sectPtr, #2
LoadB hdrPtr, #21
LoadB track, #18
LoadB sector, #1
MoveB curDirHead+OFF_OP_TR_SC,opTrack
MoveB curDirHead+OFF_OP_TR_SC+1,opSect
jsr diskname
lda numDrives
cmp #2
beq twodrives
LoadW r0, #firstbox
jmp dobox
twodrives: lda curDrive
sbc #8
lda driveType,x
and #128
bne ram
LoadW r0, #secbox
jmp dobox
ram: LoadW r0, #rambox
dobox: jsr DoDlgBox
lda r0L
cmp #CANCEL
bne cont1
jmp EnterDeskTop
cont1: lda r0L
cmp #YES
beq readsect
lda r0L
cmp #11 ;DRIVE chosen
bne cont2
jsr changedrive
jmp contprog
cont2: LoadW r0, #chgdiskbox
jsr DoDlgBox
jsr OpenDisk
jmp contprog
readsect: MoveB track, r1L
MoveB sector, r1H
LoadW r4, #diskBlkBuff
jsr GetBlock
MoveB diskBlkBuff, nxtTrack
MoveB diskBlkBuff+1, nxtSect
LoadB endSectFlag, #0
readent: ldx sectPtr
nextfile: lda diskBlkBuff,x
cmp #0
beq add32
cmp #$C0
bcs unlock
jmp add32
unlock: sub #$40
sta diskBlkBuff,x
sta temp1
ldx hdrPtr
MoveB "diskBlkBuff,x", r1L
MoveB "diskBlkBuff,x", r1H
LoadW r4, #fileHeader
jsr GetBlock
ldx #68
MoveB temp1,"fileHeader,x"
MoveB "diskBlkBuff,x", r1L
MoveB "diskBlkBuff,x", r1H
LoadW r4, #fileHeader
jsr PutBlock
add32: AddVB entOff, sectPtr
bcc nextfile
MoveB track, r1L
MoveB sector, r1H
LoadW r4, #diskBlkBuff
jsr PutBlock
lda nxtTrack
cmp #0
bne jmpsect
LoadB endSectFlag, #1
jmp nextsect
jmpsect: MoveB nxtTrack, track
MoveB nxtSect,sector
jmp readsect
nextsect: lda opFlag
cmp #0
bne donep1
MoveB opTrack,track
MoveB opSect,sector
LoadB opFlag, #1
jmp readsect
donep1: jmp donecancel
sectendck: lda endSectFlag
cmp #0
beq addloopp1
jmp nextsect
addloopp1: jmp add32
donecanc: LoadW r0, #endbox
jsr DoDlgBox
lda r0L
cmp #YES
bne out
jmp cont2
out: jmp EnterDeskTop
;__________________________________
diskname: ldx curDrive
ldy #0
driveno: cpx #9
beq driveb
lda DrACurDkNm,y
jmp endname
driveb: lda DrBCurDkNm,y
endname: cmp #$a0
beq next
sta diskName,y
cpy #17
beq next
jmp driveno
next: LoadB "diskName,y", #0
rts
;__________________________________
changedrive: lda curDrive
cmp #8
beq nine
lda #8
jmp setdvc
nine: lda #9
setdvc: jsr SetDevice
jsr OpenDisk
@__________________________________
driveroutine: LoadB sysDBData, #11
jmp RstrFrmDialogue
@UNLOCK DATE Page--PAGE .