ViCalc

History and Preservation Issues

Moderator: Moderators

Post Reply
Niwains
Vic 20 Newbie
Posts: 7
Joined: Sat Jan 14, 2017 12:30 pm

ViCalc

Post by Niwains »

Here is ViCalc from 1981 for the unexpanded VIC in tap and prg format.
I have also scanned the manual.
Attachments
ViCalc.zip
(473.33 KiB) Downloaded 154 times
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: ViCalc

Post by chysn »

I have a long history of doing my taxes with a Tandy PC-3 pocket computer. This year, I might switch that up a bit.

ViCalc means "viable" calculator? That's interesting.
User avatar
mathom
Vic 20 Dabbler
Posts: 80
Joined: Wed Aug 07, 2019 11:37 am
Location: Centennial, Colorado
Occupation: Software Engineer

Re: ViCalc

Post by mathom »

Thank you for this. I am always interested in the more utilitarian software for the VIC. I find it interesting to see how users and programmers of these early machines envisioned word processors, spreadsheets and the like before the paradigms became "standardized."
...mathom...
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: ViCalc

Post by chysn »

It functions much like an old Hewlett-Packard RPN calculator, but super-slow. I prefer this method of calculation over the more common algebraic system, and it was fun playing with this.

It's a couple hundred lines of BASIC, so obviously it could be faster.
wimoos
Vic 20 Afficionado
Posts: 348
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Re: ViCalc

Post by wimoos »

I have looked into ViCalc. Its slowness is more due to the way the screen is handled (cursor movement), than to the length of the program (it is a little bit less than 100 lines).

Performance improvements could be done by changing 'IF <cond1> AND <cond2>' into 'IF <cond1> THEN IF <cond2>' constructs.
Also, the rounding function expression uses the power function twice or thrice, which makes it slow.
When setting the precision, it would be better to do this by precalculating the P%'th power of 10.

To me, this is a candidate to convert to WimBasic, that has (amongst others) the PRINT@ statement and the ROUND function.

Regards,

Wim.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
wimoos
Vic 20 Afficionado
Posts: 348
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Re: ViCalc

Post by wimoos »

I optimised ViCalc in WimBasic. It is now less than 70 lines and a little over 2k in size. I added an autoboot D64 in the zip file.
It still works conform the manual

I found some bugs that I fixed, and I used WimBasic features like ROUND, EVAL, INSTR, PRINT@ and SWAP. This makes it more responsive.

I also used ON ERROR GOTO for catching errors like ILLEGAL QUANTITY, OVERFLOW and DIVISION BY ZERO. The original version prevents these errors and then does nothing. The WimBasic version does not prevent but catches, and then an appropriate message is displayed.

Regards,

Wim.
ViCalc.zip
(622.43 KiB) Downloaded 93 times
Last edited by wimoos on Fri Mar 04, 2022 11:04 am, edited 2 times in total.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: ViCalc

Post by orion70 »

Great job 👌. Thanks Niwains and Wimoos!
Niwains
Vic 20 Newbie
Posts: 7
Joined: Sat Jan 14, 2017 12:30 pm

Re: ViCalc

Post by Niwains »

Awesome work, wimoos!
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: ViCalc

Post by javierglez »

wimoos wrote: Fri Feb 25, 2022 11:20 am I optimised ViCalc in WimBasic.
Your webpage https://wimbasic.webs.com/ is referencing wimbasic.zip file with an https instead of http, and at first the link looks broken, at least when using Chrome browser.
wimoos
Vic 20 Afficionado
Posts: 348
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Re: ViCalc

Post by wimoos »

Fixed it, thanks for your remark. The prg was also included in the zipped autoboot disk in my previous post.
@moderator: Sorry for hijacking this subject.

Regards,

Wim.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
Post Reply