[comp.sys.handhelds] Pacman for the HP28s

dougc@bert.cs.byu.edu (DOUG CANNON) (06/11/91)

Pacman by Douglas R. Cannon July 1989

Now before anybody gets excited, I must say that this is not the game pacman.
It is simply a small pacman that likes to eat numbers, words, data, etc.
(My interpretation of number crunching) So, if you have a program that just
isn't working well, just put it on the stack and my pacman will take care of
it for you!

You may use or change this program as you wish.

----------------------------------------
As with any of my graphics applications, you will need this small utility:

'MAKE' [1C7]
<< "" DEPTH 1 - 1
   SWAP
   START SWAP CHR
   SWAP +
   NEXT
>>

----------------------------------------
Now lets do the three shapes.
Just type in the numbers, press [MAKE] and store it.


'PAC3' [14A0]
0 0 60 126 126 255 255 255 126 126 60 [MAKE] 'PAC3' [STO]

'PAC2' [16B0]
0 60 126 126 255 231 231 102 102 36 [MAKE] 'PAC2' [STO]

'PAC1' [13C4]
60 126 126 255 231 231 195 66 66 [MAKE] 'PAC1' [STO]

----------------------------------------
Now we need to create the program 'MOVE' this program is very simple, but
it contains two CHR(0), so it cannot be edited after it's been entered.
Do this:

146 32 34 0 0 34 32 83 87 65 80 32 43 10 147
[MAKE] [STR->] 'MOVE' STO
'MOVE' [E8D3]

Now the main program:

'PACMAN' [DB86]
<< PAC1 DUP ->LCD PAC2
   DUP ->LCD PAC3 DUP
   ->LCD 1 273
      START SWAP MOVE
   DUP ->LCD ROT MOVE
   MOVE DUP ->LCD .05
   WAIT
     NEXT
>>

----------------------------------------

That's it! now just run PACMAN and see the results!
Oh, but don't forget to put something on the stack for him to eat.

Please, let me know if you've enjoyed this program.
Also, if you encounter any problems, let me know.
Drop me a line: dougc@bert.cs.byu.edu
I have many more programs of similar interest.

------------------------------------------

As always,
Doug Cannon, BYU, Provo, Utah
dougc@bert.cs.byu.edu