EasyManua.ls Logo

Sharp MZ-700 - Page 96

Sharp MZ-700
213 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...
2.8.5 Preparing machine language programs
A machine language program which fills
the
entire display screen with the characters
supported
by
the
MZ-700 is presented in this section
as
an example.
The
following BASIC program loads such a machine program into
memory
and calls it.
1 0 L l M l T
$BFFF
...
..
.
..
.....
..
...
.
....
......
.
..
...
.......
...
......
.
..
..
..
... Limits the
BASIC
area to $BFFF.
20
GOSUB
50
30
USR
( -$C000 J
··
··
··
························
··
···· ·······················
··
Calls the machine language program.
40
END
50
FOR
l
~49152
TO
49
1
81
60
READ
M
70
POKE
J,M
80
NEXT
I
90
RETURN
108
DATA
19/:REM
110
DATA
213:REM
120
DATA
229:REM
130
DATA
22,0
:
REM
140
DATA
33,0,208:REM
150
DATA
1,232,3
:
REM
150
DATA
243 :
REM
170
DATA
211,22/
:
REM
i.
....
........
....
.....
Reads data for the machine language program from DATA
statements and writes
it
into the machine language area.
PUSH
BC
PUSH
:JE
PUSH
HL
· · · · · · · · · ·······Beginning
of
data for the machine language program.
LD
D,0
LD
HL
, 0000H
LD
BC,
1000
DJ
OUT
CE3HJ,~
180
DATA
1
14
:
REM
190
DATA
35 :
REM
STO
:LD
CHLJ
_.
0 ·
··
···:
Switches the memory block to video
RAM.
(See page
155).
200
DATA
20 :
REM
210
DATA
11
:REM
220
DATA
120 :
REM
230
DATA
17/:REM
240
DATA
194,14,
192:REM
250
DATA
211,225:REM
260
DATA
251
:
REM
270
DATA
225 :
REM
280
DATA
209 :
REM
290
DATA
193 :
REM
300
DATA
201
:
REM
JNC
HL
INC
D
DEC
BC
LD
A)8
OR
C
JP
NZ,STO
:. · ···
··
··
Sets a display code to video
RAM.
OUT
C E 1 H J ·'A
··
·······Switches the memory block to
RAM.
(See page 127.)
El
POP
HL
POP
DE
POP
BC
RE
T
··
············
··
·····
··
····Returns
to the
BASIC
program.
If
the
machine language program has been generated with the
monitor
and saved
on
cassette tape
under
the
file name DISPLA YCODE, use the following program
to
call
the
machine language program.
11
0
LIMIT
$BFFF
11
0
LO
A D "
DISPL
A
YCODE
"
1 2 0
USR
C
$C
000)
94
-------------------------------------------------------------------------

Other manuals for Sharp MZ-700

Related product manuals