Post Reply 
What is the best BASIC Pocket Computer
04-17-2014, 04:07 PM
Post: #81
RE: What is the best BASIC Pocket Computer
Quote:You might want to try using Everyready Lithium AA Batteries. They will last a lot longer than standard AA batteries. They cost more, but I can usually find them on sale for about half price several times a year and I stock up on them at the lower price. I use tem in my HP-200LX and in my Omnibook OB-430.

I was using these in my HP-200LX as well, they do last a lot longer. However they have a very flat discharge voltage profile, dropping to zero very rapidly at the end of their life. This results in the low battery indication being shown for a very short time before the cells are completely dead. I didn't like that and switched back to alkaline cells.

-katie

Visit this user's website Find all posts by this user
Quote this message in a reply
04-17-2014, 07:33 PM
Post: #82
RE: What is the best BASIC Pocket Computer
Quote: just did the test (167699497) on a HP-200LX running GW-Basic and Basica. Both took about 9.3-9.5 seconds. So UBASIC is quite a bit faster.

I've never heard of UBASIC. With this speed difference. I need to check it out.

Okay, I repeated the test on a pocket computer - Sharp PC-1600. I had to slightly modify the program - Sharp's basic didn't like multiple statements after the IF/THEN in line 190. Plus used the TIME function to calculate the elapsed time.

For 167699497, it took about 100 seconds.

I was going to try the PC-1262, but can't find my unit. Probably in the bottom of a very messy drawer.

Bill
Find all posts by this user
Quote this message in a reply
04-17-2014, 10:18 PM (This post was last modified: 04-17-2014 10:26 PM by Sylvain Cote.)
Post: #83
RE: What is the best BASIC Pocket Computer
I just ran the program on a HP-75C and it took 40.737 seconds for X=167699497.

program changes ...
1 DELAY 0
5 REAL X, F, M, T1, T2
15 T1=TIME
900 T2=TIME @ DISP
all PRINT's replaced by DISP
all : replaced by @

Sylvain

[edit: add program changes]
Find all posts by this user
Quote this message in a reply
04-17-2014, 10:36 PM
Post: #84
RE: What is the best BASIC Pocket Computer
Bench

Systems Analyst
https://www.facebook.com/hp41cx
41/48G+/59/85B/PC1600
Yaesu VX-8DR/Sony Z1
Focal/VB6/All Basic´s
Find all posts by this user
Quote this message in a reply
04-18-2014, 06:19 PM
Post: #85
RE: What is the best BASIC Pocket Computer
(04-17-2014 10:36 PM)hp41cx Wrote:  Bench

With UBASIC on the 200LX without any change except for time measurement and dim(8) 6.76 sec.

A minor improvement to 6.36sec. when using shortened arithmetic e.g. A+=X instead of A=A+X.

Günter
Find all posts by this user
Quote this message in a reply
04-18-2014, 09:12 PM
Post: #86
RE: What is the best BASIC Pocket Computer
(04-16-2014 08:23 PM)Guenter Schink Wrote:  Your example of 167699497 is calculated in about 2.4 seconds

Günter

Now I have transformed the code into a structured form, no "GOTOs" any more Smile. Then I use some special operations of UBASIC. But the algorithm is the same still.
Code:
 100   input "X=";X
  110   clr time
  120   M=int(sqrt(X))
  130   F=0
  140   data 2,1,2,2
  145    ' take care of divisors 2-7
  150   for I=1 to 4
  160   read S:gosub *Divide
  170   next I
  180   data 4,2,4,2,4,6,2,6
  185    'Now calculate with numbers >7 omitting all that can be divided by 2,3 and 5
  190   while X>1
  200    for I=1 to 8
  210    read S
  220    gosub *Divide
  230    next I
  240    restore 180
  250    if F>M then
  260    :    F=X
  270    :    S=0
  280    :    gosub *Divide
  290    endif
  300   wend
  310   ET=time1000/1000     'time1000 gives milliseconds after last "clr time"
  320   print:print "Execution Time: "
  330   print ET;
  340   end
  345   'Now start factoring
  350   *Divide
  360   F+=S                'this is shorter and faster for F=F+S
  370   while not X@F        'while there is no remainder
  380       X\=F            'this is short for x=x\f where "\" denotes integer division
  390        M=int(sqrt(X))
  400        print F;
  410   wend
  420   return

