From: jhmeyers@miu.edu (John H Meyers)
Subject: PixelMania (Basic SYS-RPL program)
Date: 21 Oct 1996 00:00:00 GMT
Message-ID: <54etmf$4vi@news.iastate.edu>
references: <32699F63.167EB0E7@cs.pdx.edu>
organization: MIU Computer Services,  Fairfield, IA 52557.  Not Approved.
reply-to: jhmeyers@miu.edu
newsgroups: comp.sys.hp48


In article <32699F63.167EB0E7@cs.pdx.edu>,
Mark H Schmidt <husker@cs.pdx.edu> writes:

> I know no one will, but if anyone has a few moments, how would you write
> a basic SYS-RPL program that places random pixels all over the screen.

  This won't help you at all, but you can get plenty of "random" pixels
  by doing { #0 #0 } PVIEW PICT PURGE 7 FREEZE MEM DROP followed by any
  program you like -- preferably a very long one which ends up repeatedly
  doing many GC's (garbage collections).  This will give you a direct
  image of temporary memory on your screen, and if you look closely
  during GC, you may be able to get some clues as to how it works.

  Another interesting insight may be gained from doing this with a
  program which creates many "temporary environment levels," such as

  \<< \-> n \<< IFERR
      IF 'n>1' THEN 'n*WEIRD(n-1)' EVAL ELSE CLEAR 0 DOERR END
                THEN END \>> \>> 'WEIRD' STO

  \<< { #0 #0 } PVIEW PICT PURGE 7 FREEZE MEM DROP 48 WEIRD \>> 'ZOWIE' STO

  Now press ZOWIE and watch closely!  Explain!! (did you notice the GC's?)

  For extra credit, convert to SysRPL (answering your own question) !!!

If this gets too boring, try goldfish (but remember you have to feed those).

-----------------------------------------------------------
With best wishes from:  John H Meyers  ( jhmeyers@mum.edu )
