Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!hp-pcd!hpcvra.cv.hp.com!rnews!hpcvbbs!akcs.falco From: akcs.falco@hpcvbbs.UUCP (Andrey Dolgachev) Newsgroups: comp.sys.handhelds Subject: Re: HP48: Displaying PICT; is there another way? Message-ID: <2815ab4d:2889.1comp.sys.handhelds;1@hpcvbbs.UUCP> Date: 24 Apr 91 16:40:04 GMT References: <1991Apr23.175400.8672@nntp-server.caltech.edu> Lines: 34 If you want to update a displayed GROB in response to a key press, simply use the PICT display. If you use PVIEW, it does NOT take over the keyboard, it simply displays the PICT. There are two "graphics" screens on the HP-48, the PICT, and the LCD. When you use ->LCD, PROMPT, DISP, and the stack itself, those all use the LCD screen. The PICT is stored in a seperate screen, which can be viewd with PVIEW. If you want to make a calendar program, or whatever, simply create your startup screen first, by either storing a GROB into the PICT, or using REPL, or using LINE, whatever. BTW all of the graphics routines like circle, arc, rectnagle, line, point, etc. draw on the PICT. Notice that you should create your screen before doing PVIEW, you don't want the user looking at how your screen is taking shape. O.K., now that you have created your screen, simply do { #0d #0d } PVIEW to display your PICT. This display will continue, until you switch to the LCD, by finishing the program. O.K>, now you have your screen. Simply make a loop that waits for a key press, or whatever you want. The calculator responds just like normal to a key press and you can modify the PICT whil it is being displayed. So, for example, if you want to hilite each date as the user moves through the month, then wait for the key press indicating that the user pressed the right arrow or whatever, then by incrementing a counter or decremtning or multiplying or whatever you want to do, you find out the next coordinates of the square to be hilited. All you have to do is use SUB to get that GROB, invert it, and REPL it back into the same place. You can do this while in PVIEW, w/o having to meddle with LCD. In general, you can do all the normal graphics things, including REPL, while the calculator is displaying the PICT, an deverything is automatically updated. I hope this solves your problem. I'm not sure what any of your specific problems are, but I hope this helps. BTW, the fastest way to do this is by machine code, but I guessed that you wanted to know how to do this in userlang. Check out the HP manuals, including the WALK program, or better yet , any of the programs out now with graphics (Like my Tetris) for info on userlang graphics. If you really want to get into it, try learnign how to do this stuff with machine code. ---Falco