You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

verdir.src 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .page 'ver-dir'
  2. ; validate files with bam
  3. ; create new bam according to
  4. ; contents of files entered in dir
  5. verdir
  6. valdat
  7. ;validate is soft-load
  8. jsr simprs ; extract drive #
  9. jsr initdr
  10. lda #$40
  11. sta wbam
  12. jsr newmpv ; set new bam
  13. lda #0
  14. sta delind
  15. jsr srchst ; search for first file
  16. bne vd25 ; found one
  17. vd10 lda #0 ; set directory sectors...
  18. sta sector ; ...in bam
  19. lda dirtrk
  20. sta track
  21. jsr vmkbam
  22. lda #0
  23. sta wbam
  24. jsr scrbam ; write out bams
  25. jmp endcmd
  26. vd15 iny
  27. lda (dirbuf),y
  28. pha ; save track
  29. iny
  30. lda (dirbuf),y
  31. pha ; save sector
  32. ldy #19 ; get ss track
  33. lda (dirbuf),y ; is this relative ?
  34. beq vd17 ; no
  35. sta track ; yes - save track
  36. iny
  37. lda (dirbuf),y ; get ss sector
  38. sta sector
  39. jsr vmkbam ; validate ss by links
  40. vd17 pla
  41. sta sector ; now do data blocks
  42. pla
  43. sta track
  44. jsr vmkbam ; set bit used in bam
  45. vd20 jsr srre ; search for more
  46. beq vd10 ; no more files
  47. vd25
  48. ldy #0
  49. lda (dirbuf),y
  50. bmi vd15
  51. jsr deldir ; not closed delete dir
  52. jmp vd20
  53. ;
  54. vmkbam ; mark bam with file sectors
  55. jsr tschk
  56. jsr wused
  57. jsr opnird
  58. mrk2 lda #0
  59. jsr setpnt
  60. jsr getbyt
  61. sta track
  62. jsr getbyt
  63. sta sector
  64. lda track
  65. bne mrk1
  66. jmp frechn
  67. mrk1 jsr wused
  68. jsr nxtbuf
  69. jmp mrk2
  70. ;
  71. ; .end