home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / GEOSApps / UNLOCK.SRC.ARC / unLock (.txt) next >
GEOS ConVerT  |  2019-04-13  |  4KB  |  174 lines

  1. unLock
  2. PRG formatted GEOS file V1.0
  3. Epson FX-80
  4. unLock.lnk
  5. LASTER'S 
  6. ONVERTER 
  7. unLockTable0+
  8.     unLock
  9. Write Image V2.0
  10. Red Storm
  11. geoWrite    V1.1
  12.   This file was created with
  13. Wrong is Write.
  14.   Written by Joe Buckley.
  15. @;unLock
  16. .if    Pass1
  17. .include    geosSym
  18. .include    geosMac
  19. .include    unLockEqua
  20. .endif
  21. ;__________________________________
  22.     .psect
  23. beginprog:    LoadB    dispBufferOn, #(ST_WR_FORE | ST_WR_BACK)
  24.     lda    #0    ;sets white pattern
  25.     jsr    SetPattern
  26.     jsr    i_Rectangle    ;clears both screens
  27.     .byte    0,199
  28.     .word    0,319
  29.     LoadB    dispBufferOn, #ST_WR_FORE 
  30.     lda    #0
  31.     jsr    SetPattern
  32.     jsr    i_Rectangle    ;draws title box w/frame
  33.     .byte    150,195
  34.     .word    70,250
  35.     jsr    i_FrameRectangle    
  36.     .byte    150,195
  37.     .word    70,250
  38.     .byte    255
  39.     jsr    i_PutString
  40.     .word    128
  41.     .byte    165,BOLDON,"- unLock -",PLAINTEXT,0
  42.     jsr    i_PutString
  43.     .word    94
  44.     .byte    180,BOLDON,"Author:  ",PLAINTEXT,"Nancy Wertzberger",0
  45. contprog:    LoadB    opFlag, #0
  46.     LoadB    sectPtr, #2
  47.     LoadB    hdrPtr, #21
  48.     LoadB    track, #18
  49.     LoadB    sector, #1
  50.     MoveB    curDirHead+OFF_OP_TR_SC,opTrack
  51.     MoveB    curDirHead+OFF_OP_TR_SC+1,opSect
  52.     jsr    diskname
  53.     lda    numDrives
  54.     cmp    #2
  55.     beq    twodrives
  56.     LoadW    r0, #firstbox
  57.     jmp    dobox
  58. twodrives:    lda    curDrive
  59.     sbc    #8
  60.     lda    driveType,x
  61.     and    #128
  62.     bne    ram
  63.     LoadW    r0, #secbox
  64.     jmp    dobox
  65. ram:    LoadW    r0, #rambox
  66. dobox:    jsr    DoDlgBox
  67.     lda    r0L
  68.     cmp    #CANCEL
  69.     bne    cont1
  70.     jmp    EnterDeskTop
  71. cont1:    lda    r0L
  72.     cmp    #YES
  73.     beq    readsect
  74.     lda    r0L
  75.     cmp    #11    ;DRIVE chosen
  76.     bne    cont2
  77.     jsr    changedrive
  78.     jmp    contprog
  79. cont2:    LoadW    r0, #chgdiskbox
  80.     jsr    DoDlgBox
  81.     jsr    OpenDisk
  82.     jmp    contprog
  83. readsect:    MoveB    track, r1L
  84.     MoveB    sector, r1H
  85.     LoadW    r4, #diskBlkBuff
  86.     jsr    GetBlock
  87.     MoveB    diskBlkBuff, nxtTrack
  88.     MoveB    diskBlkBuff+1, nxtSect
  89.     LoadB    endSectFlag, #0
  90. readent:    ldx    sectPtr
  91. nextfile:    lda    diskBlkBuff,x
  92.     cmp    #0
  93.     beq    add32
  94.     cmp    #$C0
  95.     bcs    unlock
  96.     jmp    add32
  97. unlock:    sub    #$40
  98.     sta    diskBlkBuff,x
  99.     sta    temp1
  100.     ldx    hdrPtr
  101.     MoveB    "diskBlkBuff,x", r1L
  102.     MoveB    "diskBlkBuff,x", r1H
  103.     LoadW    r4, #fileHeader
  104.     jsr    GetBlock
  105.     ldx    #68
  106.     MoveB    temp1,"fileHeader,x"
  107.     MoveB    "diskBlkBuff,x", r1L
  108.     MoveB    "diskBlkBuff,x", r1H
  109.     LoadW    r4, #fileHeader
  110.     jsr    PutBlock
  111. add32:    AddVB    entOff, sectPtr
  112.     bcc    nextfile
  113.     MoveB    track, r1L
  114.     MoveB    sector, r1H
  115.     LoadW    r4, #diskBlkBuff
  116.     jsr    PutBlock
  117.     lda    nxtTrack
  118.     cmp    #0
  119.     bne    jmpsect
  120.     LoadB    endSectFlag, #1
  121.     jmp    nextsect
  122. jmpsect:    MoveB    nxtTrack, track
  123.     MoveB    nxtSect,sector
  124.     jmp    readsect
  125. nextsect:    lda    opFlag
  126.     cmp    #0
  127.     bne    donep1
  128.     MoveB    opTrack,track
  129.     MoveB    opSect,sector
  130.     LoadB    opFlag, #1
  131.     jmp    readsect
  132. donep1:    jmp    donecancel
  133. sectendck:    lda    endSectFlag
  134.     cmp    #0
  135.     beq    addloopp1
  136.     jmp    nextsect
  137. addloopp1:    jmp    add32
  138. donecanc:    LoadW    r0, #endbox
  139.     jsr    DoDlgBox 
  140.     lda    r0L
  141.     cmp    #YES
  142.     bne    out
  143.     jmp    cont2
  144. out:    jmp    EnterDeskTop
  145. ;__________________________________
  146. diskname:    ldx    curDrive
  147.     ldy    #0
  148. driveno:    cpx    #9
  149.     beq    driveb
  150.     lda    DrACurDkNm,y
  151.     jmp    endname
  152. driveb:    lda    DrBCurDkNm,y
  153. endname:    cmp    #$a0
  154.     beq    next
  155.     sta    diskName,y
  156.     cpy    #17
  157.     beq    next
  158.     jmp    driveno
  159. next:    LoadB    "diskName,y", #0
  160.     rts    
  161. ;__________________________________
  162. changedrive:    lda    curDrive
  163.     cmp    #8
  164.     beq    nine
  165.     lda    #8
  166.     jmp    setdvc
  167. nine:    lda    #9
  168. setdvc:    jsr    SetDevice
  169.     jsr    OpenDisk
  170. @__________________________________
  171. driveroutine:    LoadB    sysDBData, #11
  172.     jmp    RstrFrmDialogue
  173. @UNLOCK  DATE  Page--PAGE     .
  174.