Click to See Complete Forum and Search --> : Is there any fast basic?
Sastraxi
Aug 11th, 2000, 11:42 AM
Is there any BASIC-based programming language based on assembler, not C/C++? I've heard that Visual Basic was based on C, so wouldn't it be as fast as C if it was based off of assembler?
Thanks for any replies!
Koralt
Aug 17th, 2000, 12:48 AM
AFAIK, it isn't 'based on c'. The earlier versions of VB all use interpreters and don't use any real machine language in your programs. So they use special codes for each form/object/control and for each method, and they loop through and call the correct functions based on the numbers in there.
More recent versions (5 and 6, I think) allow you to do a natural compile, and turn off error checking. Between those two things, you can *almost* achieve the speed of c/c++.
oetje
Aug 18th, 2000, 04:56 AM
Take a look at http://www.powerbasic.com
kb244
Aug 18th, 2000, 09:37 AM
In the end a true programming language (not based on another language) is compiled into machine language anyways, it's how the language works that affects it's speed, you can use ASM in C++, and C++ can usally get as fast as raw ASM depending on what you produce. same can sometimes be true of VB, depends on what you are doing.
IMO I think VB was based on the Basic language....
hence the name Visual Basic ;)
oetje
Aug 20th, 2000, 04:40 AM
Thanks, I thought it was bad language.:D
Paul282
Sep 11th, 2000, 09:27 PM
didn't qbasic have an option to output the assembly of your basic code? I'm sure I saw that in QB7 (or whatever new version was posted in this section of the forum)
Paul282
Sep 11th, 2000, 09:59 PM
oetje,
I followed your link and looked the powerbasic page, It's looks quite impressive. I'd like to get a 'non-sales' opinion of it, have you used it? is it any good? do you know where more info or a trial version could be seen?
Thanks
oetje
Sep 12th, 2000, 09:18 AM
I never used it...
But I think that they only tell about fast things in Powerbasic on their site. And that there are things that are kinda slow in Powerbasic.
Paul282
Sep 12th, 2000, 09:54 AM
Well,
I just bought a copy so, when I get it (tomorrow) I'll have a play and let you know :)
even if it's only so so, it can generate real 32bit DLLs so it'll make a great add on
oetje
Sep 19th, 2000, 01:28 PM
Have you got it yet?
Paul282
Sep 20th, 2000, 09:48 AM
Yep,
I like it. It's going to take some time to get productive with it as it doesn't have a good IDE so GUI dev is harder.
The approach is like C win programming with lots of API. You can do it that way with all the winmain() stuf or you can use DDT which is a lot easier but you still nead a fairly good understanding of Windows msgs.
With DDT you just use a PBMAIN program and create your dialogs and controls with simple calls to windows classes and assign a function as a callback. You can catch the messages for your control there.
I like a lot of it as it's closer to SDK windows programming than VB and you have access to more of the OS, threads etc.
To Sum up
PROS:
-Stand alone apps
-small exes (simple single dialog app is about 10-20k)
-native win32 dlls are very easy to create. write the functions with export and compile
-more native feel to the programming style (in a C/windows sense
-inline assembly if you like
-pointer vars
-signed & unsigned variables
-good speed
-good API exposure
-low level code better handled (bit shift operators, dlls can use thread reason if you can be bothered or skipped if not etc)
CONS
-No OO code AT ALL (.bas modules are as close as it gets)
-No activex support
-GUI programming take a bit more effort, there are ways of sppeding things up but it would take a bit of prep code, tool creation etc
-DB (ODBC) support may be questionable, yet to investigate but not native, API .bas files
-no custom controls (becuase no OO or OCX)
-not as much reusable code methods
-no Pentium Pro compile, unless you want to add the assembly yourself for the pro chipset
-API knowlegde essential
Conclusion
Worth the money (if you have it spare), takes time to be a useful tool, there's a lot to learn. Compliments VB well (it was origonally written as for VB programmers to create dlls in basic code and does that very well) but it takes a bit longer to write GUIs with and requires more API knowledge. The small tight standalones and native windows access are the highlights but it's not really a toy so don't bother with it unless you are prepared to spend quite a lot of time getting to know it, you won't just pick it up right away unless you came to VB from ANSI C Windows pregramming.
I think that about covers it
You can do anything with it but some things take a lot of effort (processing the messages for a treeview or listview fill me with fear)... but a 10k app with a simple gui yet complex functionality...
Worth having VB and Powerbasic in my view. There's a lot of talk about OO in the future too. I look through their forum (same software as this one) and the windows knowledge is much higher, their "Beginners" are VB or C experts
oetje
Sep 20th, 2000, 01:30 PM
What did it cost?
Paul282
Sep 20th, 2000, 08:47 PM
US$180 ish
I bought PowerGen too for $40 but it was a mistake, it's for GUI creation but it's not compatable with DDT code, only the SDK style of code... I wished the web page had been more clear on that.
The documentionation could do with some more examples, I asked them if the hard copy docs are any better than the help files and they said "no". I'd like a book on it but there doesn't seem to be one.
Paul282
Sep 24th, 2000, 03:34 AM
Visual Studio costs $964.99 for pro and $1,412.99 for enterprise version.
Borland C++ Builder costs about $400 for pro version and over 2k for enterpise!
Does your Mummy by your compilers for you and shelter you from the price? or are you a software pirate? bit hypocritical for a programmer.
...and if the company pays, well who cares about the price?
oetje
Sep 24th, 2000, 03:58 AM
The company...
Paul282
Sep 25th, 2000, 08:55 AM
Well,
I can't say for sure whether it's for you or not. I'm glad I bought it, it doesn't replace VB but there's some things VB is poor at. (Pointers, Dealing with some API functions, low level code, inline assembly and SMALL EXE's
To find out more, go to the forum, there's a link from their web page and you can see what it's like from their converstions and posted code (It's like this place but not as crowded :D)
anything else you want to know?
jian2587
Mar 24th, 2002, 11:00 AM
yes,yes, a fast basic
I'm coding one now...converts basic codes to assembly
better than any existing bas2asm...:)
uses binary tree for the complicated bracketisize maths formula
a=((n/n)*a and b)/(w+((k/i)*r))))
You can use it to write OS,system apps...
Not fooling you, I am really coding it now, I'll releases it for
free(fee?)
kidding, it's free
daveyboy
Mar 29th, 2002, 06:23 PM
:)
jian2587
Apr 2nd, 2002, 07:53 AM
:) ;) :p :D :cool:
:( Sorry to disappoint u guyz...
I am just at the variable stage only.
To maintain compatiblity and make programming easier...
I've changed some of its syntax.
Example of declaring variable
In QB u do this:
DIM ABC AS INTEGER
In my QB do this:
INTEGER ABC = 123
Or more advance:
INTEGER ABC AT 0040:0000
This make the variable points to segment 40 and offset 0
It also support arrays.
INTEGER ABC(45) = 123
For strings, they're like C, terminated with a null string.
CHAR ABC = "Hello, world.",13,10,0
The numbers behind are ASCII codes.
Well, That's my basic compiler.
Anyone agreed with the syntax?
Anyway it'll take me sometime but I think it'll take me approx 1 month.
defanual
Apr 3rd, 2002, 12:21 PM
Check out DarkBASIC, it uses the same language as Basic, but allows easy access to modern commands, such as 3D, Sound and sprites, and it's quick and quite cheap!
www.darkbasic.com (http://www.darkbasic.com) ;)
jian2587
Apr 4th, 2002, 09:11 PM
Yes, DarkBasic is really good. I've use it before.
BTW, my own BASIC is good, too!
Now, I've complete the variable conversion stage.
Now, I am at maths operation stage.
Later on, I'll be at the assembly function conversion stage.
Which means, after these stages, it'll be ready to distribute
for free.
BTW, this BASIC is only for those who knows asm a bit.
Because it could be used to create bootstrap, OS, kernel, system
stuffs.
Well, I wanna know u guyz' response towards my BASIC.
:) ;) :p :D :cool:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.