80-Bus News

  

January-February 1984, Volume 3, Issue 1











Page 14 of 55











PROGRAM pluto;

CONST

{Pluto port addresses.}

status = 160; data = 161; {Pluto routine numbers.}

allocp 163; are = 193; bfLLL bfilep = 179; clrewp 172; copy fELLL 130; £filp 174; £fils ibcol 144; iceol 141; 1Lep iesp 146; icwp 147; ifeol ipcol 187; irsel 185; ietat iteol 145; iwprot 149; limage

ca 176; bfils liner = 157; liners 158; lineto

133; copyts 173; £filsp 150; icdp 143; ipat 134; istyle 159; limage 128; lsym 153; moveto 155; plotrs 1903 rpix 162; rsyme 131; sesp 180; sfpats 182; speol 139; swprot

lsyme 189; mover 152; movers pinit 166; plot 154; plotr rfill 129; rimage = 161; rimage rpixr 168; rpixrs = 169; reym sbeol 135; sceol 137; sedp scwp 1653 sfeol 136; sfpatr shires 170; slores 171; spat srsel = 184; sstyle = 138; stcol {Pluto colours.)

black = 0; green = 1; blue = 25 cyan ™ red «= 4; yellow = 5; magenta = 6; white = {Pluto pixel block maximum sizes, to set maximum

ake Ba ee Boe Hog HH g

177; 132; 175; 148; 183; 142; 188; 160; 151; 156; 167; 191; 164; 181; 186; 140;

33 73 size

of the array used by pixel load and save routines.}

pixwide = 10; {Or other value.}

pixhigh = 10; {Or other value.}

TYPE

{Pluto colour type-}

plutocol = black..whites

{Pluto subrange types.}

byte = 0.255;

xeoord = 0..639;

yeoord * 0.6287;

xine = +-639..639;

yine = -28760287;

xincsh = -127..128;

yinesh = -127..1283

horiz = 1.6640;

vert = 14.288;

VAR

{Pluto colour variables.}

ccol, beol, feol, teol, peol : plutocol; {Pluto partition and workspace variables.} ewp Lew 23 {Current working partition-} esp 0602553 {Current symbol partition.} edp Lee23 {Current display partition.) cpx 0.639; {Current position, X value-} cpy 0402873 {current position, Y value.} {Pluto miscellaneous variables.}

stat : byte; {Pluto status varlable.} pat + 0..255; {Line and are pattern.} {Single colour plane operators.}

wprot 2 Qee7; {Write protect mask.}

ae ee ae ne ee

reel : Os7; {Read select mask.} {The style variable.} style c 0255; {Pluto parameter variables.} X : xeoord; {Absolute X, Y coordinates.} Yo: yeoord; : xine; {16 bit X, Y displacements.) DY : yinc; dx : xincsh; {8 bit X, YY displacements.} dy : yinesh; width : horiz; (Width and height.} height : vert; ni: byte; {General 8 bit number.) pt bytes {Partition identifier.} e : plutocol; {General colour returned.} {Parameters for the copy routine.} xfrom, xto : xcoord; yfrom, yto : yeoord; pfrom, pto : byte; {Parameters for the are routine-} arexc, arcyc : INTEGER; arcxe ! xinc; arcye t yine; {Parameter block for the pixel block commands.} pixeles : ARRAY [1l..pixhigh,1l..pixwide] OF plutocolour; PROCEDURE sendword(wl, w2 : INTEGER); {This sends two 16 bit values to the data port address of the Pluto board. As I am using the HSA-88B board and Hisoft Pascal 5, it has to do a bit of messing round to get the 16 bits we want from the 32 actually stored!} BEGIN OUT (data, PEEK (ADDR (wl )+2, CHAR) ); OUT (data, PEEK (ADDR (w1)+3,CHAR)) OUT (data, PEEK (ADDR (w2)+2, CHAR) ) OUT (data, PEEK (ADDR (w2)+3, CHAR) ) END; PROCEDURE senddxdy; BEGIN OUT (data,CHR(dx)); OUT (data,CHR(dy)) END; PROCEDURE setdefaults; BEGIN

an new

5 3

73 beol :* 03 feol :™ 73 teol := 7; 7; cwp := 13 cap := 255; cdp t= 1; Yre 0; pat := 240; wprot:= 0;

73 style t= 128

PROCEDURE pwait; {This waits until the Pluto board is ready.} BEGIN

WHILE INP(status) < CHR(128) DO {nothing} END; PROCEDURE notyet; BEGIN

14


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 14 of 55