C vs BASIC (Was: Pow

 BBS: Inland Empire Archive
Date: 04-27-92 (18:56)             Number: 111
From: DAVE CLEARY                  Refer#: 63
  To: DARYL POSNETT                 Recvd: YES 
Subj: C vs BASIC (Was: Pow           Conf: (2) Quik_Bas
In a message of <24 Apr 92 04:24:00>, Daryl Posnett (1:346/10) writes:

 >Anyway, This is a straigtfoward procedure in C.  I attempted to
 >duplicate my C efforts in BASIC w/ASM and ran into a brick wall.

The BASIC runtime is not re-entrant. I don't know if C's
is, but simply trapping int 8 will lock up your machine if
you are currently inside the runtime.

 >Instead, let's discuss THIS problem from a QuickBASIC point of view.
 >I am really interested in the insights of the guys who really know the
 >QB internals.
 >
 >So if Dave Cleary can put away his broadsword long enough for me to grab
 >my universal translator, perhaps we can have some interesting objective
 >QB discussion here.

Actually, this is something I was thinking about. If you compile with /D, the
QB inserts a call to B$LINA after every BASIC statement. I
was thinking about writing a replacement for this routine
that would do the task switch. Therefore, you know it is
safe to switch, because you aren't stealing control away
from the machine. Of course, it isn't as efficient as a
premptive multitasking scheme. My idea was to have
different DGROUPs for each task, with some way of
interprocess communications.

Later           Dave


--- msged 1.99S ZTC
 * Origin: Home of The QBNews (fidonet.org 1:141/777.1)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET