HP-25 PING PONG vs HP
This program will allow you to play Ping Pong against the HP-25. The first player to 7 wins. The display will show you how deep on each side the hit was. Make sure you hit your return hard enough to clear the net and go as deep as you can without hitting the ball off the end of the table. The HP-25 is a good player and only misses every once in a while. Good Luck!
Listing:
Play until you or cpu reaches 7 first, score will flash
until you press R/S key.  

New Game: 0 Sto 1, 0 Sto 2, -1 Sto 3 and press R/S to play a new game.  
(for 32sII users also press Gto A, before pressing the R/S key) SCORE YOU. CPU (32sII shows 0e0) - flashes then shows computer's hit The position of the 1 is where the ball is... -10000.00000 - deep into your table (strong hit) -10.00000 - shallow hit (weak hit) Enter your hit, based on what the computer's hit strength was. Make sure you hit it hard enough to go back over the net. Anything around the 3 to 9 range will work. Watch the reaction of the ball and adjust. Press R/S key after pressing a number (3 to 9). Your hit will flash on the screen 0.10000 - shallow return (weak hit) 0.00001 - deep return (strong hit) Continue playing until someone scores a point... then the score will flash once and you start another rally... ================================================== Initialize these registers: 0 Sto 1 player score 0 Sto 2 cpu score -1 Sto 3 flag for winner .32837(random) Sto 4 anything between 0 and 1, NOT zero!!!!! .00001 Sto 6 constant ================================================== Start of Program (label A) 1 f sci 0 2 Rcl 1 ;player score 3 Rcl 2 ;score computer 4 10^x ;convert it (10 raised to x power) 5 x ;multiply to combine the score (label B) 6 pause ;display it 7 Rcl 3 ;flag 8 x >= 0 9 Gto 1 (Label A) ;if flag set then loop, we have a winner ; generate computer hit 10 5 11 Rcl 4 ;random 12 sin-1 13 frac 14 Sto 4 15 x ;generate a value 0-4.9999 16 Sto 5 ;computer's power 1-4 with fractional part 17 int ;0-4 18 x = 0 19 Gto 42 (Label D) ;player point 20% of the time 20 10^x 21 chs 22 f fix 5 ;show in -xxxxx.xxxxx format 23 R/S ; player input 3-9 or there abouts...have to react to computer hit 24 Rcl 5 25 - ;subtract cpu power from your input 26 Rcl 5 ;use the fractional part for another random value 27 frac 28 x ;multiply 29 int 30 x < 0 ;did we make it back over the net? 31 Gto 38 (Label C) ;NO!!! cpu point 32 chs ;display your hit in decimal 33 10^x ;0.1 -> 0.00001 ;has to be in this range 34 Rcl 6 ;constant .00001 35 x<>y ;exchange X & Y values in stack 36 x >= y ;check if in range 37 Gto 6 (Label B) ;yes, flash your hit then gen computer response ; computer point (label C) 38 1 39 Sto+2 ;add a point for the computer 40 Rcl 2 41 Gto 45 (Label E) ;chk for range ;player point (label D) 42 1 43 Sto+1 ;add a point for the player 44 Rcl 1 ;range check for winner (label E) 45 6 46 x < y 47 Sto 3 ;set the flag 48 Goto 1 (Label A)

PLEASE CLOSE THIS WINDOW TO RETURN TO THE LIST OF HP-25 GAMES
If you have any questions, please feel free to E-mail them to me using the address shown at the top of this page. -SAB
Use the search bar below to locate a "HP-25 emulator" to play this game on your system.

Custom Search
View Steve Baker's profile on LinkedIn