OOOE
8400
B400
21
F2C9
8403
7E
8404
FE
03
840.
C2
B43.
8409
CD
844F
840C
FE
FF
840E
CA
B436
MACRO-BO
3.44
B411
3E
FF
B413
32
F35B
B416
3E
00
B418
B41B
32
B540
B41B
CD
B437
B41E
CD
B47B
B421
FE
FF
8423
CA
B4BA
B426
3A
8540
B429
3C
B42A
FE
20
B42C
20
EA
B42E
3E
00
B430
32
F358
B433
CO
B481
B43.
B43b
C9
:
Hff**UffHHffUtffHHffHHHffftfflffffnffffffffffffffffffffftffff
:*
f
;1
"ain
oroqral starts
here!!
f
:'
:
flHfHfffUfffffffflffffffffffffffffffH
..
fUffffffffffffffffffffffffff
SOURCE:
DEST:
09-0ec-BI
LOOP:
EXIT:
.
PHASE
OB400H
LD
LD
CP
JP
HL.SCRMODE
A.IHLI
3
NZ
•
EXIT
Set the pointor to the screen lode
and
find out the screen lode
15
the screen in graphic lode?
No.
so
exit
frol
this
proDr
..
Since screen
oode
is
graphic
save
the screen to disk
CALL
CP
JP
CREATE
OFFH
Z.EXIT
Create a
new
file
into
which
to
save
the
screen.
Is the disk directorv
full'
Yes.
so
exit
frol
this
program
The
file
is
now
00
en
so
the data
can
be
saved
PASE
LV
LD
1-1
A.OFFH
(SLVFLS)
.A
Enable
slave
cOflMunications
so
that
co
••
ands
~
data
can
be
sent to the
slave
CPU.
If
this
flao
is
not
set
then
all
slave cO.lunication
is
ignored.
The
VRAM
can
now
be
read
and
written to disk
LD
LD
CALL
CALL
CP
JP
LD
INC
CP
JR
A.OOH
ICOUNT)
.A
READVRAH
WRITE
QFFH
Z,ERASE
A.ICOUNT)
A
32
NZ.LOOP
Initialize
the
count
for the
nUlber
of
blocks
of
data
we
have
to read
frol
the
VRAH
in order to
save
the cOlplete screen
Set the
next
block
of
data
frol
the
VRAM
Write
the data
we've
just read to the
file
Is the
di
sk
ful P
Ves.
so
erase the
file
so
that onlv part
of
the screen
is
saved
Incre.ent the
block
counter
Have
we
written
all
of
the screen?
No.
so
go
back
and
process the
next
block
All
of
the screen
has
been
wri
tten to
di
sk.
so
close the
file.
LD
LO
CALL
A.OOH
ISLVFLG)
.A
CLOSE
It
is
now
safe to
ed
t.
RET
U-7
Disable
co
••
unication
with
the slave
CPU
so
that
co
••
ands
& data are i
Qnored
Close
the fi Ie .e're saving to
We've
done
it!!
B437
B437
3A
B54D
B43A
CB
07
843C
32
84A5
B43F
3E
00
8441
32
84A4
B444
11
849B
B447
2A
0001
MACRO-BO
3.44
B44A
3E
72
B44C
85
B44D
bF
B44E
E9
B44F
B44F
3E
00
B451
32
B534
8454
21
B534
B457
II
B535
B45A
01
0019
B45D
ED
BO
B45F
OE
OD
B4bl
CD
0005
8464
OE
lA
B4bb
II
B4AB
84b9
CD
0005
B4bC
CO
B492
B4bF
OE
Ib
B471
11
B52B
B474
CD
0005
B477
C9
;
UUfffHffffffffifffUUfffffffffflfffffffffffHfffffflffltlfU
..
ffffff
:*
:'
:*
Subroutine
Read
the
VRAH
data in a block
of
bO
x 2 bytes
this
actually reads 2
lines
of
480
pixels.
•
:
ffHfHffHffffHffffHHHfffHfffffflfffHfffffffftllHfflffffflffHff
READVRAM,
LD
A.
iCOUNn
Set the
bloC<
nu.ber
of
the data to
be
read in. in order to calculate the
1.'1
position to
start
on
the screen
which
we
will
be
readino,
09-0.,,-81
RLC
LD
LD
LD
LV
LD
PAGE
LD
ADD
LV
iYCOORD)
.A
A.OOH
IICOORD)
.A
DE.PACKET
HL,IBIOS!
1-:
A
,072H
A.L
L
••
Calculate the Y coordinate
of
the screen
blod
i=
data block
nUlber
12)
Set
the X coordinate to 0
i.e.
always
start
at the I
eft
edqe
of
the screen
Set
uo
the
oadet
address for the
BIOS
slave call
Set the
BIOS
call address
i.e.
WBOOT
address
so
we
can
calculate
the
address
of
the
SLAVE
BIOS
call.
Get
the
SLAVE
B[OS
call offset
frol
WBOOT
And
calculate the
SLAVE
call
'5
actual
address
Move
the calculated address into the correct
to execute the call
Execute
the
SLAVE
BIOS
call
~
return
fro.
this
subroutine.
;fHff******fff*****HHffHfffff***ffIH*****Hfffff****fff****fffffffff
JP
IHLi
:*
f
:*
:f
:1
Subroutine
Create a fi Ie Icalled
VRAMDATA.DAn
into
which
to
save
the screen data
on
disk.
It
ta~es
Uo
3.
75Kb.
;
**,********f***fflf****Hfl****ff************H****fHf***ffffffffUfffI
CREATE:
LD
A.OO
LO
IFCBAOR+12).A
LD
HL.
FCBADR+l2
LD
DE.FCBADR+13
LD
BC.25
LDIR
LD
C.13
CALL
BDOS
LD
C.2b
LD
DE.
DMABUF
CALL
BDOS
CALL
DELETE
LD
C
.22
LO
DE.FCBADR
CALL
BDOS
RET
U-8
Zero
the
first
byte
after
the
file
type
in the
FeB
for safetv' s
sake
Set
up
the source location to zero the
the
rest
of
the
FCB
Set
up
the destination address to zero
the
rest
of
the
FCB
Set
up
the
nUlber
of
bytes
we
need
to zero
And
set
the.
to zero using a ripple effect
Set
up
the
BDOS
function
code
that perfor.s
the
"RESET'
of
the disks.
i.e.
sets
all
of
the
di
sks to a
R/W
status
and
sets
the
DHA
default address to
0080H
~
execute
it.
Set
uo
the
BDOS
function
code
that sets the
OKA
address.
Set
up
the
DHA
buffer address
And
go
and
set the
D"A
address
Erase the
file
if
it
exists. but don't
.orrv
if
it
doesn'tli
Set
up
the
BDOS
function
code
that will
create a
new
fi Ie.
Set
up
the
FCB
address
So
and
try to create the
new
file.
And
return to the
.ain
prOQra.
which
wi
II
deal
wi
th
anv
errors that lay occur.