EasyManua.ls Logo

Commodore 1570 - Page 100

Commodore 1570
132 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
stat
= $fa
buffer
= $fb
; $fb
& $fc
Ida
#15
; logical file number
Idx
#8
; device number
Idy
#15
; secondary address
jsr
setlfs
; setup logical
file
Ida
#0
; noname
jsr
setnam ; setup file name
jsr
open
; open logical channel
; after the command channel
is
open subsequent calls should be from 'read'
read
Ida
#$00
sta stat
; clear status
Ida
serial
and #%101111
11
; clear bit 6 fast serial flag
sta
serial
Idx
#15
jsr
chkout
; open channel for output
Idx
#0
ldy
cm<Llength
; length
of
the command
sendit Ida
cm~buf,x
; get command
jsr
bsout
; send the command
inx
dey
bne sendit
jsr
clrchn
; send eoi
bit
serial
; check speed
of
drive
bvc
error
; slow serial drive
sei
bit
dlicr
; clear interrupt control reg
Idx
cm~buf+5
; get #
of
sectors
Ida
d2pra
; read serial port
ear
#clkout
; change state
of
clock
sta
d2pra
; store back
rea~t
Ida
#8
wait 1
bit
dlicr
; wait for byte
beq
wait 1
92

Related product manuals