Commodore 128 Programmer's Reference Manual page 453

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
i
i
THE COMMODORE 128 OPERATING SYSTEM
443
i
i
' •
EXAMPLE:
CLC
! i
JSR $FF47
;setup for fast serial input
The C128/1571 fast serial protocol utilizes CIA 1 (6526 at $DC00) and a
f]
special driver circuit controlled in part by the MMU (at $D500). SPINP and
1 I
SPOUT are routines used by the system to set up the CIA and fast serial driver
circuit for input or output. SPINP sets up CRA (CIA 1 register 14) and clears the
r-j
FSDIR bit (MMU register 5) for input. SPOUT sets up CRA, ICR (CIA 1 register
| |
13), timer A (CIA 1 registers 4 and 5), and sets the FSDIR bit for output. Note the
state of the TODIN bit of CRA is always preserved, but the state of the GAME,
EXROM and SENSE40 outputs of the MMU are not (reading these ports return the
H
state of the port and not die register values—consequently they cannot be pre-
/ •
served). These routines are required only by applications driving the fast serial bus
themselves from the lowest level.
2. $FF4A CLOSE ALL ;close all files on a device
1
1
i \
fmm\
i !
fmmi
i \
; i
r^
!
>
i \
l!
PREPARATION:
Registers:
Memory:
Flags:
Calls:
RESULTS:
Registers:
Memory:
Flags:
EXAMPLE:
LDA #$08
JSR $FF4A
.A -> device # (FA: 0-31)
system map
none
none
.A used
.X used
.Y used
none
none
xlose all files on device 8
The FAT is searched for the given FA. A proper CLOSE is performed for all
matches. If one of the CLOSEd channels is the current I/O channel, then the default
channel is restored.
This call is utilized, for example, by the BASIC command DCLOSE. It is
also called by the Kernal BOOT routine.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents