; ; ZCPR3 Z3TCAP (MYTERM.Z3T) file to source code (MYTERM.Z80) translator ; Program Name: TCSRC.Z80 ; Author: Terry Hazen ; Version: 1.0 ; Date: 12 Jan 90 ; Takes specified Z3TCAP (MYTERM.Z3T) file and creates commented ; source code (MYTERM.Z80) file for editing or customizing. VERS EQU 11 ; 26 Jan 90 jth ; Rewritten to do translation and loading in loops. Fixed missing ; putud in help requests. Added outfile specification, graphics ; support per VLIB4C. Unless otherwise specified, the default ; outfile (INFILE.Z80) is now placed in the default directory. ; ; Basic Equates ; FCB EQU 5CH FCB1 EQU 6CH TBUFF EQU 80H CTRLC EQU 'C'-'@' ; ; ASCII Character Equates ; NULL EQU 0 ; Null BEL EQU 7 ; Bell BS EQU 8 ; Backspace TAB EQU 9 ; Tab LF EQU 10 ; Line feed CR EQU 13 ; Carriage return EOF EQU 1AH ; EOF SPACE EQU 32 ; Space ESC EQU 27 ; Escape ; ; Z3LIB and SYSLIB References ; EXT CODEND,PFN2,PUTUD,GETUD,RETUD,Z3LOG EXT MAFDC,MA2HC,PRINT,GFA,FILLB,COUT EXT F$OPEN,F$MAKE,F$READ,F$WRITE EXT F$CLOSE,F$EXIST,F$DELETE ; ; Program Start ; JP START DB 'Z3ENV' ; This is a ZCPR3 Utility DB 1 ; External Environment Descriptor Z3EADR: DW 0 ; START: LD (STACK),SP ; Save CCP stack pointer LD SP,STACK ; Local stack CALL PUTUD ; Save current du LD HL,EXIT ; Save exit routine address PUSH HL ; On the new stack ; ; Start of Program -- Print Sign-on ; CALL PRINT DB 'TCSRC vers ' DB (VERS/10)+'0','.',(VERS MOD 10)+'0',CR,LF DB 'Creates a commented source code (.Z80) file from ' DB 'a Z3TCAP (.Z3T) file.',CR,LF DB 0 ; ; Check for Entry in FCB ; LD A,(FCB+1) ; Get first character CP '/' JR Z,HELP ; Help request CP ' ' ; Help request if blank name JP NZ,INIT ; Else continue ; ; Print Help Info ; HELP: CALL PRINT DB ' Syntax:',CR,LF DB TAB,'TCSRC [dir:]infile[.Z3T] [[dir:]outfile[.z80]]',CR,LF DB TAB,TAB,'Creates commented source code file.',CR,LF DB TAB,TAB,'Default outfile is INFILE.Z80.',CR,LF DB 0 RET ; ; Initialize Data Area ; INIT: XOR A LD HL,DATA LD B,DATALEN CALL FILLB ; ; Set Default Infile File Type if None ; LD DE,FCB+9 ; Point to file type LD A,(DE) ; Get first character CP ' ' ; None if space JR NZ,LOAD1 ; LD HL,INTYP ; Point to default file type LD BC,3 ; File type length LDIR ; Otherwise set default filetype ; ; Load Outfile File Name to OUTFCB ; LOAD1: LD HL,FCB1 ; Point to second FCB LD DE,OUTFCB ; Point to outfile FCB LD BC,14 ; Move drive thru user number LDIR ; LD DE,OUTFCB+1 ; Point to outfile filename LD A,(DE) ; Do we have a name? CP ' ' JR NZ,LOAD2 ; Yes ; ; No Outfile Filename Specified, Use Infile Filename ; LD HL,FCB+1 ; Point to infile filename LD BC,8 ; Copy it to outfile filename LDIR ; Move filename ; ; Set Default Outfile File Type if None ; LOAD2: LD DE,OUTFCB+9 ; Point to file type LD A,(DE) ; Get first character CP ' ' ; None if space JR NZ,LOAD3 ; LD HL,OUTTYP ; Point to default file type LD BC,3 ; Copy default file type LDIR ; ; Look for Z3T File ; LOAD3: LD DE,FCB ; Point to FCB CALL Z3LOG ; Log into DU CALL F$EXIST ; Look for file JR NZ,INREAD ; File found ; ; Z3T File Not Found ; FNFERR: CALL PRINT DB CR,LF,'File ',0 LD DE,FCB+1 ; Print file name CALL PFN2 CALL PRINT DB ' Not Found - Aborting',CR,LF,0 RET ; ; Read Z3T File ; INREAD: CALL F$OPEN ; Open file JR NZ,FNFERR CALL F$READ ; Read file into TBUFF JR Z,MAIN ; Read without error CALL F$CLOSE ; Close file ; ; Error in Reading File ; RERR: POP AF ; Clear stack CALL PRINT DB CR,LF,'File Read Error',CR,LF,0 RET ; ; Now Make Source Code File ; MAIN: CALL CODEND ; Point to start of source file buffer LD (OUTFILE),HL ; Save pointer ; ; Move Terminal Name ; LD HL,TBUFF ; HL=Z3T pointer LD DE,Z3TERM ; Point to TERMNAME in source code file LD BC,14 ; Length of name LDIR ; Move it ; ; Load Terminal Configuration Bytes. ; LD DE,B14 ; Point to B14 in text CALL LDBIN ; Load it in ASCII binary form LD DE,B15 ; Point to B15 in text CALL LDBIN ; Load it in ASCII binary form PUSH HL ; Save Z3T pointer on stack ; ; Translate Terminal Control Strings into ASCII and Load Them ; To File Buffer. ; LD HL,FILESTART ; HL=text pointer LD DE,(OUTFILE) ; DE=file buffer pointer CALL LOAD ; Load text to buffer ; ; Move Outfile Filename ; LD HL,OUTFCB+1 ; Point to filename LD B,8 ; Eight characters max CALL FNLOOP ; Move filename LD A,'.' ; Separator LD (DE),A ; Move it INC DE ; Bump pointer LD HL,OUTFCB+9 ; Point to filetype LD B,3 ; Three characters max CALL FNLOOP ; Move filetype ; LD HL,TNAME ; HL=text pointer CALL LOAD ; Load it ; ; Load Arrow Key Characters ; LD B,4 ; 4 arrow keys CALL CLOAD ; ; Load Delays ; LD B,3 ; 3 delays CALL DLOAD ; ; Load Terminal Control Strings ; LD B,14 ; 14 strings CALL TCLOAD ; ; Load Graphics Delay ; LD B,1 CALL DLOAD ; ; Load Terminal Control Strings ; LD B,4 ; 4 strings CALL TCLOAD ; ; Load Graphics Characters ; LD B,13 ; 13 characters CALL CLOAD ; ; Pad End of File With EOF's ; LD A,EOF ; EOF character LD B,128 ; At least a record's worth EX DE,HL ; HL=destination pointer CALL FILLB ; POP HL ; Restore stack pointer ; ; Create Target File ; MAKE0: LD DE,OUTFCB ; Point to FCB CALL Z3LOG CALL RETUD ; Get du in BC LD (DU),BC ; Save it CALL F$EXIST ; Test of presence of file JR Z,MAKE2 ; Create file ; CALL GFA ; Get file attributes AND 1 ; R/O? JR Z,MAKE1 ; CALL PRINT DB CR,LF,'Existing File ',0 CALL PDU ; Display du LD DE,OUTFCB+1 CALL PFN2 ; Display filename CALL PRINT DB ' is Read/Only',CR,LF,0 RET ; MAKE1: CALL F$DELETE ; Delete file ; MAKE2: CALL F$MAKE ; Create file CP 0FFH ; Error JR NZ,WRITEFILE ; CALL PRINT DB CR,LF,'File Create Error',CR,LF,0 RET ; ; Write Block to File ; WRITEFILE: LD HL,(OUTFILE) ; Point to file buffer ; WRITEF: LD DE,TBUFF ; Copy into buffer LD BC,128 ; 128 bytes LDIR LD DE,OUTFCB ; Point to FCB CALL F$WRITE ; Write record JR NZ,WERR ; PUSH HL ; Save file pointer LD HL,TBUFF ; Check TBUFF for EOF marker LD BC,128 LD A,1AH ; EOF marker CPIR POP HL ; Restore file pointer JR NZ,WRITEF ; Loop till EOF ; CALL F$CLOSE ; Close file CALL PRINT DB CR,LF,'File ',0 CALL PDU ; Display du LD DE,OUTFCB+1 CALL PFN2 ; Display filename CALL PRINT DB ' Created',CR,LF,0 RET ; ; Can't Write File ; WERR: CALL PRINT DB CR,LF,'File Write Error',CR,LF,0 RET ; ; Main Exit Point ; EXIT: CALL GETUD ; Return to original DU LD SP,(STACK) ; Restore CCP stack RET ; And return to system ;------------------------------- ; ; Load Terminal Configuration Byte As ASCII Binary Bits ; LDBIN: LD B,8 ; Do whole byte LD A,(HL) ; Get byte INC HL ; Point to next ; LDBLOOP:RLC A ; Look at next highest bit PUSH AF AND 1 ; Just next bit ADD '0' ; Make ASCII LD (DE),A ; Load it INC DE ; Bump destination pointer POP AF DJNZ LDBLOOP RET ;------------------------------- ; ; Load Terminal Control String ; Entry: HL to source, DE points to destination ; LDSTR: LD C,0 ; Initialize comment counter LD A,(HL) ; Get character OR A ; String present? JR NZ,QFRST ; Yes ; INC HL ; No, bump pointer and quit RET ; QFRST: XOR A ; Reset quote flag LD (QF),A ; LSLOOP: LD A,(HL) ; Get character INC HL ; Bump source pointer OR A ; End of string? JR NZ,LDS0 ; Not yet ; LD A,(QF) ; Check quote flag OR A JP NZ,QCOMMA ; Add quote, comma and quit RET ; Not in quotes ; LDS0: CP SPACE ; Control character? JR C,LDS1 ; Yes ; BIT 7,A ; 80H or greater? JR Z,LDSD0 ; No PUSH AF ; Save character LD A,(QF) OR A CALL NZ,QCOMMA ; Add quote and comma ; POP AF CALL MA2HC LD A,'H' LD (DE),A INC DE ; Bump destination pointer INC C ; Increment counter CALL COMMA JR QFRST ; Do next ; LDSD0: PUSH AF ; Save character LD A,(QF) ; Check quote flag OR A JR NZ,LDSD1 ; In quotes already ; CALL QUOTE ; Add quote LD A,0FFH ; And set flag LD (QF),A ; LDSD1: POP AF ; Restore character LD (DE),A ; Displayable, so load it INC DE ; Bump destination pointer INC C ; Increment counter JR LSLOOP ; And do next ; ; Load Escape String ; LDS1: CP ESC ; Escape? JR NZ,LDS2 ; No LD A,(QF) ; Check quote flag OR A CALL NZ,QCOMMA ; Add end quote and comma ; PUSH HL ; Save source pointer PUSH BC LD HL,ESCSTR ; Load escape string LD BC,ESCLEN LDIR POP BC POP HL ; LD A,ESCLEN ; Account for string length ADD C LD C,A JR QFRST ; Reset quote flag and do next ; ; Load Control Character ; LDS2: PUSH AF ; Save character LD A,(QF) OR A CALL NZ,QCOMMA ; In quotes, end with quote and comma ; POP AF CALL LDCC ; Load control character CALL COMMA JR QFRST ; Reset quote flag and do next ;------------------------------- ; ; Load Single Character, With Control (-40H) or Hex (+80H) Notation ; If Required. ; Entry: DE points to destination, HL to source ; LDCHR: LD C,0 ; Initialize comment counter LD A,(HL) ; Get character INC HL ; Point to next OR A ; Character present? JR NZ,LDC0 ; Yes ; ZERO: LD A,'0' ; Load an ASCII zero LD (DE),A INC DE ; Bump destination pointer INC C ; Increment counter RET ; LDC0: CP SPACE ; Control character? JR C,LDCC ; Yes, load it ; PUSH AF ; Save character AND 7FH ; Filter possible high bit CALL QUOTECQ ; Load quoted character POP AF ; Get character back BIT 7,A ; 80H or greater? RET Z ; Quit if not ; PUSH HL PUSH BC LD HL,HISTR ; Point to high character string LD BC,HILEN ; Length of high character string LDIR POP BC POP HL ; LD A,HILEN ; Account for string length ADD C LD C,A RET ; LDCC: ADD '@' ; Make character ASCII CALL QUOTECQ ; Load quoted character ; PUSH HL PUSH BC LD HL,CTRLSTR ; Point to control character string LD BC,CCLEN ; Length of control character string LDIR POP BC POP HL ; LD A,CCLEN ; Account for string length ADD C LD C,A RET ;------------------------------- ; ; Load Quote and Comma ; QCOMMA: CALL QUOTE ; Load quote and fall thru ; ; Load Comma ; COMMA: PUSH AF ; Save character LD A,',' ; Load comma JR QUOTE0 ; ; Load Quote, Character, Quote ; QUOTECQ: CALL QUOTE ; Load leading quote LD (DE),A ; Load character INC DE ; Bump dest pointer and fall thru INC C ; Increment counter ; ; Load Quote ; QUOTE: PUSH AF ; Save character LD A,"'" ; Load quote ; QUOTE0: LD (DE),A INC DE ; Bump destination pointer INC C ; Increment counter POP AF RET ;------------------------------- ; ; Load Number of Characters in B ; CLOAD: POP IX ; Save return address ; CLOOP: EX (SP),HL ; HL=Z3T pointer CALL LDCHR ; Load it EX (SP),HL ; HL=text pointer CALL LOAD ; Load text DJNZ CLOOP JP (IX) ; Return ;------------------------------- ; ; Load Number of Delays in B ; DLOAD: POP IX ; Save return address ; DLOOP: EX (SP),HL ; HL=Z3T pointer LD A,(HL) ; Get it INC HL ; Point to next CALL MAFDC ; Load delay EX (SP),HL ; HL=text pointer CALL LOAD ; Load text DJNZ DLOOP JP (IX) ; Return ;------------------------------- ; ; Load Number of Terminal Control Strings in B ; TCLOAD: POP IX ; Save return address ; TCLOOP: EX (SP),HL ; HL=Z3T pointer CALL LDSTR ; Load it EX (SP),HL ; HL=text pointer PUSH HL ; Save it PUSH BC ; Save counter LD HL,TERM ; Load string termination LD BC,TERMLEN LDIR POP BC LD A,TERMLEN ; Account for string length ADD C LD C,A CALL FORM ; Space out comments POP HL ; HL=text pointer CALL LOAD ; Load text DJNZ TCLOOP JP (IX) ; Return ;------------------------------- ; ; Add Spaces to Place Comments At or After Line 33 ; FORM: LD A,16 ; Set limit SUB C ; How many spaces to go? RET Z ; Ok if exactly 16 RET C ; None, ok ; PUSH BC ; Save B LD B,A ; Count in B LD A,SPACE ; FLOOP: LD (DE),A ; Space out comments to line 33 INC DE DJNZ FLOOP POP BC RET ;------------------------------- ; ; Move 0-Terminated File Text to File Buffer ; LOAD: LD A,(HL) ; Get character INC HL ; Point to next OR A ; Check for end RET Z ; Yes, quit ; LD (DE),A ; Move character INC DE ; Bump pointer JR LOAD ;------------------------------- ; ; Move Filename and Filetype to Buffer ; FNLOOP: LD A,(HL) ; Get a character INC HL CP ' ' ; Quit at first space RET Z ; Finished LD (DE),A ; Put it away INC DE ; Point to next DJNZ FNLOOP RET ;------------------------------- ; ; Display Outfile Drive and User ; PDU: LD A,(DU+1) ; Get drive ADD 'A' ; Make it ASCII CALL COUT ; Display it LD A,(DU) ; Get user LD B,'0'-1 ; Set counter CP 10 ; Single digit? JR C,PDU1 ; Yes ; PDU0: INC B SUB 10 ; Keep subtracting until CARRY set JR NC,PDU0 ; ADD A,10 ; Get remaining units digit back LD C,A ; Save it LD A,B ; Tens digit CALL COUT ; Display it LD A,C ; Restore units digit ; PDU1: ADD A,'0' ; Make ASCII CALL COUT LD A,':' CALL COUT RET ;------------------------------- ; ; Source Code File ; FILESTART: DB ';',CR,LF DB '; Z3TCAP file: ',0 ; TNAME: DB CR,LF,';',CR,LF DB 'ESC',TAB,'EQU',TAB,'27',TAB,TAB,'; Escape character' DB CR,LF DB ';',CR,LF DB '; The first character in the terminal name must not be ' DB 'a space. For',CR,LF DB '; Z3TCAP.TCP library purposes only, the name terminates ' DB 'with a space',CR,LF DB '; and must be unique in the first eight characters.',CR,LF DB ';',CR,LF DB 'TNAME:',TAB,'DB',TAB,"'" ; Z3TERM: DB ' ' ; Break it so FILT won't insert TABs DB ' ' DB " ' ; Name of terminal (14 chars)",CR,LF DB ';',CR,LF DB '; Terminal configuration bytes B14 and B15 are defined ' DB 'and bits assigned',CR,LF DB '; as follows. The remaining bits are not currently ' DB 'assigned. Set these',CR,LF DB '; bits according to how your terminal is configured.',CR,LF DB ';',CR,LF DB ';',TAB,'B14 b7: Z3TCAP Type.... ' DB '0 = Standard TCAP 1 = Extended TCAP',CR,LF DB ';',CR,LF DB ';',TAB,'bit:',TAB,'76543210',CR,LF DB 'B14:',TAB,'DB',TAB ; B14: DB '00000000B',TAB,'; Configuration ' DB 'byte B14',CR,LF DB ';',CR,LF DB ';',TAB,'B15 b0: Standout....... ' DB '0 = Half-Intensity 1 = Reverse Video',CR,LF DB ';',TAB,'B15 b1: Power Up Delay. ' DB '0 = None 1 = Ten-second delay',CR,LF DB ';',TAB,'B15 b2: No Auto Wrap... ' DB '0 = Auto Wrap 1 = No Auto Wrap',CR,LF DB ';',TAB,'B15 b3: No Auto Scroll. ' DB '0 = Auto Scroll 1 = No Auto Scroll',CR,LF DB ';',TAB,'B15 b4: ANSI........... ' DB '0 = ASCII 1 = ANSI',CR,LF DB ';',CR,LF DB ';',TAB,'bit:',TAB,'76543210',CR,LF DB 'B15:',TAB,'DB',TAB ; B15: DB '00000000B',TAB,'; Configuration ' DB 'byte B15',CR,LF DB ';',CR,LF DB '; Single character arrow keys or WordStar diamond' DB CR,LF DB ';',CR,LF DB TAB,'DB',TAB,0 ; CUP0: DB TAB,TAB,'; Cursor up' DB CR,LF DB TAB,'DB',TAB,0 ; CDN0: DB TAB,TAB,'; Cursor down' DB CR,LF DB TAB,'DB',TAB,0 ; CRT0: DB TAB,TAB,'; Cursor right' DB CR,LF DB TAB,'DB',TAB,0 ; CLF0: DB TAB,TAB,'; Cursor left' DB CR,LF DB ';',CR,LF DB '; Delays (in ms) after sending terminal control strings' DB CR,LF DB ';',CR,LF DB TAB,'DB',TAB DB 0 ; CLD: DB TAB,TAB,'; CL delay',CR,LF DB TAB,'DB',TAB DB 0 ; CMD: DB TAB,TAB,'; CM delay',CR,LF DB TAB,'DB',TAB DB 0 ; CED: DB TAB,TAB,'; CE delay',CR,LF DB ';',CR,LF DB '; Strings start here',CR,LF DB ';',CR,LF DB 'CL:',TAB,'DB',TAB DB 0 ; CL0: DB '; Home cursor and clear screen',CR,LF DB 'CM:',TAB,'DB',TAB DB 0 ; CM0: DB '; Cursor motion macro',CR,LF DB 'CE:',TAB,'DB',TAB DB 0 ; CE0: DB '; Erase from cursor to end-of-line',CR,LF DB 'SO:',TAB,'DB',TAB DB 0 ; SO0: DB '; Start standout mode',CR,LF DB 'SE:',TAB,'DB',TAB DB 0 ; SE0: DB '; End standout mode',CR,LF DB 'TI:',TAB,'DB',TAB DB 0 ; TI0: DB '; Terminal initialization',CR,LF DB 'TE:',TAB,'DB',TAB DB 0 ; TE0: DB '; Terminal deinitialization',CR,LF DB ';',CR,LF DB '; Extensions to standard Z3TCAP',CR,LF DB ';',CR,LF DB 'LD:',TAB,'DB',TAB DB 0 ; LD0: DB '; Delete line at cursor position',CR,LF DB 'LI:',TAB,'DB',TAB DB 0 ; LI0: DB '; Insert line at cursor position',CR,LF DB ';',CR,LF DB '; The attribute string contains the four command ' DB 'characters to set',CR,LF DB '; the following four attributes for this terminal in the ' DB 'following',CR,LF DB '; order: ',TAB,'Normal, Blink, Reverse, Underscore',CR,LF DB ';',CR,LF DB 'SA:',TAB,'DB',TAB DB 0 ; SA0: DB '; Set screen attributes macro',CR,LF DB 'AT:',TAB,'DB',TAB DB 0 ; AT0: DB '; Attribute string',CR,LF DB ';',CR,LF DB 'CD:',TAB,'DB',TAB DB 0 ; CS0: DB '; Erase from cursor to end-of-screen',CR,LF DB 'RC:',TAB,'DB',TAB DB 0 ; RC0: DB '; Read current cursor position',CR,LF DB 'RL:',TAB,'DB',TAB DB 0 ; RL0: DB '; Read line until cursor',CR,LF DB ';',CR,LF DB '; Graphics On/Off delay',CR,LF DB ';',CR,LF DB 'GOELD:',TAB,'DB',TAB DB 0 ; GDD: DB TAB,TAB,'; Graphics On/Off delay in ms',CR,LF DB ';',CR,LF DB '; Graphics strings',CR,LF DB ';',CR,LF DB 'GO:',TAB,'DB',TAB DB 0 ; GO0: DB '; Graphics mode On',CR,LF DB 'GE:',TAB,'DB',TAB DB 0 ; GE0: DB '; Graphics mode Off',CR,LF DB 'CDO:',TAB,'DB',TAB DB 0 ; CDO0: DB '; Cursor Off',CR,LF DB 'CDE:',TAB,'DB',TAB DB 0 ; CDE0: DB '; Cursor On',CR,LF DB ';',CR,LF DB '; Graphics characters',CR,LF DB ';',CR,LF DB 'GULC:',TAB,'DB',TAB DB 0 ; GULC0: DB TAB,TAB,'; Upper left corner',CR,LF DB 'GURC:',TAB,'DB',TAB DB 0 ; GURC0: DB TAB,TAB,'; Upper right corner',CR,LF DB 'GLLC:',TAB,'DB',TAB DB 0 ; GLLC0: DB TAB,TAB,'; Lower left corner',CR,LF DB 'GLRC:',TAB,'DB',TAB DB 0 ; GLRC0: DB TAB,TAB,'; Lower right corner',CR,LF DB 'GHL:',TAB,'DB',TAB DB 0 ; GHL0: DB TAB,TAB,'; Horizontal line',CR,LF DB 'GVL:',TAB,'DB',TAB DB 0 ; GVL0: DB TAB,TAB,'; Vertical line',CR,LF DB 'GFB:',TAB,'DB',TAB DB 0 ; GFB0: DB TAB,TAB,'; Full block',CR,LF DB 'GHB:',TAB,'DB',TAB DB 0 ; GHB0: DB TAB,TAB,'; Hashed block',CR,LF DB 'GUI:',TAB,'DB',TAB DB 0 ; GUI0: DB TAB,TAB,'; Upper intersect',CR,LF DB 'GLI:',TAB,'DB',TAB DB 0 ; GLI0: DB TAB,TAB,'; Lower intersect',CR,LF DB 'GIS:',TAB,'DB',TAB DB 0 ; GIS0: DB TAB,TAB,'; Mid intersect',CR,LF DB 'GRTI:',TAB,'DB',TAB DB 0 ; GRTI0: DB TAB,TAB,'; Right intersect',CR,LF DB 'GLTI:',TAB,'DB',TAB DB 0 ; GLTI0: DB TAB,TAB,'; Left intersect',CR,LF DB ';',CR,LF DB '; Fill remaining space with zeros',CR,LF DB ';',CR,LF DB TAB,' REPT',TAB,'128-($-TNAME)',CR,LF DB TAB,'DB',TAB,'0',CR,LF DB TAB,' ENDM',CR,LF DB CR,LF DB TAB,'END',CR,LF DB ';',CR,LF DB '; End of Z3TCAP',CR,LF DB ';',CR,LF DB 0 ;-------------------------------- ; ; Initialized Data Area ; INTYP: DB 'Z3T' ; Default infile filetype OUTTYP: DB 'Z80' ; Default outfile filetype ; CTRLSTR:DB '-40H' ; Control notation for arrow keys CCLEN EQU $-CTRLSTR ; Length of control character string ESCSTR: DB 'ESC,' ; Escape character string ESCLEN EQU $-ESCSTR ; Length of escape character string HISTR: DB '+80H' ; String for character > 80H HILEN EQU $-HISTR ; Length of hi character string TERM: DB '0 ' ; String termination TERMLEN EQU $-TERM ; Length of termination string ;-------------------------------- ; ; Uninitialized Data Area, Initialized at INIT ; DSEG DATA: DU: DS 2 ; Outfile du OUTFCB: DS 36 ; Outfile FCB OUTFILE:DS 2 ; Pointer to start of source file buffer ; QF: DS 1 ; ON if character within quote string DATALEN EQU $-DATA ; Length of data area to be initialized ; DS 48 ; Local stack STACK: DS 2 ; CCP stack pointer ; END