EasyManuals Logo

Sharp MZ-800 Technical Reference And User's Guide

Sharp MZ-800
170 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #71 background imageLoading...
Page #71 background image
Opening a source
file
(ASCII
file)
LD
A,open-mode
LD(ZRWX),A
LD
A,3
LD(ELMD),A
LD
A,l
LD(ZLOG),A
LD
DE,FILE.X
SVC
.COUNT
SVC.DEVFN
SVC
.RWOPN
LD
A,(ELMD)
CP
3
JP
NZ,error
; Read-open if the open mode is 1 and write-opens if
it
is
2.
· ; Set the file mode to the source file
mode.
; Set the logical number to
1.
; Set the name of the file to
be
opened
in
DE.
; Sets the file length
in
bytes in
B.
; Interpret (specify) the device name and file
name.
;
Open
the file
;
Set the file mode opened in
A.
; Source file?
; Jump to the error handling routine if not source file.
FILE.
X:
DEFM
"QD:
SAMPLE"
DEFBO
; Set the
end
of the file name to
0.
; Add 0
to
end
of
filename.
Inputting
one
line
of
source file(ASCII
file)
LD
DE,buffer-adr
SVC
.INMSG
JP
C,eof
Output of a source
file
(ASCII
file)
LD
DE,save-adr
LD
B,length
SVC.PRSTR
Closing source
files
(ASCII
files)
LD
A,logical-number
LD
B,FFH
SVC.CLKL
;
The
source file is assumed to
be
read-opened.
; Set the starting address of the input buffer
in
DE.
; Input one
line.
; Perform the file
end
processing if CF: =
; Set the length of the line
read
in
bytes in
B.
(OD
at
the
end
of the line
is
not included.)
; The source file
is
assumed to have
been
opened.
; Starting address of the memory
area
to
be
saved.
; File size
in
bytes (including
OD
at the
end
of
each
line).
; Specified file only if the logical number
is
not zero and all files if
it
is
;
zero.
; Closes the file(s).
65

Table of Contents

Other manuals for Sharp MZ-800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sharp MZ-800 and is the answer not in the manual?

Sharp MZ-800 Specifications

General IconGeneral
BrandSharp
ModelMZ-800
CategoryDesktop
LanguageEnglish

Related product manuals