home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 86 / 086.d81 / dir.s < prev    next >
Text File  |  2022-08-26  |  1KB  |  95 lines

  1. .org $33c
  2. ;mem
  3. get'string jsr $aefd
  4. jsr $ad9e
  5. jsr $b6a3
  6. ldx $22
  7. ldy $23
  8. jsr $ffbd;          setnam
  9.  
  10. get'number jsr $aefd
  11. jsr $ad8a
  12. jsr $b7f7
  13. ldx $14  ; get device number
  14.  
  15. lda #17;            file number
  16.  
  17. ldy #0
  18. jsr $ffba; n        setlfs
  19. jsr $ffc0;           open
  20. ldx #17
  21. jsr $ffc6;         
  22.  
  23. jsr get'byte
  24. jsr get'byte;        skip first two bytes
  25.  
  26. first jsr $ffb7;     read status
  27. and #64
  28. bne dir'out
  29.  
  30. jsr get'byte
  31. jsr get'byte;         skip two bytes
  32.  
  33. second jsr $ffb7
  34. and #64;              eof?
  35. bne dir'out
  36. jsr get'byte
  37. tax
  38. jsr get'byte
  39. jsr $bdcd
  40. lda " "
  41. jsr $ffd2
  42.  
  43. jsr $ffb7
  44. and #64;               eof?
  45. bne dir'out
  46.  
  47. third jsr get'byte
  48. bne +
  49.  
  50. lda #13
  51. jsr $ffd2
  52.  
  53. - lda 653
  54. bne -
  55.  
  56. jmp first
  57.  
  58. + jsr $ffd2
  59. jsr $ffb7
  60. and #64
  61. bne dir'out
  62.  
  63. jmp third
  64.  
  65.  
  66.  
  67. get'byte jsr $ffcf;   chrin
  68. rts
  69.  
  70.  
  71.  
  72. dir'out lda #17
  73. jsr $ffc3;            close17
  74. jsr $ffcc ;clear chan
  75.  
  76. ldy #0
  77. sty 198
  78. lda #1
  79. sta 646
  80. - lda prompt,y
  81. beq +
  82. jsr $ffd2
  83. iny
  84. bne -
  85.  
  86. / jsr $ffe4
  87. beq -
  88.  
  89.  
  90. rts
  91.  
  92. device .byt 8
  93.  
  94. prompt .asc "Press a key..."
  95. .byt 0