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.

106 lines
1.4KB

  1. .PAGE 'LCC.FMT3'
  2. ;
  3. ;
  4. ;
  5. ;* FORMAT DONE, NOW VERIFY IT
  6. ;
  7. ;
  8. ;
  9. LDA #200 ; LOOK AT 200 SYNCS
  10. STA TRYS
  11. ;
  12. COMP LDA #0 ; POINTER INTO HEADERS
  13. STA BUFPNT
  14. ;
  15. LDA #>BUFF0 ;
  16. STA BUFPNT+1
  17. ;
  18. LDA SECTR ; SECTOR COUNTER
  19. STA SECT
  20. ;
  21. CMPR10 JSR SYNC ; FIND SYNC
  22. ;
  23. LDX #10
  24. LDY #0
  25. ;
  26. CMPR15 BVC * ; GET HEADER BYTE
  27. CLV
  28. ;
  29. LDA DATA2
  30. CMP (BUFPNT),Y ; COMPARE GCR
  31. ;
  32. BNE CMPR20 ;ERROR
  33. ;
  34. INY
  35. DEX
  36. BNE CMPR15 ; TEST ALL BYTES
  37. ;
  38. CLC ; UPDATE HEADR POINTER
  39. LDA BUFPNT
  40. ADC #10
  41. STA BUFPNT
  42. ;
  43. JMP TSTDAT ; NOW TEST DATA
  44. ;
  45. CMPR20 DEC TRYS ; TEST IF TOO MANY ERRORS
  46. BNE COMP
  47. ;
  48. LDA #NOTFND ; TOO MANY ERROR
  49. JMP FMTERR
  50. ;
  51. TSTDAT JSR SYNC ; FIND DATA SYNC
  52. ;
  53. LDY #256-TOPWRT ;
  54. ;
  55. TST05 BVC *
  56. CLV
  57. ;
  58. LDA DATA2 ; COMPARE GCR
  59. CMP OVRBUF,Y
  60. ;
  61. BNE CMPR20 ; ERROR
  62. ;
  63. INY
  64. BNE TST05 ; DO ALL OVRBUF
  65. ;
  66. LDX #255-3 ; NOW DO BUFFER, DONT TEST OFF BYTES
  67. ;
  68. TST10 BVC *
  69. CLV
  70. ;
  71. LDA DATA2
  72. CMP BUFF2,Y
  73. BNE CMPR20
  74. ;
  75. INY
  76. DEX
  77. BNE TST10
  78. ;
  79. ;
  80. DEC SECT ; MORE SECTORS TO TEST?
  81. BNE CMPR10 ; YES
  82. ;
  83. ;
  84. ; ALL SECTORS DONE OK
  85. ;
  86. INC FTNUM ; GOTO NEXT TRACK
  87. LDA FTNUM
  88. CMP #36 ; #TRACKS MAX
  89. BCS FMTEND
  90. ;
  91. JMP END ; MORE TO DO
  92. ;
  93. ;
  94. FMTEND LDA #$FF ; CLEAR FTNUM
  95. STA FTNUM
  96. ;
  97. LDA #$0 ; CLEAR GCR BUFFER FLAG
  98. STA GCRFLG
  99. ;
  100. LDA #1 ; RETURN OK CODE
  101. JMP ERRR
  102. ;
  103. ;
  104. ;
  105. .END