home *** CD-ROM | disk | FTP | other *** search
- STAGE2 IS:
-
- STAGE2 is a versatile macro processor developed by William
- M. Waite. Operating on a generalized pattern recognition principle,
- it can be used for language translation, textual data filtering,
- limited printer output formatting, batch file editing and other text
- processing applications.
-
- FEATURES:
-
- Pattern matching
- Symbol table (storage and retrieval under user control)
- Symbol generator
- Integer arithmetic
- Arithmetic expression evaluator
- Scan controlled iteration (search for specific characters)
- Count controlled iteration
- Conditional and unconditional branching (skips)
- I/O channel control
- Limited output formatting
- Recursion
- Error traceback showing all macro calls
-
- STRONG POINTS:
-
- Highly transportable
-
- Some applications are an order of magnitude simpler to implement
- with STAGE2 than with conventional algorithmic languages.
-
- WEAK POINTS:
-
- A bit slow
- Uses lots of memory for large applications (language translation)
- Macro code is very cryptic in appearance
-
- REFERENCES:
-
- STAGE2 is in the public domain and is documented by the author
- in the book:
- Implementing Software for Non-numeric Applications
- by W. M. Waite
- 1973 Prentice Hall
-
- Chapter 9 and appendix A include STAGE2 user information, source
- listings and implementation directions.
-
- STAGE2 is also documented by the author in:
- "Communications of the ACM"
- Volume 13 / Number 7
- July 1970
- Pages 415-421
-
- STAGE2 for CP/M:
-
- This 8080 implementation was accomplished by:
- Dick Curtiss
- 843 NW 54th
- Seattle, Washington 98107
- (206) 784-8018
- and is in the public domain.
-
- DEVIATIONS FROM THE VERSION DISTRIBUTED BY WAITE:
-
- Variable length lines for input and output (132 char max)
- Input lines
- Carriage return terminates
- Line feeds are ignored
- Nulls are ignored
- Deletes are ignored
-
- Output lines
- Carriage return and line feed on every line
-
- Channel 5 implemented for console input and output
-
- IMPLEMENTATION LIMITATIONS:
-
- STAGE2 is modeled on an abstract machine called the FLUB machine. FLUB
- stands for First Language Under Bootstrap. The FLUB machine word is
- made up of three fields:
- Pointer field 16 bits in this CP/M implementation
- Value field 8 bits
- Flag field 8 bits (only two used)
-
- Since the value field is sometimes used to hold string length, strings
- are limited to 255 characters maximum. Under some circumstances the
- value field is considered to be signed so that strings longer than
- 127 characters may cause strange results, but NOT a crash. STAGE2
- seems to be extremely well protected against crashes.
-
- Since the pointer field is used for arithmetic operations, values are
- limited to the range -32767 to 32767. -32768 causes trouble.
-
- Each character stored by STAGE2 takes 1 FLUB word or 4 bytes in this
- implementation.
-
- CP/M VERSION AVAILABILITY:
- CP/M Users' Group
- 1651 Third Avenue
- New York, NY 10028
-
- DISCLAIMER:
-
- )()!&(%$#"#"%!!$(%!##!(!$!!$=(00(!#=!! so there!
- Use it at your own risk.
-
- MORE INFORMATION:
-
- HELP.DOC For the STAGE2 novice - start here
-
- USE.DOC STAGE2 I/O summary and command line specification
-
- INTRO.DOC Introduction to the STAGE2 processor
-
- IMPL.DOC STAGE2 implementation notes
-
- EXAMPLE FILES:
-
- ALX.S2M Assembly Language eXtension translator macros
- ALX-.DOC Notes on ALX.MAC
-
- ALXTEST.ALX Test case for the ALX macros
- TERM.ALX Sample program (incomplete)
- VDB.ALX TDL video display driver for H19 emulation
- CIO.ALX CP/M console I/O with PMMI modem in "parallel"
-
- MEMORY.INP Macros and source for memory demonstration
-
- INTERACT.S2M Macros to demonstrate interactive use of STAGE2
-
- DEMO.S2M Macros for interactive exercise of most conversions
- and a few processor functions. This is to be used
- while reading the INTRO.DOC file.
-
- IMPLEMENTATION FILES:
-
- IOOP.SRC Initialization and input/output package
-
- DISKIO2.SRC General CP/M disk input/output package
- DISKIO2-.DOC Documentation for above
-
- IOOP$.SUB Submit file for creating IOOP.HEX
-
- FLT1.FLB FLUB translation test program 1
- FLD1.DAT Test data for FLT1
-
- FLT2.FLB FLUB translation test program 2
- FLD2.DAT Test data for FLT2
-
- STG2.FLB Source program for STAGE2
- ST2T.DAT Test data for STAGE2
-
- FLUB8080.S2M STAGE2 macros for translating FLUB into 8080 code
-
- STG2SUP.ASM Support routines for the FLUB machine
-
- STG2MATH.ASM 16 bit math routines for the FLUB machine
-
- FLUB$.SUB Submit file for assembling FLT1, FLT2 or STG2
-
-