C vs BASIC (Was: Pow

 BBS: Inland Empire Archive
Date: 04-27-92 (08:57)             Number: 109
From: MATT HART                    Refer#: NONE
  To: DARYL POSNETT                 Recvd: NO  
Subj: C vs BASIC (Was: Pow           Conf: (2) Quik_Bas
 DP>        ' Each task is either a GOSUB subroutine or a SUB program
 DP>        ' whatever can be made to work.

 DP> in ASM:
 DP>        implement an ASM procedure to initialize the scheduler, and a
 DP>        replacement for int 8 or int 1c to time slice the two BASIC
 DP>        tasks defined above.

BASIC has a very handy feature for integrating interrupt driven multi-tasking
using other languages - UEVENT.  In the BASIC program, you
create your GOSUB routine - which could then CALL a SUB if
you wished.  Place
      ON UEVENT GOSUB {label}
in your program.  You can selectively UEVENT ON and UEVENT OFF in BASIC as
well as discontinue all trapping with UEVENT STOP.  In ASM,
implement the scheduler.  Declare a SetUEvent procedure as
external.  Wherever you want the assembly routine to jump
to the BASIC routine, just do a CALL SETUEVENT - link with
the BASIC lib containing SetUEvent.  Is this in QB 4.5?
Anyway, it's in PDS 7.1.  You can change access by changing
the SETUEVENT label dynamically, so multiple routines could
be accessed by the same asm routine.

On another multitasking note: one of my programming
coworkers is writing a priority event driven voice mail and
auto answer / tending system in BASIC with assembly add
ons.  He has written a polling system entirely in BASIC to
handle everything from menus to field input.
---
 * Origin: Midnight Micro!  V.32/REL  (918)451-3306 (1:170/600)
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