PAGE

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
PAGE COPY n TO m [,when] [,dontcopyblack]
PAGE RESIZE pageno, width, height
PAGE SCROLL pageno, x, y [,fillcolour]
PAGE STITCH frompage1, from_page_2, topage, offset
PAGE AND_PIXELS sourcepage1, sourcepage2, destinationpage
PAGE OR_PIXELS sourcepage1, sourcepage2, destinationpage
PAGE XOR_PIXELS sourcepage1, sourcepage2, destinationpage
PAGE WRITE n 

Description:

PAGE COPY n TO m [,when] [,dontcopyblack]
Copy the contents of one video page to another.
'n' is the source and 'm' is the destination. 'when' can be one of letters I, B, or D. If omitted it will default to I.
I means do the copy immediately. It is the most efficient but risks causing screen artefacts
B means wait until the next frame blanking and then do the copy. It is the least efficient but is absolutely determinate in its effect and no screen artefacts will ever be seen.
D means carry on processing the next command and do the copy in the background when the next frame blanking occurs. 
This is efficient  but must be used with care as subsequent drawing commands may or may not be included in the copy depending on the timing of the next screen blanking
If DONTCOPYBLACK is set to 1 then only non-black pixels are copied. This is more efficient than using BLIT with bit 2 of the orientation set.

PAGE RESIZE pageno, width, height
This command changes the width and height of a given page in memory. 
‘width’ can be set between 1 and the normal width for the current display mode. ‘height’ can be set between 1 and the normal height of the display mode. 
When PAGE WRITE is set to a resized page all graphics commands will respect the new values of width and height, including print output scrolling, and MM.HRES and MM.VRES will report the revised size.

PAGE SCROLL pageno, x, y [,fillcolour]
Will scroll the image on the page specified by 'pageno' by the amount defined by 'x' and 'y'. By default the area scrolled off the screen appears on the other side.
If 'fillcolour' is specified it will replace the area left behind by the scroll with the colour specified. If 'fillcolour' is set to -1 then the area left behind by the scroll is left untouched. 
This is the most efficient version and is suitable if there is a black background.

PAGE STITCH frompage1, from_page_2, topage, offset
Will take the last horizontal resolution minus 'offset' columns from 'frompage1' and the first 'offset' columns from 'frompage2' and copies them to 'topage'

PAGE AND_PIXELS sourcepage1, sourcepage2, destinationpage
PAGE OR_PIXELS sourcepage1, sourcepage2, destinationpage
PAGE XOR_PIXELS sourcepage1, sourcepage2, destinationpage

These commands combine the pixels on sourcepage1 and sourcepage2 by ANDing, ORing, or XORing them. destinationpage can be the same as either of the sourcepages if required.


PAGE WRITE n 
Instructs MMBasic to make all graphics commands write to page 'n'. If not used page 0 is the default. Set the page to FRAMEBUFFER to write to the framebuffer – see the FRAMEBUFFER command.

 

mode 13,16 '400x300
page resize 3,200,200
page resize 2,200,200
list pages
page write 2
cls
print "Hello this is a test of the first very long string to see if it wraps. "
print "Hello this is a test of the second very long string to see if it wraps. "
print "Hello this is a test of the third very long string to see if it wraps. "
print "Hello this is a test of the fourth very long string to see if it wraps. "
print "Hello this is a test of the fifth very long string to see if it wraps. "
print "Hello this is a test of the sixth very long string to see if it wraps. "
print "Hello this is a test of the seventh very long string to see if it wraps. "
print "Apparently it works. Smiley face"
box 0,0,mm.hres,mm.vres ' mm.hres and mm.vres track the current write page
page write 0
page copy 2 to 3' can do this because they are the same size
BLIT 0,0,100,50,200,200,3' pages are different sizes so have to use BLIT
do:loop

Last edited: 15 December, 2020