Sciweavers


Book

Let's Build a Scripting Engine-Compiler - Blunt Axe Basic Project

15 years 8 months ago
Let's Build a Scripting Engine-Compiler - Blunt Axe Basic Project
"Bxbasic is presented as a programming tutorial, to develop and construct a Console Mode Scripting Engine and Byte Code Compiler. The Bxbasic dialect, included here, is a subset of the GW-Basic and QBasic programming languages. Well, this whole thing started a few years back, when a number of programmers and I, that frequented the Rapid-Q developer’s group site, decided that we just didn't like what was going on out there in the realm of Rapid-Q and Basic programming in general. So, we set out to form our own programmer’s group, that being the QDepartment group."
S. Arbayo
Added 21 Apr 2009
Updated 01 Oct 2010
Authors S. Arbayo
Welcome to Bxbasic
What is Bxbasic ?.
How did Bxbasic get started ?
CHAPTER - 1
INTRODUCTION
The HACK
Native Code Compiler:
Scripting Engine-Compiler:
BXBASIC
GETTING STARTED
THE MAIN PROGRAM
ERROR HANDLER.
LOADING THE PROGRAM - 1
LOADING THE PROGRAM - 2
PROGRAM PARSER
TOKEN PARSER
EXPAND VOCABULARY.
PROGRAM BRANCHING.
CONCLUSION
 
CHAPTER - 2
INTRODUCTION
MODIFYING BXBASIC.
VARIABLES
ASSIGNMENTS.
PRINTING VARIABLES
ERASE VARIABLES.
VARIABLES AT WORK.
VARIABLES PART II.
MODULES
CONCLUSION
 
CHAPTER - 3
INTRODUCTION
COMPILERS
THE BYTE-CODE
THE MERGE.
THE COMPILER
BXCOMP.EXE
THE ENGINE
TEST FIRE
BACK TO BXBASICS
EXPRESSION PARSER.
PRECEDENCE
FLOW CHART
RECURSION.
VARIABLES REVISITED.
CONCLUSION
 
CHAPTER - 4
INTRODUCTION
NEW LOOK-N-FEEL.
SOURCE INPUT
OTHER CHANGES.
COMPILER
THE ENGINE
FLOATING POINT
CONCLUSION
 
CHAPTER - 5
INTRODUCTION
ENGINE UPDATE
LONG INTEGER
SINGLE PRECISION
OPTIMIZATION
PRINTING NUMBERS
ENGINE-COMPILER.
CONCLUSION
 
CHAPTER - 6
INTRODUCTION
CHARACTER STRINGS
STRING VARIABLES
PRINT STRING VARIABLES
OPTIMIZING
PRINT STATEMENTS
CLEARING VARIABLES
ENGINE UPDATE
CONCLUSION
 
CHAPTER - 7
INTRODUCTION
GOSUB-RETURN
FOR-NEXT
LOOPS.C :
DO FOR( ) :
GET FROM( ) :
GET TO( ) :.
GET STEP( ) :.
GET AVALUE( ) :
POWER & MODULUS
COMPILER UPDATE.
ENGINE UPDATE
CONCLUSION
 
CHAPTER - 8
INTRODUCTION
IF-THEN-ELSE:
MULTIPLE STATEMENTS:
ELSEIF:.
ENDIF:
EXPRESSIONS:
RECURSION:
IF PARSER:
ENGINE:.
CONCLUSION
 
CHAPTER - 9
INTRODUCTION
STRING ASSIGNMENTS:
STRING FUNCTIONS:
TOKENS:.
STRINGS:
CONCATENATION:
CODING IT:
ENGINE UPDATE:
CONCLUSION
 
CHAPTER - 10
INTRODUCTION
INKEY$:
INPUT:
PRINTING FUNCTIONS:.
PRINT EXPRESSIONS:
INPUT$:.
LINE INPUT:.
MATH FUNCTIONS:.
PRINT MATH FUNCTIONS:
CONCLUSION
 
CHAPTER - 11
INTRODUCTION
ENGINE UPDATE:
DISK FILE I/O:
FILE OPEN CODE:
READING FILE DATA:
SEQUENTIAL INPUT CODE:
ENGINE UPDATE II:
END OF FILE:
FILE OUTPUT:
LINE INPUT:.
PRINT TO FILE:
ENGINE UPDATE III:
CONCLUSION
 
CHAPTER – 11
INTRODUCTION
Prototyp.h:
Utility.c:
Fileio.c:
Getinput.c:
Ifendif.c:
Input.c:
Variable.c:
String.c:
Loops.c:
Bxcomp.c:
 
CHAPTER - 12
INTRODUCTION
THE ASSEMBLER:
BXBASM:.
ASSEMBLY ROUTINES:
PROCEDURES:.
UTILITIES:
RE-ORGANIZE:
BEEP:.
.COM":
PRINT:
REVIEW:
MULTIPLE STRINGS:
CONCLUSION
 
CHAPTER - 13
INTRODUCTION
GOTO-GOSUB-RETURN:
LOCATE:
VARIABLE ASSIGNMENTS:
UTILS-INPUT:
DYNAMIC STRINGS:
D86:
CONCLUSION
 
CHAPTER - 14
INTRODUCTION
NULL, VAR-to-VAR:.
CONCATENATE:
INTEGERS:
CONCLUSION
 
CHAPTER - 15
INTRODUCTION
COMPILING EXPRESSIONS:
RECURSIVE DESCENT PARSER:.
NEGATIVE INTEGERS:
FLOATING POINT NUMBERS:.
THE x87 FPU:
THE PARSER:.
CODING THE x87:
THE CODE:
CONCLUSION
 
CHAPTER - 16
INTRODUCTION
DISPLAYING NUMBERS:.
WHAT IS A FLOATING POINT NUMBER?:
23 BIT MANTISSA:
FRACTIONAL MANTISSA:
DISPLAYING REAL NUMBERS:
WHAT'S YOUR SIGN?.
INTEGERS & FRACTIONS:
CONVERSION ROUTINES:
CONCLUSION
Acknowledgements 
Comments (0)