Jump to content



Photo
- - - - -

Qbasic Version 0.20 Released


  • Please log in to reply
9 replies to this topic

#1 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 12 December 2010 - 05:57 PM

Hi!
I spent another 52 hours programming the QBasic addin in the past weeks (Yes I do count the hours!) and the result is a version of QBasic which is now a bit practical: QBasic 0.20. Download it from here.

Here is the program i tested and it worked: Codes from Betoe (Link). Run it with QBasic and compare the speed of QBasic with CPBasic with that. Enjoy the high speed! :D

QBasic still does not support graphical programs.
The program interface is very simple. Just one menu called "Open" (you know what to do with that menu, yeah?) Also, the "Continue" button ( |> ) (which in CP Basic appears beside the battery indicator when a program pauses) is in the toolbar in QBasic.

Important: Errors and Bugs:
This addin is still a beta and has bugs, so use it at your own risks.
If QBasic encounters errors when running a program, it stops running it and shows a message box with only a number in it. The most common error you may see is 0000300C which means there is a command in the program which is not supported by QBasic right now.
Other errors: 00001000 usually happens when you have lists or matrices in the program. They're not supported right now. In case of other errors, please first run the file with classpad's built-in 'Program' to see whether the error exists there. If the error only happens in QBasic, then tell me.

Please comment up so i know what you think about it. At first you may notice that you can run very limited number of programs with it now, but If reactions are positive, i become motivated to develop this addin more and more! So tell me what basic program do you like to with QBasic so that i work on that. :)
Bye.

Edited by MicroPro, 12 December 2010 - 06:34 PM.


#2 Lovecasio

Lovecasio

    Casio Freak

  • Members
  • PipPipPipPip
  • 242 posts
  • Location:Hochiminh city Vietnam
  • Interests:Organic chemistry.<br />Pharmacy

  • Calculators:
    fx 570 MS, Casio AFX 2.0+, ClassPad 300

Posted 29 January 2011 - 03:02 AM

Nice work!

#3 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 31 January 2011 - 11:47 AM

Thanks. Hehe... Actually didn't think anyone used that addin. :greengrin:
I no more developed it but if there is any program that it you like to run fast, i can develop it more so that it supports that program. And you enjoy fast running of programs. ;)

#4 The_AFX_Master

The_AFX_Master

    Casio Overlord

  • [Legends]
  • PipPipPipPipPipPipPip
  • 519 posts
  • Gender:Male
  • Location:Black Mesa Research Facility (sector C)
  • Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

  • Calculators:
    Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 03 February 2011 - 01:35 AM

How much time improvement in percentage compared to the default basic app?

#5 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 03 February 2011 - 06:19 AM

It depends on what the user wants to do. :nod:
Print is 9 times faster than CPBasic. The reason for this is both faster running of programs, and the fact that QBasic only redraws the screen as needed. Also Locate is 3 times faster.
Assignment in QBasic is slower than real program (takes almost twice the time).
For, While, and Do loops are also slightly slower, but users will not notice this since this slowness only shows up in certain test cases.
However, In real programs, fast running of other commands overlays the slowness of the things I mentioned.

And now I think you want to know the speed of mathematical operations compared to CPBasic: They're equal. QBasic uses the same expression evaluator class as CPBasic. But again, fast running of programs may be able to hide the slowness of that.
I'd also decided to write my own expression parser, but I don't know when it would be. And it depends on the needs of users. :nod:

#6 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 03 February 2011 - 09:16 AM

It depends on what the user wants to do. :nod:
Print is 9 times faster than CPBasic. The reason for this is both faster running of programs, and the fact that QBasic only redraws the screen as needed. Also Locate is 3 times faster.
Assignment in QBasic is slower than real program (takes almost twice the time).
For, While, and Do loops are also slightly slower, but users will not notice this since this slowness only shows up in certain test cases.
However, In real programs, fast running of other commands overlays the slowness of the things I mentioned.

And now I think you want to know the speed of mathematical operations compared to CPBasic: They're equal. QBasic uses the same expression evaluator class as CPBasic. But again, fast running of programs may be able to hide the slowness of that.
I'd also decided to write my own expression parser, but I don't know when it would be. And it depends on the needs of users. :nod:


You should add some kind of optimisation which does not use CPExpressions when they aren't needed. If a variable is local, always defined and not used in something such as an integral or something that requires the CAS, create it as a regular float or double. It would make access times a lot faster, and you would be able to run decent games on it.
But again, that would involve reading through the entire code and figuring out which variables are used for which purposes. Not a piece of cake, but it should be possible.

#7 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 30 January 2013 - 08:05 PM

There was a long time ago when I wrote this add-in. There was good and useful feedback that showed me how should I make it and where it should go, however it never completed... I'm releasing its sources upon request:

www.classpad.ir/download.php?file=QBasic020src.7z

Please read the License.txt and ReadMe.txt inside the archive. Or if you are lazy enough just see below :)
  • License is GPL (ver 2 or any other later version)
  • I don't think the current base of the code is good for improving: some parts of code and classes are good, but many should be rewritten in a more systematic and better way. Read the ReadMe file for more info.
  • There are some data files containing the CP commands and functions up to version 2 which can come in handy later.
I don't know if it is useful (if anyone ever looks at it). :)

#8 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 30 January 2013 - 08:21 PM

I have always liked qbasic and may take a look at the source some time and maybe try porting it to prizm or something...

Thanks for releasing the code. :)

#9 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 07 March 2013 - 12:11 PM

Ok. Thanks; you kinda speak motivative :) If people had told me this sooner, I may have continued programming it.

But as mentioned, the general structure and parser may not be good for expanding the program or porting. Maybe small codes, methods, algorithms, etc can help a little.

#10 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 07 March 2013 - 02:43 PM

Can it run qBASIC programs that were originally made for PC?


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users