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.

122 lines
1.7KB

  1. .PAGE 'LIST DIRECTORY'
  2. ; START THE DIRECTORY LOADING FUNCTION
  3. ; GET THE BUFFER AND GET IT STARTED
  4. ;
  5. STDIR LDA #0
  6. STA SA
  7. LDA #1 ;ALLOCATE CHANL AND 1 BUFEFER
  8. JSR GETRCH
  9. .SKIP
  10. LDA #0
  11. JSR SETPNT
  12. .SKIP
  13. LDX LINDX
  14. LDA #0
  15. STA LSTCHR,X
  16. JSR GETACT
  17. TAX
  18. LDA DRVNUM
  19. STA LSTJOB,X
  20. LDA #1 ; PUT SAL IN BUFFER
  21. JSR PUTBYT
  22. LDA #4 ;PUT SAH IN BUFFER
  23. JSR PUTBYT
  24. LDA #1 ;INSERT FHONEY LINKS (0101)
  25. JSR PUTBYT
  26. JSR PUTBYT
  27. LDA NBTEMP
  28. JSR PUTBYT ;PUT IN DRVNUM
  29. LDA #0
  30. JSR PUTBYT
  31. JSR MOVBUF ;GET DISK NAME
  32. JSR GETACT
  33. ASL A
  34. TAX
  35. DEC BUFTAB,X
  36. DEC BUFTAB,X
  37. LDA #0 ;END OF THIS LINE
  38. JSR PUTBYT
  39. DIR1 LDA #1 ;INSERT FHONEY LINKS ($0101)
  40. JSR PUTBYT
  41. JSR PUTBYT
  42. JSR GETNAM ;GET #BUFRS AND FILE NAME
  43. BCC DIR3 ;TEST IF LAST ENTRY
  44. LDA NBTEMP
  45. JSR PUTBYT
  46. LDA NBTEMP+1
  47. JSR PUTBYT
  48. JSR MOVBUF
  49. LDA #0 ;END OF ENTRY
  50. JSR PUTBYT
  51. BNE DIR1
  52. DIR10 JSR GETACT
  53. ASL A
  54. TAX
  55. LDA #0
  56. STA BUFTAB,X
  57. LDA #RDYTLK
  58. LDY LINDX
  59. STA DIRLST
  60. STA CHNRDY,Y ; DIRECTORY LIST BUFFER FULL
  61. LDA DATA
  62. RTS
  63. ;
  64. ;
  65. DIR3 LDA NBTEMP ; THIS IS END OF LOAD
  66. JSR PUTBYT
  67. LDA NBTEMP+1
  68. JSR PUTBYT
  69. JSR MOVBUF
  70. JSR GETACT
  71. ASL A
  72. TAX
  73. DEC BUFTAB,X
  74. DEC BUFTAB,X
  75. LDA #0 ; END OF LISTING (000)
  76. JSR PUTBYT
  77. JSR PUTBYT
  78. JSR PUTBYT
  79. JSR GETACT
  80. ASL A
  81. TAY
  82. LDA BUFTAB,Y
  83. LDX LINDX
  84. STA LSTCHR,X
  85. DEC LSTCHR,X
  86. JMP DIR10
  87. ;
  88. ;
  89. ;
  90. ;
  91. ; TRANSFER FILE NAME TO LISTING BUFFER
  92. ;
  93. MOVBUF LDY #0
  94. MOVB1 LDA NAMBUF,Y
  95. JSR PUTBYT
  96. INY
  97. CPY #27
  98. BNE MOVB1
  99. RTS
  100. ;
  101. ;
  102. ; GET CHAR FOR DIRECTORY LOADING
  103. ;
  104. GETDIR JSR GETBYT
  105. BEQ GETD3
  106. RTS
  107. GETD3 STA DATA
  108. LDY LINDX
  109. LDA LSTCHR,Y
  110. BEQ GD1
  111. LDA #EOIOUT
  112. STA CHNRDY,Y
  113. LDA DATA
  114. RTS
  115. GD1
  116. PHA
  117. JSR DIR1
  118. PLA
  119. RTS
  120. ;
  121. .END