Hallo,
_P Q S Y N T A X_ Vs. 1.4 is ready
Colored syntax makes BASIC language sources better readable.
Colored highlighting of keywords and other terms in the editors (IDE) of
PowerBASIC Vs 3.x
QuickBasic Vs 4.5
QBasic (MS-DOS)
Basic PDS Vs 7.x
Extract from the DOC file:
******************************************************************
PQSYNTAX was derived from the ideas of
PBSYNTAX.BAS (Aug. 1994) by Mike Burns, CIS:71551,1353
PBSYNTAX.BAS was written for PowerBASIC using the PB method "POPUP
..." to compile TSR (Terminate and Stay Resident) programs.
In a first step, this source was corrected and extended (see the
included PQSYNTAX.BAS):
- additional groups of keywords are covered
- PowerBASIC 3.2 specials are covered (pointers)
- QuickBasic / QBasic / PDS are now serviced, too
- optimizations were made for highest performance speed (inline
ASM)
The performance speed of the Timer ISR (Interrupt Service Routine)
has been measured by an external oscilloscope (connected to LPT2,
pin 1). The TTL level of this pin is set Hi when entering the
timer ISR, and set LO when exiting the timer ISR (see "%debug" in
PQSYNTAX.BAS or PULSES in PQSYNTAX.ASM). By this a pulse sequence
is generated, the pulse width (= time to run through the ISR) of
which can precisely be measured by the oscilloscope.
In a second step I then re-wrote the whole program using ASM and C
language, by this further optimizing PQSYNTAX. The TSR root module
is written in pure ASM, the working routines for scanning and
colorizing the screen could be transformed easily (nearly line by
line) from the PowerBASIC SUBs into C FUNCTIONs.
The result of the 2 different .EXE version is shown below:
| PowerBASIC | ASM / C
--------------------------|------------------------|--------------
filelength PQSYNTAX.EXE | 58300 bytes | 15036 bytes
TSR length: PB-IDE | 6384 bytes | 5952 bytes*)
TSR length: QB45-IDE | 6384 bytes | 4080 bytes*)
TSR length: QB(DOS)-IDE | 6384 bytes | 4016 bytes*)
TSR length: PDS7x-IDE | 6384 bytes | 4384 bytes*)
size of swapfile | 134176 bytes | -----
*) here the length of the TSR loaded into RAM varies depending
on the number of keywords contained in the DEF file
The time needed to once scan the editor window is different, it
depends on the contents of the screen. The following typical times
(in milliseconds) have been measured with the IDE of PowerBASIC
(using a 486DX50 in DOS real mode):
number of lines | 25 | 50
--------------------------|------------|-----------
empty screen (Alt/F+New) | 5 | 10
source text (min / max) | 6 ... 20 | 12 ... 40
source text (average) | 12 | 24
******************************************************************
Conclusion:
By this speed optimization, PQSYNTAX can be setup to refresh the
editor colors at least 10 times per second (each 2nd timer tick)!
No problems with multiple pagup/pagedown scrolling: each new
screen is colored FAST ENOUGH!
Of course, a user can set up his personal color set that pleases
his own taste. - And even a different set for each day of week.
All sources (PB / ASM / C) of PQSYNTAX are available free. Thus
this may inspire PowerBASIC Inc. to introduce colored syntax with
PB Vs.4.0 end of this year, too.
Hoping to have done a good job for the joy of many PB programmers
Andras
--- CrossPoint v3.11 R
---------------
* Origin: Fido Point of Disillusion (2:2480/13.34)
|