;----------------------------------------------------- ; ; copyright (C), 1981, 1982 Shaylor O. Walters, Jr ; , 1983 Shay O. Walters ; Parametric Software (tm) ; Para-Soft (tm) ; ; This document and the resulting object code are ; protected under the copyright laws of the ; United States and other countries, and may not ; be reproduced, copied, transmitted, or stored ; in any form without the express written consent ; of Para-Soft and Shay Walters. ; ;------------------------------------------------------ org 0100h jmp start ; ; ; ; ; ; ; ; ;-----------------------********-------------- ; patch area patch area ; ;-----------------------********-------------- ; ; ds 50 ; ; ; ; ; ; copyright.notice: db 'Parasol Version 1.6 -- ' db 'Copyright (C) 1982-1985 Para-Soft' db 13,10,'$' ; ;---------------version 03/31/85-------------------- ; ; ; ; ;------------------------------- ; default system addresses ;------------------------------- boot equ 00h io.byte equ 03h dflt.drive equ 04h entry equ 05h dflt.fcb equ 5ch dflt.2nd.fcb equ 6ch dflt.dma equ 80h ;------------------------------- ; fcb field offsets ;------------------------------- fcb.drive equ 0 fcb.name equ 1 fcb.ext equ 9 fcb.ext.num equ 12 fcb.s1 equ 13 fcb.s2 equ 14 fcb.rec.cnt equ 15 fcb.dsk.map equ 16 fcb.cur.rec equ 32 fcb.rnd.rec equ 33 ;------------------------------- ; extension flags ;------------------------------- fcb.flags equ 36 fcb.status equ 37 fcb.buf.addr equ 38 fcb.buf.ix equ 40 fcb.buf.size equ 42 fcb.rec.addr equ 44 fcb.name.addr equ 46 fcb.file.id equ 48 ;MPM file-id fcb.limit equ 50 ;------------------------------- ; record-mode flags ;------------------------------- ;fcb.flags equ 36 ;fcb.status equ 37 fcb.rec.buf.sctr equ 38 ;sctr # in buff fcb.rec.key equ 40 ;cp/m sector key fcb.rec.size equ 42 ;#bytes in rec ;fcb.rec.addr equ 44 ;fcb.name.addr equ 46 ;fcb.file.id equ 48 fcb.rec.blk.fac equ 50 ;# recs / sctr ; 0 = unblocked fcb.rec.buffer equ 52 ;start of sctr buff ; ; ;---------------- ;---word types--- ;---------------- ; wtp.unreq equ 0 wtp.ident equ 1 wtp.string equ 2 wtp.cnst equ 4 wtp.oprtr equ 8 wtp.delim equ 10h wtp.ptr equ 20h ; ;------------------------------ ;---symbol table entry types--- ;------------------------------ ; stet.end.tbl equ 0 ; stet.BIT equ 1 stet.BYTE equ 2 stet.WORD equ 3 stet.STRING equ 4 stet.FIELD equ 5 stet.BCD equ 6 stet.RECORD equ 7 stet.byte.ptr equ 8 stet.word.ptr equ 9 stet.string.ptr equ 10 stet.bcd.ptr equ 11 stet.spcl.cnst equ 12 stet.spcl.lit.str equ 13 stet.spcl.word.ptr equ 14 stet.spcl.byte.ptr equ 15 stet.spcl.string.ptr equ 16 stet.spcl.bcd.ptr equ 17 stet.label equ 18 stet.SET.cnst equ 19 stet.SET.word equ 20 ; stet.FILE equ 21 stet.level.marker equ 22 ; stet.blk.scope.limit equ 30 ; ; stet.fwd.ref equ 40 stet.deleted equ 80h ; ; ; ;--------------------------------- ;---reserved word table indexes--- ;--------------------------------- ; rwix.not.rsvd equ 0 rwix.end.of.source equ rwix.not.rsvd + 1 rwix.pound equ rwix.end.of.source + 1 rwix.dollar equ rwix.pound + 1 rwix.amper equ rwix.dollar + 1 rwix.lpar equ rwix.amper + 1 rwix.rpar equ rwix.lpar + 1 rwix.star equ rwix.rpar + 1 rwix.plus equ rwix.star + 1 rwix.comma equ rwix.plus + 1 rwix.minus equ rwix.comma + 1 rwix.slash equ rwix.minus + 1 rwix.colon equ rwix.slash + 1 rwix.semicolon equ rwix.colon + 1 rwix.leq equ rwix.semicolon + 1 rwix.lss equ rwix.leq + 1 rwix.neq equ rwix.lss + 1 rwix.eql equ rwix.neq + 1 rwix.geq equ rwix.eql + 1 rwix.gtr equ rwix.geq + 1 rwix.at equ rwix.gtr + 1 rwix.lbrckt equ rwix.at + 1 rwix.rbrckt equ rwix.lbrckt + 1 rwix.ACCEPT equ rwix.rbrckt + 1 rwix.ADDRESS equ rwix.ACCEPT + 1 rwix.ADD equ rwix.ADDRESS + 1 rwix.AND equ rwix.ADD + 1 rwix.ANY equ rwix.AND + 1 rwix.APPEND equ rwix.ANY + 1 rwix.BCDPTR equ rwix.APPEND + 1 rwix.BCD equ rwix.BCDPTR + 1 rwix.BEGIN equ rwix.BCD + 1 rwix.BIT equ rwix.BEGIN + 1 rwix.BLOCKED equ rwix.BIT + 1 rwix.BP equ rwix.BLOCKED + 1 rwix.BYTE equ rwix.BP + 1 rwix.BY equ rwix.BYTE + 1 rwix.BUFFER equ rwix.BY + 1 rwix.CALL equ rwix.BUFFER + 1 rwix.CASE equ rwix.CALL + 1 rwix.CLOSE equ rwix.CASE + 1 rwix.COMMENT equ rwix.CLOSE + 1 rwix.CONVERT equ rwix.COMMENT + 1 rwix.CON equ rwix.CONVERT + 1 rwix.COPY equ rwix.CON + 1 rwix.CSTACK equ rwix.COPY + 1 rwix.DECIMAL equ rwix.CSTACK + 1 rwix.DEC equ rwix.DECIMAL + 1 rwix.DISABLE equ rwix.DEC + 1 rwix.DISK equ rwix.DISABLE + 1 rwix.DISPLAY equ rwix.DISK + 1 rwix.DIVIDE equ rwix.DISPLAY + 1 rwix.DO equ rwix.DIVIDE + 1 rwix.EDIT equ rwix.DO + 1 rwix.ELSE equ rwix.EDIT + 1 rwix.ENABLE equ rwix.ELSE + 1 rwix.ENDREC equ rwix.ENABLE + 1 rwix.ENDREDEF equ rwix.ENDREC + 1 rwix.ENDSWITCH equ rwix.ENDREDEF + 1 rwix.END equ rwix.ENDSWITCH + 1 rwix.EOF equ rwix.END + 1 rwix.ERROR equ rwix.EOF + 1 rwix.EXCHANGE equ rwix.ERROR + 1 rwix.EXECUTE equ rwix.EXCHANGE + 1 rwix.EXITBEGIN equ rwix.EXECUTE + 1 rwix.EXITDO equ rwix.EXITBEGIN + 1 rwix.EXITSWITCH equ rwix.EXITDO + 1 rwix.EXIT equ rwix.EXITSWITCH + 1 rwix.EXTERNAL equ rwix.EXIT + 1 rwix.FALSE equ rwix.EXTERNAL + 1 rwix.FIELD equ rwix.FALSE + 1 rwix.FILE1 equ rwix.FIELD + 1 rwix.FILE2 equ rwix.FILE1 + 1 rwix.FILE equ rwix.FILE2 + 1 rwix.FILL equ rwix.FILE + 1 rwix.FIND equ rwix.FILL + 1 rwix.FI equ rwix.FIND + 1 rwix.FOR equ rwix.FI + 1 rwix.FRESH equ rwix.FOR + 1 rwix.FROM equ rwix.FRESH + 1 rwix.FULL equ rwix.FROM + 1 rwix.GIVING equ rwix.FULL + 1 rwix.GOTO equ rwix.GIVING + 1 rwix.GO equ rwix.GOTO + 1 rwix.HEXADECIMAL equ rwix.GO + 1 rwix.HEX equ rwix.HEXADECIMAL + 1 rwix.HIMEM equ rwix.HEX + 1 rwix.IF equ rwix.HIMEM + 1 rwix.INDEX equ rwix.IF + 1 rwix.INPUT equ rwix.INDEX + 1 rwix.INTERRUPTS equ rwix.INPUT + 1 rwix.IO equ rwix.INTERRUPTS + 1 rwix.JUSTIFY equ rwix.IO + 1 rwix.KEY equ rwix.JUSTIFY + 1 rwix.LABEL equ rwix.KEY + 1 rwix.LEFT equ rwix.LABEL + 1 rwix.LENGTH equ rwix.LEFT + 1 rwix.LEVEL equ rwix.LENGTH + 1 rwix.LIMIT equ rwix.LEVEL + 1 rwix.LOCK equ rwix.LIMIT + 1 rwix.LOWER equ rwix.LOCK + 1 rwix.LST equ rwix.LOWER + 1 rwix.MAP equ rwix.LST + 1 rwix.MATCH equ rwix.MAP + 1 rwix.MAX equ rwix.MATCH + 1 rwix.MCALL equ rwix.MAX + 1 rwix.MIN equ rwix.MCALL + 1 rwix.MOD equ rwix.MIN + 1 rwix.MOVE equ rwix.MOD + 1 rwix.MPM equ rwix.MOVE + 1 rwix.MULTIPLY equ rwix.MPM + 1 rwix.NEXT equ rwix.MULTIPLY + 1 rwix.NONE equ rwix.NEXT + 1 rwix.NOT equ rwix.NONE + 1 rwix.NOWARN equ rwix.NOT + 1 rwix.NO equ rwix.NOWARN + 1 rwix.NSTAR equ rwix.NO + 1 rwix.NULL equ rwix.NSTAR + 1 rwix.NUMBER equ rwix.NULL + 1 rwix.OCTAL equ rwix.NUMBER + 1 rwix.OCT equ rwix.OCTAL + 1 rwix.OD equ rwix.OCT + 1 rwix.OFF equ rwix.OD + 1 rwix.OF equ rwix.OFF + 1 rwix.OI equ rwix.OF + 1 rwix.ON equ rwix.OI + 1 rwix.OPEN equ rwix.ON + 1 rwix.OR equ rwix.OPEN + 1 rwix.OUTPUT equ rwix.OR + 1 rwix.PAGE equ rwix.OUTPUT + 1 rwix.PARTIAL equ rwix.PAGE + 1 rwix.POINTER equ rwix.PARTIAL + 1 rwix.POP equ rwix.POINTER + 1 rwix.PRINT equ rwix.POP + 1 rwix.PRN equ rwix.PRINT + 1 rwix.PROCEDURE equ rwix.PRN + 1 rwix.PUN equ rwix.PROCEDURE + 1 rwix.PUSH equ rwix.PUN + 1 rwix.RANDOM equ rwix.PUSH + 1 rwix.RDR equ rwix.RANDOM + 1 rwix.READ equ rwix.RDR + 1 rwix.REBOOT equ rwix.READ + 1 rwix.RECORD equ rwix.REBOOT + 1 rwix.REDEFINE equ rwix.RECORD + 1 rwix.REMAINDER equ rwix.REDEFINE + 1 rwix.REMOVE equ rwix.REMAINDER + 1 rwix.RENAME equ rwix.REMOVE + 1 rwix.REVERSE equ rwix.RENAME + 1 rwix.RIGHT equ rwix.REVERSE + 1 rwix.SAVE equ rwix.RIGHT + 1 rwix.SCAN equ rwix.SAVE + 1 rwix.SEGMENTED equ rwix.SCAN + 1 rwix.SET equ rwix.SEGMENTED + 1 rwix.SHARED equ rwix.SET + 1 rwix.SIZE equ rwix.SHARED + 1 rwix.SP equ rwix.SIZE + 1 rwix.STACK equ rwix.SP + 1 rwix.STANDALONE equ rwix.STACK + 1 rwix.STANDARD equ rwix.STANDALONE + 1 rwix.STATUS equ rwix.STANDARD + 1 rwix.STRING equ rwix.STATUS + 1 rwix.SUBTRACT equ rwix.STRING + 1 rwix.SWITCH equ rwix.SUBTRACT + 1 rwix.TABLE equ rwix.SWITCH + 1 rwix.TAB equ rwix.TABLE + 1 rwix.TEXT equ rwix.TAB + 1 rwix.THEN equ rwix.TEXT + 1 rwix.TO equ rwix.THEN + 1 rwix.TRACEBACK equ rwix.TO + 1 rwix.TRAILING equ rwix.TRACEBACK + 1 rwix.TRUE equ rwix.TRAILING + 1 rwix.TTY equ rwix.TRUE + 1 rwix.UNLOCK equ rwix.TTY + 1 rwix.UNSTRING equ rwix.UNLOCK + 1 rwix.UNTIL equ rwix.UNSTRING + 1 rwix.UPPER equ rwix.UNTIL + 1 rwix.USING equ rwix.UPPER + 1 rwix.VALUE equ rwix.USING + 1 rwix.WHILE equ rwix.VALUE + 1 rwix.WITH equ rwix.WHILE + 1 rwix.WORD equ rwix.WITH + 1 rwix.WP equ rwix.WORD + 1 rwix.WRITE equ rwix.WP + 1 rwix.XOR equ rwix.WRITE + 1 rwix.Z80 equ rwix.XOR + 1 rwix.table.limit equ rwix.Z80 + 1 ; ; ; reserved.word.table: db 1ah,0, wtp.delim db '#',0, wtp.delim db '$',0, wtp.delim db '&',0, wtp.delim db '(',0, wtp.delim db ')',0, wtp.delim db '*',0, wtp.oprtr db '+',0, wtp.oprtr db ',',0, wtp.delim db '-',0, wtp.oprtr db '/',0, wtp.oprtr db ':',0, wtp.delim db ';',0, wtp.delim db '<=',0, wtp.oprtr db '<',0, wtp.oprtr db '<>',0, wtp.oprtr db '=',0, wtp.oprtr db '>=',0, wtp.oprtr db '>',0, wtp.oprtr db '@',0, wtp.delim db '[',0, wtp.delim db ']',0, wtp.delim db 'accept',0, wtp.ident db 'address',0, wtp.ident db 'add',0, wtp.ident db 'and',0, wtp.oprtr + wtp.ident db 'any',0, wtp.ident db 'append',0, wtp.ident db 'bcdptr',0, wtp.ident db 'bcd',0, wtp.ident db 'begin',0, wtp.ident db 'bit',0, wtp.ident db 'blocked',0, wtp.ident db 'bp',0, wtp.ident db 'byte',0, wtp.ident db 'by',0, wtp.ident db 'buffer',0, wtp.ident db 'call',0, wtp.ident db 'case',0, wtp.ident db 'close',0, wtp.ident db 'comment',0, wtp.ident db 'convert',0, wtp.ident db 'con',0, wtp.ident db 'copy',0, wtp.ident db 'cstack',0, wtp.ident db 'decimal',0, wtp.ident db 'dec',0, wtp.ident db 'disable',0, wtp.ident db 'disk',0, wtp.ident db 'display',0, wtp.ident db 'divide',0, wtp.ident db 'do',0, wtp.ident db 'edit',0, wtp.ident db 'else',0, wtp.ident db 'enable',0, wtp.ident db 'endrec',0, wtp.ident db 'endredef',0, wtp.ident db 'endswitch',0, wtp.ident db 'end',0, wtp.ident db 'eof',0, wtp.ident db 'error',0, wtp.ident db 'exchange',0, wtp.ident db 'execute',0, wtp.ident db 'exitbegin',0, wtp.ident db 'exitdo',0, wtp.ident db 'exitswitch',0, wtp.ident db 'exit',0, wtp.ident db 'external',0, wtp.ident db 'false',0, wtp.ident db 'field',0, wtp.ident db 'file1',0, wtp.ident db 'file2',0, wtp.ident db 'file',0, wtp.ident db 'fill',0, wtp.ident db 'find',0, wtp.ident db 'fi',0, wtp.ident db 'for',0, wtp.ident db 'fresh',0, wtp.ident db 'from',0, wtp.ident db 'full',0, wtp.ident db 'giving',0, wtp.ident db 'goto',0, wtp.ident db 'go',0, wtp.ident db 'hexadecimal',0, wtp.ident db 'hex',0, wtp.ident db 'himem',0, wtp.ident db 'if',0, wtp.ident db 'index',0, wtp.ident db 'input',0, wtp.ident db 'interrupts',0, wtp.ident db 'io',0, wtp.ident db 'justify',0, wtp.ident db 'key',0, wtp.ident db 'label',0, wtp.ident db 'left',0, wtp.ident db 'length',0, wtp.ident db 'level',0, wtp.ident db 'limit',0, wtp.ident db 'lock',0, wtp.ident db 'lower',0, wtp.ident db 'lst',0, wtp.ident db 'map',0, wtp.ident db 'match',0, wtp.ident db 'max',0, wtp.ident + wtp.oprtr db 'mcall',0, wtp.ident db 'min',0, wtp.ident + wtp.oprtr db 'mod',0, wtp.ident + wtp.oprtr db 'move',0, wtp.ident db 'mpm',0, wtp.ident db 'multiply',0, wtp.ident db 'next',0, wtp.ident db 'none',0, wtp.ident db 'not',0, wtp.ident + wtp.oprtr db 'nowarn',0, wtp.ident db 'no',0, wtp.ident db 'nstar',0, wtp.ident db 'null',0, wtp.ident db 'number',0, wtp.ident db 'octal',0, wtp.ident db 'oct',0, wtp.ident db 'od',0, wtp.ident db 'off',0, wtp.ident db 'of',0, wtp.ident db 'oi',0, wtp.ident db 'on',0, wtp.ident db 'open',0, wtp.ident db 'or',0, wtp.ident + wtp.oprtr db 'output',0, wtp.ident db 'page',0, wtp.ident db 'partial',0, wtp.ident db 'pointer',0, wtp.ident db 'pop',0, wtp.ident db 'print',0, wtp.ident db 'prn',0, wtp.ident db 'procedure',0, wtp.ident db 'pun',0, wtp.ident db 'push',0, wtp.ident db 'random',0, wtp.ident db 'rdr',0, wtp.ident db 'read',0, wtp.ident db 'reboot',0, wtp.ident db 'record',0, wtp.ident db 'redefine',0, wtp.ident db 'remainder',0, wtp.ident db 'remove',0, wtp.ident db 'rename',0, wtp.ident db 'reverse',0, wtp.ident db 'right',0, wtp.ident db 'save',0, wtp.ident db 'scan',0, wtp.ident db 'segmented',0, wtp.ident db 'set',0, wtp.ident db 'shared',0, wtp.ident db 'size',0, wtp.ident db 'sp',0, wtp.ident db 'stack',0, wtp.ident db 'standalone',0, wtp.ident db 'standard',0, wtp.ident db 'status',0, wtp.ident db 'string',0, wtp.ident db 'subtract',0, wtp.ident db 'switch',0, wtp.ident db 'table',0, wtp.ident db 'tab',0, wtp.ident db 'text',0, wtp.ident db 'then',0, wtp.ident db 'to',0, wtp.ident db 'traceback',0, wtp.ident db 'trailing',0, wtp.ident db 'true',0, wtp.ident db 'tty',0, wtp.ident db 'unlock',0, wtp.ident db 'unstring',0, wtp.ident db 'until',0, wtp.ident db 'upper',0, wtp.ident db 'using',0, wtp.ident db 'value',0, wtp.ident db 'while',0, wtp.ident db 'with',0, wtp.ident db 'word',0, wtp.ident db 'wp',0, wtp.ident db 'write',0, wtp.ident db 'xor',0, wtp.oprtr + wtp.ident db 'z80',0, wtp.ident ; db 0,0,0 ;end of table ds 10 ;patch area ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;------------------------------------------ ;-----built-in routine types and flags----- ;------------------------------------------ ; ; bir.routine.base equ 80h bir.routine.limit equ 0e0h ; ; ; bir.ACCEPT equ bir.routine.base bir.overlay.load equ bir.ACCEPT + 1 bir.index equ bir.overlay.load + 1 bir.move.field equ bir.index + 1 bir.move.field.2.str equ bir.move.field + 1 bir.cmp.field equ bir.move.field.2.str + 1 bir.cmp.field.2.str equ bir.cmp.field + 1 bir.file1.move equ bir.cmp.field.2.str + 1 bir.rename.file equ bir.file1.move + 1 bir.remove.file equ bir.rename.file + 1 bir.find.file equ bir.remove.file + 1 bir.execute.program equ bir.find.file + 1 bir.BCD.multiply equ bir.execute.program + 1 bir.BCD.divide equ bir.BCD.multiply + 1 bir.BCD.move.2.dbl equ bir.BCD.divide + 1 bir.BCD.add equ bir.BCD.move.2.dbl + 1 bir.BCD.subtract equ bir.BCD.add + 1 bir.BCD.sub.do.it equ bir.BCD.subtract + 1 bir.BCD.add.entry equ bir.BCD.sub.do.it + 1 bir.BCD.sub.entry equ bir.BCD.add.entry + 1 bir.BCD.prep equ bir.BCD.sub.entry + 1 bir.cvt.str.bcd equ bir.BCD.prep + 1 bir.cvt.bcd.str equ bir.cvt.str.bcd + 1 bir.cvt.bcd.bin equ bir.cvt.bcd.str + 1 bir.cvt.bin.bcd equ bir.cvt.bcd.bin + 1 bir.BCD.shift.right equ bir.cvt.bin.bcd + 1 bir.BCD.shift.left equ bir.BCD.shift.right + 1 bir.edit.string equ bir.BCD.shift.left + 1 bir.justify.left equ bir.edit.string + 1 bir.justify.right equ bir.justify.left + 1 bir.move.bcd equ bir.justify.right + 1 bir.BCD.compare equ bir.move.bcd + 1 bir.rec.read equ bir.BCD.compare + 1 bir.rec.write equ bir.rec.read + 1 bir.locate.rec equ bir.rec.write + 1 bir.rec.sctr.read equ bir.locate.rec + 1 bir.rec.sctr.write equ bir.rec.sctr.read + 1 bir.rec.sctr.updt equ bir.rec.sctr.write + 1 bir.cmp.blk equ bir.rec.sctr.updt + 1 bir.DISPLAY equ bir.cmp.blk + 1 bir.DISPLAY.crlf equ bir.DISPLAY + 1 bir.UNSTRING equ bir.DISPLAY.crlf + 1 bir.SCAN equ bir.UNSTRING + 1 bir.SCAN.ANY equ bir.SCAN + 1 bir.SCAN.NO equ bir.SCAN.ANY + 1 bir.SCAN.TRAILING equ bir.SCAN.NO + 1 bir.SIZE equ bir.SCAN.TRAILING + 1 bir.cvt.bin.oct equ bir.SIZE + 1 bir.cvt.dec.bin equ bir.cvt.bin.oct + 1 bir.cvt.hex.bin equ bir.cvt.dec.bin + 1 bir.cvt.oct.bin equ bir.cvt.hex.bin + 1 bir.and.16 equ bir.cvt.oct.bin + 1 bir.or.16 equ bir.and.16 + 1 bir.xor.16 equ bir.or.16 + 1 bir.cvt.bin.dec equ bir.xor.16 + 1 bir.cmp.str equ bir.cvt.bin.dec + 1 bir.mul.16 equ bir.cmp.str + 1 bir.div.16 equ bir.mul.16 + 1 bir.sub.16 equ bir.div.16 + 1 bir.APPEND equ bir.sub.16 + 1 bir.mov.str equ bir.APPEND + 1 bir.exchange equ bir.mov.str + 1 bir.fmt.filnm equ bir.exchange + 1 bir.cvt.upper.case equ bir.fmt.filnm + 1 bir.cvt.lower.case equ bir.cvt.upper.case + 1 bir.dsk.ch.close equ bir.cvt.lower.case + 1 bir.dsk.ch.out.open equ bir.dsk.ch.close + 1 bir.dsk.ch.in.open equ bir.dsk.ch.out.open + 1 bir.dsk.ch.out equ bir.dsk.ch.in.open + 1 bir.dsk.ch.in equ bir.dsk.ch.out + 1 bir.dsk.ch.help equ bir.dsk.ch.in + 1 bir.disk.sctr.io equ bir.dsk.ch.help + 1 bir.open.disk equ bir.disk.sctr.io + 1 bir.close.disk equ bir.open.disk + 1 bir.pmc.16 equ bir.close.disk + 1 bir.neg.hl equ bir.pmc.16 + 1 bir.mov.rev equ bir.neg.hl + 1 bir.set.dflt.dma equ bir.mov.rev + 1 bir.file.not.open equ bir.set.dflt.dma + 1 bir.open.error equ bir.file.not.open + 1 bir.close.error equ bir.open.error + 1 bir.read.error equ bir.close.error + 1 bir.write.error equ bir.read.error + 1 bir.file.error equ bir.write.error + 1 bir.traceback equ bir.file.error + 1 bir.move.str.2.field equ bir.traceback + 1 bir.mov.blk equ bir.move.str.2.field + 1 bir.cvt.bin.hex equ bir.mov.blk + 1 bir.cmp.16 equ bir.cvt.bin.hex + 1 ; ;---dividend MUST be at end of table--- ; bir.dividend equ bir.cmp.16 + 1 bir.actual.limit equ bir.dividend + 1 ; ;---- special forward references which are not ;---- subroutine calls to built-in routines ; bir.hi.mem equ bir.routine.limit bir.EXITBEGIN equ bir.hi.mem + 1 bir.EXITIF equ bir.EXITBEGIN + 1 bir.EXITDO equ bir.EXITIF + 1 bir.EXITSWITCH equ bir.EXITDO + 1 bir.1st.code equ bir.EXITSWITCH + 1 bir.WHILE.TRUE equ bir.1st.code + 1 bir.UNTIL.FALSE equ bir.WHILE.TRUE + 1 bir.THEN equ bir.UNTIL.FALSE + 1 bir.ELSE equ bir.THEN + 1 bir.OPEN.fwd equ bir.ELSE + 1 bir.CLOSE.fwd equ bir.OPEN.fwd + 1 bir.READ.fwd equ bir.CLOSE.fwd + 1 bir.WRITE.fwd equ bir.READ.fwd + 1 bir.SWITCH equ bir.WRITE.fwd + 1 bir.SWITCH.multiple equ bir.SWITCH + 1 bir.SWITCH.range.fail equ bir.SWITCH.multiple + 1 bir.SCAN.TRUE.fwd equ bir.SWITCH.range.fail + 1 bir.SCAN.FALSE.fwd equ bir.SCAN.TRUE.fwd + 1 bir.cpm.stack equ bir.SCAN.FALSE.fwd + 1 bir.END equ bir.cpm.stack + 1 bir.stack.fwd equ bir.END + 1 ; ; ;---any of above not in this table are addresses only-- ; ;---all in this table are built-in routines--- ; built.in.rtn.flags: ; ds bir.routine.limit - bir.routine.base ; db 0ffh ;end marker ; ; ; ; ; ; ; ; ;---------------------------- ; compiler limit equates ;---------------------------- max.edit.len equ 80 bcd.size equ 8 max.word.length equ 80 ; ; ;------------------------------------------------ ;-----temp word / symbol-table-entry storage----- ;------------------------------------------------ ; symbol.table.entry: ste.type: ds 1 ste.address: ds 2 ste.block.level: ds 1 ste.ovl.key ds 2 ste.length: ds 2 ste.name: ds max.word.length ; ste.BIT.posn equ ste.length ste.FILE.device equ ste.length ste.FILE.misc.flag equ ste.length + 1 ; ; ; ; sym.tbl.entry.A: ste.A.type: ds 1 ste.A.address: ds 2 ste.A.block.level: ds 1 ste.A.ovl.key ds 2 ste.A.length: ds 2 ste.A.name: ds max.word.length ; ste.A.BIT.posn equ ste.A.length ste.A.FILE.device equ ste.A.length ste.A.FILE.misc.flag equ ste.A.length + 1 ; ; ; ; sym.tbl.entry.B: ste.B.type: ds 1 ste.B.address: ds 2 ste.B.block.level: ds 1 ste.B.ovl.key ds 2 ste.B.length: ds 2 ste.B.name: ds max.word.length ; ste.B.BIT.posn equ ste.B.length ste.B.FILE.device equ ste.B.length ste.B.FILE.misc.flag equ ste.B.length + 1 ; ; ; ; sym.tbl.entry.C: ste.C.type: ds 1 ste.C.address: ds 2 ste.C.block.level: ds 1 ste.C.ovl.key ds 2 ste.C.length: ds 2 ste.C.name: ds max.word.length ; ste.C.BIT.posn equ ste.C.length ste.C.FILE.device equ ste.C.length ste.C.FILE.misc.flag equ ste.C.length + 1 ; ; ;--------------------------- ; miscellaneous storage ;--------------------------- ; ; ; ; curr.block.level: db 0 ;---the following two bytes must be contiguous--- code.started.this.blk: db 0 data.started.this.blk: db 0 ; ; redef.ctr db 0 ; ; ; curr.BIT.posn: db 80h curr.BIT.build: db 0 ; curr.expr.oprtr: db 0 no.fall.thru.addr: dw 0 fall.thru.true: db 0 no.fall.thru.fwd.flag: db 0 curr.fwd.no.fall.thru: db 0 ; AND.OR.XOR.type: db 0 SCAN.type.flag: db 0 SCAN.pos.flag: db 0 SCAN.addr.flag: db 0 blk.mov.this.stmt: db 0 A.word.type: db 0 B.word.type: db 0 C.word.type: db 0 gvx.word.type: db 0 gvx.cnst.value: dw 0 gvx.word: ds max.word.length last.label ds 30 ; curr.ptr.type: db 0 curr.cvt.type: db 0 first.switch.flag db 0 copy.nest.count: db 0 size.cnt.flag: db 0 ; ; cmd.line.flag: db 0 decimal.work: ds 10 ; ; ;-------------------------- ; src file and buffer ;-------------------------- src.in: ds 36 src.char: ds 1 sctr.size equ 128 src.buf.sctrs equ 1 src.buf.ix: dw sctr.size * src.buf.sctrs src.buffer: ds sctr.size * src.buf.sctrs ; ;-------------------------- ; current source word ;-------------------------- ; word.length: ds 1 word.type: ds 1 rsvd.wd.ix: ds 1 word.cnst.ptr: ds 2 word: ds max.word.length word.save: ds max.word.length cnst.value: ds 4 cnst.value.save: ds 4 minus.word.flag: ds 1 ; curr.src.line.num: dw 1 ; ; bcd.cnst.value.wk: ds bcd.size ; copy.swap.limit: ; ; ;-------------------------------------------------- ; end of memory swapped during COPY processing ;-------------------------------------------------- ; ; ;-------------------------------------- ; temp swap area for COPY operation ;-------------------------------------- ; copy.nest.limit equ 2 ; copy.swap.area: ds (copy.swap.limit - src.in) * copy.nest.limit copy.move.size equ $ - copy.swap.area ; ; ; ; ; ; ;------------------------------ ;-----code file and buffer----- ;------------------------------ ; code.fcb: ds 36 code.buffer: ds 128 start.code.addr: dw 0100h ; code.file.map: ds 512 ; curr.code.addr: dw 0100h curr.read.key: dw 0 ; ; ; ;--------------------------------------- ;-----overlay file & buffer------------- ;--------------------------------------- ; ovl.fcb ds 36 org ovl.fcb + fcb.ext db 'OVL' rorg org ovl.fcb + fcb.rnd.rec dw 0ffffh rorg any.overlay db 0 overlay.in.process db 0 highest.ovl.addr dw 0 curr.ovl.ste.ptr dw 0ffffh ;ptr to seg-proc name curr.ovl.start.key dw 0 ovl.sctr.offset dw 0 ; code.fcb.save ds 36 code.map.save ds 512 ; ; ; ;--------------------------- ; print file and buffer ;--------------------------- print.line.size equ 132 print.line: ds print.line.size print.line.ix: dw print.line error.this.line: db 0 print.word.flag: db 0 print.buff: ds 128 err.ctr: dw 0 statement.counter: dw 0 print.line.ctr: dw 0 curr.print.colm: db 0 curr.print.addr: dw 100h curr.block.match: dw 0 ; print.fcb: db 0 db 'PRINT ' db 'PRN' db 0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,0 db 0,0,0,0 db 26h ;text output open db 0 dw print.buff dw 0 dw 128 dw src.char dw 0 ; ; ; ; ; ; ; ; ; ; ;--------------------------------- ; FILE flag bits ;--------------------------------- ;C = compile-time switch ;R = run-time switch FILE.cr.flag.FILE1 equ 80h ;C & R FILE.cr.flag.FILE2 equ 40h ;C & R FILE.c.flag.TEXT equ 20h ;C FILE.r.flag.no.buff equ 20h ;R FILE.c.flag.RANDOM equ 10h ;C FILE.r.flag.INPUT equ 08h ;C FILE.r.flag.OUTPUT equ 04h ;R FILE.c.flag.rec.mode equ 02h ;C FILE.r.flag.OPEN equ 02h ;R FILE.r.flag.SHARED equ 01h ;R FILE.c.flag.ext.name equ 01h ;C ; ; ;-----FILE statement flags----- ; FILE.flags: FILE.c.flags: db 0 FILE.device: db 0 FILE.r.flags: db 0 file.flags.end: ; curr.fcb: ds fcb.rec.buffer ; ; ; file.new.flag: db 0 curr.file.name: ds max.word.length ; ; ; ;--------------------------- ; compiler option flags ;--------------------------- print.flag: db 0ffh print.console: db 0 print.printer.flag: db 0 print.disk.flag: db 01h string.move.block.flag: db 0 print.code.addr.flag: db 0 print.blk.lvl.flag: db 0 print.blk.match.flag: db 0 print.line.num.flag: db 0 print.tab.mask: db 3 stack.none.flag: db 0 stack.save.flag: db 0 stack.id.flag: db 0 stack.id.size: dw 0 my.stack.size: dw 256 ;default my.top.stk.addr: dw my.stack.top nowarn.flag: db 0 standalone.flag: db 0 auto.execute.flag: db 0 reloc.map.flag: db 0 table.fwd.flag: db 0 print.on.off.flag: db 0 MPM.flag: db 0 Z80.flag: db 0 limit.word.flag: db 0 ; ; ; ;------------------------- ; relocation-work data ;------------------------ curr.rtn.strt.addr: dw 0 curr.rtn.addr: dw 0 strt.map.loc: dw 0 curr.map.loc: dw 0 curr.reloc.bit: db 80h curr.rtn.code.strt.addr: dw 0 curr.rtn.fwd.tbl: dw 0 curr.rtn.desc.addr: dw 0 fwd.tbl.addr: dw 0 ; ; ; ;---------------------------------- ; symbol table working storage ;---------------------------------- start.sym.tbl.addr: dw 0 end.sym.tbl.addr: dw 0 wk.sym.tbl.addr: dw 0 start.wk.sym.tbl.addr: dw 0 tot.sym.space: dw 0 used.sym.space: dw 0 prev.sym.tbl.addr: dw 0 curr.sym.tbl.bottom: dw 0 lowest.sym.tbl.addr: dw 0 ; ; ; ; ; ; ; ; ; ; ; ; MAIN.try.open: lxi d,l.ovly.fcb mvi c,15 call entry inr a ret ; ; ; ;---end of program--- ; MAIN.END.pgm: mvi c,25 call entry sta MAIN.END.curr.disk mvi c,32 mvi e,0ffh ;get user call entry sta MAIN.END.curr.user call MAIN.try.open jnz MAIN.END.ovly.open ;---if not user 0, try user 0 of default drive--- lda MAIN.END.curr.user ora a jz MAIN.END.user.0 mvi c,32 mvi e,0 call entry call MAIN.try.open jnz MAIN.END.ovly.open ;---if not drive A, try drive A--- MAIN.END.user.0: lda MAIN.END.curr.disk ora a jz MAIN.END.ovly.err mvi c,14 mvi e,0 call entry call MAIN.try.open jnz MAIN.END.ovly.open MAIN.END.ovly.err: lxi d,ovly.open.err mvi c,9 call entry jmp boot ovly.open.err: db 'PARASOL OVERLAY FILE NOT FOUND$' MAIN.END.ovly.open: lxi h,ovly.start.loc - 100h dad h mov l,h mvi h,0 shld l.ovly.fcb + fcb.rnd.rec lxi d,ovly.start.loc ovly.lup: lxi h,128 dad d push h mvi c,26 call entry lxi d,l.ovly.fcb mvi c,33 call entry pop d lhld l.ovly.fcb + fcb.rnd.rec inx h shld l.ovly.fcb + fcb.rnd.rec ora a jz ovly.lup ;---set user & disk back--- lda MAIN.END.curr.user mov e,a mvi c,32 call entry lda MAIN.END.curr.disk mov e,a mvi c,14 call entry jmp ovly.start.loc MAIN.END.curr.user: db 0 MAIN.END.curr.disk: db 0 l.ovly.fcb: db 0 ;default drive db 'PARASOL2OVL' db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,0 ; ; ovly.start.loc equ ($+127) and 0ff80h ;sector boundary ; ; ;***********end of PARASOL RESIDENT SECTION************ ;