EasyManua.ls Logo

Commodore Plus 4 - Page 382

Commodore Plus 4
464 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...
370
Using
Peripheral
Devices
200F
2012
2015
2017
2019
201C
201E
2021
2023
2026
2027
202A
202B
202D
202F
2032
2034
2037
2039
20
20
B0
A9
20
A2
20
B0
20
48
20
68
C9
D0
20
A9
20
B0
00
BD
C0
69
0D
D2
02
C9
5D
CF
D2
0D
F4
CC
02
C3
47
FF
FF
FF
FF
FF
FF
FF
FF
JSR
JSR
BCS
LDA
JSR
LDX
JSR
BCS
JSR
PHA
JSR
PLA
CMP
BNE
JSR
LDA
JSR
BCS
BRK
$FFBD
$FFC0
$2080
#$0D
$FFD2
#$02
$FFC9
$2080
$FFCF
$FFD2
#$0D
$2023
$FFCC
#$02
$FFC3
$2080
SETNAM.
OPEN.
If
error,
go
to
error
message
routine.
Carriage
return
character.
Send
to
screen.
Logical
file
number
of
data
file.
Set
to
output
channel.
If
error,
go
to
error
message
routine.
Get
a
character
from
keyboard.
Save
on
stack.
Send
to
Datassette.
Retrieve
character.
Compare
to
carriage
return.
If
not,
go
on.
Reset
I/O
channels.
Logical
file
number
of
data
file.
CLOSE.
If
error,
go
to
error
message
routine.
Stop
processing.
This
routine
sends
the
message
ERROR
to
the
screen:
2080
SO
E7
FF
JSR
IFFE7
S083
A2
05
LDX
#$05
2085
BD
F8
20
LDA
$20F8,X
2088
20
D2
FF
JSR
$FFD2
208B
CA
DEX
208C
10
F7
BPL
$2085
208E
00
BRK
Close
all
the
files
and
reset
I/O
channels.
Length
of
message.
Get
a
character
of
message.
Send
to
the
screen.
Decrement
the
pointer.
If
not
done,
go
on.
Stop
processing.
These
data
are
needed:
>20F8
52
4F
52
52
45
OD
00
00
:
[R0RRE...1
>2100
44
41
54
46
49
40
00
00
:|DATFIL..[
Example:
This
program
reads
the
data
file
created
by
the
previous
example,
and
sends
the
contents
to
the
screen.
.
2000 A9
.
2002
A2
.
2004
A0
.
2006
20
.
2009 A9
.
200B
A2
.
200D
A0
.
200F
20
.
2012
20
02
LDA
#$02
01
LDX
#$01
00
LDY
#$00
BA
FF
JSR
$FFBA
06
LDA
#$06
00
LDX
#$00
21
LDY
#$21
BD
FF
JSR
$FFBD
C0
FF
JSR
$FFC0
Logical
file
number
for
data
file.
Device
number
of
Datassette.
Secondary
address
signifies
read.
SETLFS.
Length
of
file
name.
Low
byte
of
address
of
file
name.
High
byte
of
address
of
file
name.
SETNAM.
OPEN.