*** BEWARE - this program seems to be not very stable - my calculator crashed the first time I tried it *** Lutz Vieweg. From: Detlef Mueller To: All Subj: v02i012: lem - Lemming animation v1.1, Part01/01 Date: 01 Oct 91 02:44:31 From: detlef@mwhh.hanse.de (Detlef Mueller) Checksum: 2314906768 (verify with brik -cv) Submitted-by: Detlef Mueller Posting-number: Volume 2, Issue 12 Archive-name: lem/part01 BEGIN_DOC lemming.doc Hi. It seems that I spend too much time programming this little toy :-) ... Anyway, here is an update to LEMMING version 1.1 . The changes vs. v 1.0 are : - sound is generated at the correct time - align the sixth grob - speed up - smother animation - shorter It animates a little lemming :-), walking in the status line. It doesn't change the value of PICT. Once running, you can stop the program by pressing any key. If you only want to use LEM, download LEM.ASC into your HP48, execute ASC\-> and store the result into a variable. To generate LEM, put the listings of LEM.M and LEM.S in the appropriate files, then invoke the following commandlines at the MesS-DOS prompt: rplcomp lem.s lem.a sasm -e -N lem.a sload -H lem.m This should generate the file 'LEM' (size 308 bytes, no extension). After being downloaded to your HP48, 'LEM' should be 307.5 bytes in size with a checksum of #F3FA. If nothing went wrong, 'LEM' is now executable. BTW, this program is named 'lemming' because I got the animation sequence from a game called 'Lemmings'. In the game the actors are called so, because they're walking straight forward (and fall out of the screen if you don't stop them) and can be manipulated indirect only. Have a good time, 8-), Detlef P.S. If there are any questions feel free to mail me. Here are the listings: END_DOC BEGIN_SRC lem.m SUpress XRef OUtput lem LLu lem.lr SEarch entries.o RElocate lem.o END_SRC BEGIN_SRC lem.s ***************************************************************************** * Modulname: Lemming * Modultype: User level secondary * Dest.Comp.: HP48 * Language: System RPL * Author: Detlef Mueller,Nibelungenweg 6,2000 Hamburg 56 * Interface: LEM ( --> ) * Description: * Edition History : * 1.000 08-11-1991 DM Alpha version * 001 09-19-1991 DM Fix grob, smoth animation ***************************************************************************** TITLE Lemming ASSEMBLE NIBASC /HPHP48-E/ Bin. download header * GROB in RPLCOMP generates unusable * grob definitions. This is the workaround: MKSGROB MACRO * x,y,gpatt - gpatt max. 80 nibbles CON(5) =DOGROB CON(5) 15+(($1+7)/8)*$2*2 CON(5) $2 CON(5) $1 NIBHEX $3 MKSGROB ENDM RPL :: CK0NOLASTWD ( *Std. entry* ) ClrDA1IsStat ( *Suspend clock* ) ZEROZERO TWELVE BLANKIT ( *Clr. part of DA1* --> #0 ) GARBAGE ( *Force garbage collection* ) BEGIN #1+ ( *Inc. x* ) { ASSEMBLE ( *Lemming images* ) MKSGROB 6,10,00C3C18381818181C181 MKSGROB 7,10,82C1C18381C1C585C2C0 MKSGROB 7,10,0041C18183C1C1E3C366 MKSGROB 6,10,0081C3C38181C181E323 MKSGROB 6,10,00C3C1C381818181C181 MKSGROB 7,10,82C1C18381818585C2C0 MKSGROB 7,10,0041C18183818183C366 MKSGROB 6,10,0081C3C381818181E323 RPL } OVER SEVEN #AND #1+ NTHCOMPDROP ( *Get lem image* #x --> #x g ) HARDBUFF 3PICK FOUR ( #x g --> #x g hbg #x #4 ) GROB! ( *Draw new lem* --> #x ) DUP THREE #AND #2= IT ( *On every step ..* ) :: THREE 400 setbeep ( *Generate tick* ) ; %.1 dowait ( *Slowdown - try to rem. this :*) GETTOUCH IT ( *Key pressed ?*) :: 2DROP 123 ( *Yes, signal exit* ) ; ATTN? IT ( *ATTN pressed ?* ) :: DROP 123 ( *Yes, signal exit* ) ; 123 OVER#= ( *Stop loop at x = 123* ) UNTIL DROP ( *Drop x* ) ATTNFLGCLR FLUSHKEYS ( *Clr attn flag, key buffer* ) ClrDAsOK ( *Signal redraw display* ) ; END_SRC