Z88 Developers' Notes
Contents   Contents of System Calls

OS_Map, PipeDream map control

RST 20H, DEFW $F406

IN:

     BC = reason code
          MP_WR ($01)    write a line to the map
          MP_DEF ($02)   define a map using the Panel default width
          MP_GRA ($03)   define a map of specific width
          MP_DEL ($04)   delete a map
OUT, if call successful:
     Fc = 0
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_BAD ($04), bad parameters (errors are generally ignored)
          RC_UNK ($03), value of BC is not valid
Registers changed after return:
     defined by MP_ reason code.
MP_WR ($01), write a line to the map

IN:

     A = window ID number (ASCII digit '1' to '6')
     DE = row of the map to be written (0 to 63, 0 = top of screen)
     HL = points to bytes to be written
OUT:
     -
Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different
Notes:
HL points to a series of bytes, where each byte represents 8 pixels on the map. Bit 7 is the left most pixel and the bytes are written onto the map from left to right. The number of bytes read from HL depends on the width of the map.


MP_DEF ($02), define a map using the Panel width

IN:

     A = window ID number (ASCII digit '1' to '6')
OUT:
     B = width of map in pixels
     C = width of map in 6 bit characters
Registers changed after return:
     A...DEHL/IXIY same
     .FBC..../.... different
Notes:
This call simply reads the value of the map size entry in the Panel and attempts to define a map of that width.


MP_GRA ($03), define a map of specific width

IN:

     A = window ID number (ASCII digit '1' to '6')
     HL = width of map to set up (0 to 255)
OUT:
     as for MP_DEF
MP_DEL ($04), delete a map

IN:

     A = window ID number (ASCII digit '1' to '6')
OUT:
     -
Notes:
At present there is only one map area and it is reclaimed for text by redefining the window in which it sits, or by defining a window which overlaps it. However, to allow for future expansion this call should be used if a map area is to be reclaimed for text use.