home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 86
/
086.d81
/
dir.s
< prev
next >
Wrap
Text File
|
2022-08-26
|
1KB
|
95 lines
.org $33c
;mem
get'string jsr $aefd
jsr $ad9e
jsr $b6a3
ldx $22
ldy $23
jsr $ffbd; setnam
get'number jsr $aefd
jsr $ad8a
jsr $b7f7
ldx $14 ; get device number
lda #17; file number
ldy #0
jsr $ffba; n setlfs
jsr $ffc0; open
ldx #17
jsr $ffc6;
jsr get'byte
jsr get'byte; skip first two bytes
first jsr $ffb7; read status
and #64
bne dir'out
jsr get'byte
jsr get'byte; skip two bytes
second jsr $ffb7
and #64; eof?
bne dir'out
jsr get'byte
tax
jsr get'byte
jsr $bdcd
lda " "
jsr $ffd2
jsr $ffb7
and #64; eof?
bne dir'out
third jsr get'byte
bne +
lda #13
jsr $ffd2
- lda 653
bne -
jmp first
+ jsr $ffd2
jsr $ffb7
and #64
bne dir'out
jmp third
get'byte jsr $ffcf; chrin
rts
dir'out lda #17
jsr $ffc3; close17
jsr $ffcc ;clear chan
ldy #0
sty 198
lda #1
sta 646
- lda prompt,y
beq +
jsr $ffd2
iny
bne -
/ jsr $ffe4
beq -
rts
device .byt 8
prompt .asc "Press a key..."
.byt 0