(PMagic Utilities (Pilot) of 17-Jul-81  9:32:02)/print

(magic)(magicdict /begin).cvx .def

(magicdict).where
  (.pop).cvx
  ((magicdict)256 .dict .def).cvx
.ifelse

magicdict .begin

(begin)
(jamrun magicrun .eq .not
   ((MagicSupport.bcd).loadbcd
    (draw)().cvx .def
    (magicrun)jamrun .def
   ).cvx
 .if
 (Magic)/print
).cvx .def

(magicrun)0 .def

(.reddown)(2 .copy 4 trackbox).cvx .def
(.redup)
(4 .copy .pop .exch .pop .lt
  (expand).cvx
  (contract).cvx
 .ifelse
 draw
).cvx .def

(.yellowdown)().cvx .def
(.yellowup)(scroll draw).cvx .def

(.bluedown)(2 .copy 1 trackbox).cvx .def
(.blueup)
(setclipregion draw
).cvx .def

(fit)(boundbox expand).cvx .def

(clipfit)(fit boundbox setclipregion).cvx .def

(atorigin)(boundbox .pop .pop getclipregion .pop .pop scroll).cvx .def

(scrollto)
(getclipregion
 3 -1 .roll .add 2 .div
 3 1 .roll .add 2 .div
 .exch scroll draw .displayon
).cvx .def

(watchmouse)((watchkeys).cvx .loop).cvx .def
(.prompt)((#).print).cvx .def  .end

()/print

magic