Re: Looking for a free basic compiler for DOS
- From: ArarghMail703NOSPAM@xxxxxxxxxxxxxxxxx
- Date: Thu, 22 Mar 2007 04:41:17 -0500
On Wed, 21 Mar 2007 21:16:29 -0500, Happy Trails <nomail@xxxxxxxxxxx>
wrote:
On Wed, 21 Mar 2007 19:10:11 -0500,You probably did. But, then experience beats out a beginner most
ArarghMail703NOSPAM@xxxxxxxxxxxxxxxxx wrote:
Can't be. Compiled basic consistes of a large number of far calls to
the runtime. About the only inline code are operations on integers,
and longs. Most everything else results in a runtime call. Just look
at a /A listing.
Can't be! Can't be?
Way back in the 60's I once bet an IBM 360 assembler programmer that
my COBOL program would run faster than his assembler code. I made up
a simple example with input of sequential records from a disk file and
multiplying numbers together - floating point literals of my choosing.
I knew the COBOL would automatically use a more efficient type of
input than he could be bothered to code, if he knew how, and that
COBOL would use floating point arithmetic by default on the
calculations, which he didn't even know how to code.
Guess who won the bet?
every time. But, I bet that if I were coding the asm, you would have
lost.
Circa version 6, the MSC compiler, (which stands for "C"ryptic, btw),/FPi 80x87 or emulator math pack
did not use 80x87 instructions by default, so all you had to do to
kick it's ass was make sure your comparison example program had some
heavy calculation loops in it and run it on a 486 or better cpu. The
BC for 7.1 had a lot of compiler switchable options, one of which was
to use 80x87 instruction codes if the cpu had one. Very easy to do.
But BC still, AFAICT, generates INT type calls even using that switch.
I don't know if it is even possible to not have the FP emulator loaded
and use any type of FP instruction. I don't use FP instructions very
much, so never took the trouble to figure it out.
Another switch, btw, was to use near calls instead of far calls underProbably:
certain circumstances - can't recall offhand.
/Ot Quick call optimization
But that should only work for calls to the same code segment (module).
And the runtime is NEVER in the same segment as the compiled code.
One thing that was much easier with basic was to rewrite loose codeYup.
and make it more efficient, whereas with C it seem to be the habit of
programmer that once a routine was working they were afraid to tweak
it ahgain and again, and didn't have the instant gratification (and
verification) of running many different tweaks in the ide to see which
worked best.
Basic always did pretty efficient I/O also, whereas with C it wasYup.
again whatever the programmer managed to get working.
So MY Basic applications were always at least as efficient as anyoneAren't we back to experience beating the beginner, again?
else's C, and usually significantly faster.
When I started programming, there was only core memory. SemiconductorLikewise with use of XMS. I once had a program that did an incore
sort of a 50 meg database. Yes, MEG.
Core!! Core?? You're gonna have to explain to the youngsters where
that one came from, hahahahaha.
memory was 8 or 10 years in the future.
Oh, and I have 4 computers sitting around that actually have CORE
memory.
I don't think that I ever have, except as a test.Remember, if you compile from the IDE, the link uses /EXEPACK, and you
can't turn it off, unless you patch a copy of qbx.exe.
Oh - want some real good advice? NEVER compile from the ide. Never!
Learn how to do it from the command line.
And don't even think about trying to keep a library of separatelyWhy? I have something like 250+ routines in my private library. Most
compiled modules up to date unless you have multiple programmers and
have to do it for political reasons.
are ASM, though. The makefile spits out .LIBs & .QLBs for QB 4.5, PDS
7.0, PDS 7.1 (4 versions, real and prot, near & far string), VBDOS
1.0, and a version for use with PDQ, all from the same source set. I
did recently drop QB 4.5 from the list, for two reasons: 1) I don't
use qb 4.5 for anything anymore and 2) 4.5 doesn't support BYVAL,
which I use a lot.
A complete recompile and relink of a system of, say 100 to 200 modulesBut what a headache keeping track. :-)
of varying sizes and complexity took about 1 to 3 minutes.
In the IDE, source modules that were each less than 16k bytes long gotAnd larger than 512 bytes. Which forces me to have an include file
called "Filler.Bas" which is all comments, used to force small subs
into EMS.
loaded into ems, whereas quicklibs always got stuck in low memory, soWell, BCET source runs 230K+ worth of source, and has about 130K+
it was actually easier to run bigger source programs in the ide than
to run systems with many compiled routines, and infinitely easier to
maintain a test & development system.
worth of include files, and still runs in the IDE even with a 37K QLB.
The whole program printed to a text file with all includes is 470.5K.
And this way you could trace code into and out of the subroutines,Most of my subs are small routines to do with 1 far call what basic
instead of disappearing into a black hole each time a call was made.
does with 2 or more. Most of these routines date from the 286/20
period, where far calls were expensive.
One trivial example: I have a routine declared as:
DECLARE FUNCTION AscMid% (aString$, BYVAL Disp&) ' if Disp = 0 use 1
Which does:
x = Asc(Mid$(aString$, Disp&, 1))
And returns a -1 on any error.
You know, I never did any timing on this routine -- might be
interesting. However, I KNOW that my routine is smaller, which was
also a big issue back then.
-- after testing --
Same speed or just a RCH slower, running in the IDE. But still
smaller.
I have always found PWB to be useless. Cute, but useless. However,Was 7.1 ever sold standalone? I got mine as an upgrade, and there
were no manuals, just a readme file.
7.0 manuals and 7.1 upgarde manual - same blue and white covers, about
70 pages. Mostly all that useless PWB/Codeview crud. Which wasn't
really needed with the ide if you knew how to tweak the memory limits.
Codeview I find useful. I wish that there were a standalone version
for PE/COFF exes. Having to use Visual Studio to debug a compiled
basic program (from BCET) is always a bit of a pain.
EMS is offering a complete 7.1 package still in the shrink wrap with'LIB' does that. Comes with PDS.
manuals AND the license registration letter in the original envelope,
as well as several partial kits on various sizes of diskettes. They
want $1595 for the cherry package, which is about 3 times original
price.
A lot of the info from the books is buried in the help system, but
somewhat hidden.
Believe me, it is buried a lot deeper in the manuals, especially on
topics like making up your own .qlb's and .lib's. That used to get a
little tricky when a bunch of subs would be provided already linked
into a library, and not as .obj's, and you only needed a small part of
a large library that blew your available space. I seem to remember a
program that would cut the individual obj's out of an lib file for
you, but you needed to know the obj's name.
Then you could relinkI don't have any trouble linking with libs. Only what is needed is
them with your own stuff efficiently.
pulled in. Just have to put the lib name in the correct place in the
LINK line.
--
ArarghMail703 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.
.
- Follow-Ups:
- Re: Looking for a free basic compiler for DOS
- From: Happy Trails
- Re: Looking for a free basic compiler for DOS
- References:
- Re: Looking for a free basic compiler for DOS
- From: Georg
- Re: Looking for a free basic compiler for DOS
- From: Tom Lake
- Re: Looking for a free basic compiler for DOS
- From: Phred
- Re: Looking for a free basic compiler for DOS
- From: ArarghMail703NOSPAM
- Re: Looking for a free basic compiler for DOS
- From: Georg
- Re: Looking for a free basic compiler for DOS
- From: Eric
- Re: Looking for a free basic compiler for DOS
- From: Georg
- Re: Looking for a free basic compiler for DOS
- From: Happy Trails
- Re: Looking for a free basic compiler for DOS
- From: ArarghMail703NOSPAM
- Re: Looking for a free basic compiler for DOS
- From: Happy Trails
- Re: Looking for a free basic compiler for DOS
- Prev by Date: Re: Beginner's All-Purpose Symbolic Instruction Code - Still?
- Next by Date: Re: Looking for a free basic compiler for DOS
- Previous by thread: Re: Looking for a free basic compiler for DOS
- Next by thread: Re: Looking for a free basic compiler for DOS
- Index(es):
Relevant Pages
|