Re: Looking for a free basic compiler for DOS



On Wed, 21 Mar 2007 21:16:29 -0500, Happy Trails <nomail@xxxxxxxxxxx>
wrote:

On Wed, 21 Mar 2007 19:10:11 -0500,
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?
You probably did. But, then experience beats out a beginner most
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),
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.
/FPi 80x87 or emulator math pack
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 under
certain circumstances - can't recall offhand.
Probably:
/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 code
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.
Yup.

Basic always did pretty efficient I/O also, whereas with C it was
again whatever the programmer managed to get working.
Yup.

So MY Basic applications were always at least as efficient as anyone
else's C, and usually significantly faster.
Aren't we back to experience beating the beginner, again?

Likewise 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.
When I started programming, there was only core memory. Semiconductor
memory was 8 or 10 years in the future.

Oh, and I have 4 computers sitting around that actually have CORE
memory.

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.
I don't think that I ever have, except as a test.

And don't even think about trying to keep a library of separately
compiled modules up to date unless you have multiple programmers and
have to do it for political reasons.
Why? I have something like 250+ routines in my private library. Most
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 modules
of varying sizes and complexity took about 1 to 3 minutes.
But what a headache keeping track. :-)

In the IDE, source modules that were each less than 16k bytes long got
And 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, so
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.
Well, BCET source runs 230K+ worth of source, and has about 130K+
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,
instead of disappearing into a black hole each time a call was made.
Most of my subs are small routines to do with 1 far call what basic
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.

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.
I have always found PWB to be useless. Cute, but useless. However,
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
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.
'LIB' does that. Comes with PDS.

Then you could relink
them with your own stuff efficiently.
I don't have any trouble linking with libs. Only what is needed is
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.
.



Relevant Pages

  • Re: Looking for a free basic compiler for DOS
    ... Circa version 6, the MSC compiler,, ... programmer that once a routine was working they were afraid to tweak ... NEVER compile from the ide. ... were no manuals, just a readme file. ...
    (comp.lang.basic.misc)
  • DLL Question
    ... I'm using VS.NET 2005 and VB.NET, i have a large project, the IDE keeps ... giving me errors regarding the vb compiler all the time, ... How can i call a routine in the main program from inside the code in the DLL ...
    (microsoft.public.dotnet.languages.vb)
  • Re: SAMBA for VMS (The saga continues!)
    ... > callee (substitute function) code seems small to me. ... determine that the OS routine is now available. ... >>instructions and also disabling the compiler optimizer that you can rely ... they upgrade VMS and then try to install an existing package. ...
    (comp.os.vms)
  • Re: HPGCC Questions ladies and gentlemen!!!
    ... free compiler to learn C today I would choose MS Visual C++ Express ... ANSI C has been deprecated but it's still there and the IDE ... Create the program with your favourite text editor, call it, say, hello.c ... Project management is nothing exclusive to IDE's -- there are many ...
    (comp.sys.hp48)
  • Generic Maze Program Example 1
    ... This is the DOS DPMI version of the compiler in Rick van Norman's ... The original code for this was done by Larry Myers, ... routine that Larry used. ... press the #5 key on the numeric keypad. ...
    (comp.lang.forth)