I 
MZ-800 
4-2-5.  Scroll 
1) 
Scrolling  is  possible 
for 
both 
horizontal 
and 
vertical 
directions 
by 
means 
of 
software 
offset. 
The 
following 
four 
registers  are 
use~ 
for 
scroll 
control. 
a. 
Scroll start address register:  SSA (7-bit) 
b. 
Scroll end address register:  SEA (7-bit) 
c. 
Scroll 
width 
register: 
SW 
=  SEA-SSA (7-bit) 
d.  Scroll offset register: 
SOF (10-bit) 
( 
x  y  z 
I 
SEA 
+--
__ 
I 
I 
I 
I 
! 
l, 
___ 
_ 
) 
---
2) 
Control 
of 
scroll  starts 
by 
the 
initialization 
of 
the 
scroll control register. 
SSA 
=  $0 
SEA  =  $7D 
SW 
=  $7D 
SOF  =  $0 
3) 
Way 
of 
smooth 
scrolling 
SOF  =  $0 
~ 
$5 
Programming 
"SOF = 
$5" 
makes 
the 
display 
screen 
shifted one line up. 
The highest line (address: 
$0 - $27)  is then assigned 
to 
the 
lowest 
line 
($1 
F18 
-.: 
$1 
F3F). 
As 
normal 
scroll 
involves 
updating 
of 
the data 
for 
the 
lowest 
line, 
the 
data 
of 
address 
$1 
F18 
-
$1 
F3F 
are 
updated. 
SOF  =  $5 
~ 
$0 
By  reducing  the  value 
of 
SOF 
by 
"5", 
it 
makes  the 
screen shifted one line 
down. 
SEAL-
____________________________ 
~ 
13 
4) 
Line scroll 
SOF  = 
$O~ 
$28 
Programming 
"SOF = 
$28" 
makes 
the 
display screen 
shifted 
eight 
lines  up.  Data  on  the  highest  line 
therefore shifted 
to 
the 
bottom 
line. 
Programming 
"$28 
~ 
$0" 
makes the 
display 
screen 
shifted 
eight 
lines 
down, 
and 
the 
line 
on 
the 
bottom 
moves 
to 
the 
highest 
line. 
5) 
Screen 
split 
Appropriate 
deviation 
of 
SSA.  SEA,  and 
SW 
permits 
to 
divide 
the 
screen 
into 
three sections 
of 
®, 
® and 
©. 
Though 
the 
section ® is 
permitted 
to 
scroll, sections 
® and © are 
not 
permitted 
to 
scroll. 
See the 
figure 
to 
explain 
with. 
@ 
SSA-. 
® 
SEA-. 
© 
Assume 
now 
that 
the 
top 
of 
the 
section ® is  on the 
5th line 
(40  raster) and 
the 
top 
of 
the section © is on 
the 18th  line (144  raster). 
Attention 
must 
be  paid  to 
the  fact 
that 
values  SSA  and  SEA  are  used 
for 
assigning  lines.  Scroll  registers  are  set 
with 
the 
following 
values. 
SSA 
=  $19 
SEA 
= 
$5A 
SW 
= 
$41 
SOF  =  $0 
In 
this 
occasion, 
it 
needs 
to 
initialize 
the 
screen  that 
has  been  displayed. 
"SOF  = 
$5" 
must 
be  program-
med 
to 
scroll ® one line. Then, 
only 
the 
section ® is 
shifted 
up,  and 
the 
highest 
line 
of 
® moves 
to 
the 
bottom 
line 
of 
®. 
Programming 
"SOF = 
$A" 
makes 
it 
scrolled one 
more 
line. 
SOF 
~ 
SW 
Scroll  offset  (SOF) 
should 
necessarily  be 
within 
a 
range 
of 
the 
scroll 
width. 
Display is 
not 
assured 
with 
SOF set greater than SW.