This program needs 1.53 sec for 167699497 on the 200LX.

Günter
Find all posts by this user
Quote this message in a reply
04-18-2014, 09:51 PM
Post: #87
RE: What is the best BASIC Pocket Computer
(04-18-2014 09:12 PM)Guenter Schink Wrote:  
(04-16-2014 08:23 PM)Guenter Schink Wrote:  Your example of 167699497 is calculated in about 2.4 seconds

Günter

Now I have transformed the code into a structured form, no "GOTOs" any more Smile. Then I use some special operations of UBASIC. But the algorithm is the same still.
Code:
 100   input "X=";X
  110   clr time
  120   M=int(sqrt(X))
  130   F=0
  140   data 2,1,2,2
  145    ' take care of divisors 2-7
  150   for I=1 to 4
  160   read S:gosub *Divide
  170   next I
  180   data 4,2,4,2,4,6,2,6
  185    'Now calculate with numbers >7 omitting all that can be divided by 2,3 and 5
  190   while X>1
  200    for I=1 to 8
  210    read S
  220    gosub *Divide
  230    next I
  240    restore 180
  250    if F>M then
  260    :    F=X
  270    :    S=0
  280    :    gosub *Divide
  290    endif
  300   wend
  310   ET=time1000/1000     'time1000 gives milliseconds after last "clr time"
  320   print:print "Execution Time: "
  330   print ET;
  340   end
  345   'Now start factoring
  350   *Divide
  360   F+=S                'this is shorter and faster for F=F+S
  370   while not X@F        'while there is no remainder
  380       X\=F            'this is short for x=x\f where "\" denotes integer division
  390        M=int(sqrt(X))
  400        print F;
  410   wend
  420   return

This program needs 1.53 sec for 167699497 on the 200LX.

Günter

That's pretty impressive. I definitely need to experiment with UBASIC this weekend.

For the record, I loaded my GW-BASIC version into QBASIC and ran it with no modifications, and it took about 12 seconds, or ~50% longer.

Still can't find any place to download Swift!BASIC that I've seen mentioned in The Palmtop Paper archive.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-07-2014, 01:36 AM
Post: #88
RE: What is the best BASIC Pocket Computer
(04-06-2014 06:13 PM)rprosperi Wrote:  [quote='Katie Wasserman' pid='8499' dateline='1396768062']
I almost completely forgot about the Sharp OZ-7000 with the OZ-707 Scientific Computer Card inserted. This is a very capable BASIC ...

So nice to see this discussion. I have a pretty large Sharp Wizard collection (Museum) some new in box. I love hunting down elusive cards for the wizards.

As you mentioned the work you did - I recently acquired a prudential 'PRUPACRATER' card. After reading your info I looked at the back and low and behold it is an OZ-770 64KB with a special label from Prudential on the front. Thanks so much for sharing that information.
Find all posts by this user
Quote this message in a reply
05-07-2014, 02:44 AM
Post: #89
RE: What is the best BASIC Pocket Computer
I ran Dave's prime factor program on an Panasonic HHC running snapBASIC I replaced the first data statement with an array because the restore function in this dialect restores all data statements in the program. Time functions are different you read the clock by peeking at 5 sequential bytes in memory. Replaced all the INT functions with one called FIX as INT will only work with integer values and they are limited to a signed 16 bit number. Replaced SQR with SQRT, SQR returns the square of the argument.

In interpreted mode 167699497 takes almost exactly 3 mins despite having a considerable faster CPU than the HP handhelds. I think the difference is the HP handhelds are running a CPU that is optimized for floating point math, whereas the HHC is running a 1 MHz 6502, a general purpose processor and a very simple one at that.

I wanted to try this as a compiled program but before I can do that I need to figure out a way to get the compiled program off the machine and burn it into a EPROM as the design of the system does not allow the execution of compiled programs from RAM. The design of this machine is, interesting but the keyboard on it is pretty unfortunate. It works well but the keys are crowded and the keytops are small rectangles arranged in straight columns. The key legends are printed on the top of the machine around the keys instead of on the keytops and are pretty busy, it is not a nice keyboard to type on.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)