[comp.sys.hp] HP-28S speed-up part 2

T7M-MOIV@FINTUVM.BITNET (Marko Toivonen) (03/13/89)

========================================================================
>                         HP-28S SPEED-UP - PART 2
>
>
>2. Please provide a version which is shorter/quicker/does not need to run in
>   the HOME directory.
>
>All of these things can be done with a machine code program.  The
>trouble with machine code is that you need to enter some other programs
>first to assemble and store the code, and there is a risk of losing all
>of user memory if you make a mistake.  (I could take this opportunity
>
>3. Provide a version which slows down the HP-28S again.
>
>Well, really it's just enough to press ON :-) But if you want a
>programmable version then you need to replace the F which gives a
>maximum speed with a 7 which gives the normal speed, or even with a
>lower number (0 gives about one-third speed, and saves battery power,
>
Once again....
Below is a sample program to do this. (It is quite long...)
It moves up to the HOME directory and stores there three programs:

I DATAL : This list contains the MCODE to be stored in SPEED.
II SPEED : The CODE is stored to the string in this program.
III LD : Here is the code which moves data from I to II.
(All except II are also PURGEd by the program)

WARNING | This program uses SYSEVAL several times.
 So before running it CHECK it carefully |
 Run at your own risk .(It works in my and my friends HP28S|)
 (Don't change it unless you know what you're doing|)
 (Read this article before typing it in)


<< HOME RCWS 64 STWS
  { #4717410002F02C96h #F10B519717317Eh #4612417310951FFFh #C808 }
'DATAL' DUP PURGE STO
  << RR RL "ABCDEFGHIJKLMNOPQRSTU" >>
'SPEED' DUP PURGE STO
  #E6301331CFFA2h #E6FB51CFEB9F1h #E6F951CFF43F1h #C808461241131311h
-> b1 b2 b3 b4
  << #E63B51CFF07F1h #E63951CFF73F1h
     b2 #3400h +     b3 #2000h +
     b2 #1A00h +     b3 #1000h +
     b2              b3
     1 4
       START 2 ->LIST b1 SWAP + b4 +
             'LD' DUP PURGE STO
             #CFF9D SYSEVAL                 /*       REMARK           */
       NEXT STWS { LD DATAL LOADER } PURGE  /* if you don't want to   */
  >>                                        /* PURGE the main program */
>>  'LOADER' STO                            /* remove LOADER from list*/

 After running it you will see only one new program : SPEED
 This is how it works:
  You put a binary integer in level one (1|)
    (Containing speed desired #0h -> #Fh)
  Press button below SPEED

  If you happen to RCL (or VISIT or ...) it you will see:

  << RR RL System Object >>

  RR and RL (together) checks that the object in level one really
  is a binary integer (Very good from Wlodek Mier-Jedrzejowicz's book)
   (The code itself (System Object) takes object from level one and
    pokes it to address #CFF00 (very simple))

  (Unfortunately you cannot EDIT SPEED because it may ruin the code)
  BUT  you can for example move it to any directory you want and
       run it there |

  This is not the only way to do this, but it is pretty good.
   I do hope that somebody likes this version of Speed-up|||

 NOTE : If you are not pleased with the name 'SPEED' you can change it
        like it was a normal program (that is by RCL and 'name' STO)

 WARNING II: You may change this program but you are not allowed to
             sell it.
             Changing the program MAY cause Memory Lost |

 NOTE II:
  There is more about System Objects and in-line mcode in W M-J's
   book Customize your HP-28