

;FRNT51PT.ASM
; PATCH INFORMATION AND OVERLAY FOR FRONT v. 5.1
; (c) 1986 Claude Ostyn   3/30/86

ESC     EQU     27

        ORG     01F4H   ;Patch area begins here                

        ;Terminal patch area - 
        ;       many labels have same meaning as in WordStar(TM)
                
HITE:   DB      24      ; screen height                               01F4H
WID:    DB      80      ; screen width  (52 to 104)                   01F5H
CLRSCR:                 ; string to erase screen                 
DB      1               ; number of bytes                             01F6H
        DB      1AH,0,0,0,0,0,0,0  ; string 
CLEAD1: DB      2       ; lead-in string for cursor control           01FFH                                                   
        DB      ESC,'=' ;
        DB      0,0,0,0,0,0 
CLEAD2: DB      0       ; string sent between row and column          0208H        
        DB      0,0,0,0 ;
CTRAIL: DB      0       ; string sent after cursor control            020DH
        DB      0,0,0,0 ;
CB4LFG: DB      0       ; non-zero if column sent before row          0212H
LINOFF: DB      20H     ; row offset                                  0213H
COLOFF: DB      20H     ; column offset                               0214H
ASCUR:  DB      0       ; 0 = send binary cursor position value       0215H
                        ; 2 = send 2 ASCII digits                        
                        ; 3 = send 3 ASCII digits                        
ERAEOL: DB      02      ; erase from cursor to end of line            0216H
        DB      ESC,'T' ;
        DB      0,0,0,0 ;
LINDEL: DB      02      ; delete current line                         021DH
        DB      ESC,'R' ;
        DB      0,0,0,0 ;
LININS: DB      02      ; insert a line                               0224H
        DB      ESC,'E' ;
        DB      0,0,0,0 ;
MACHFL: DB      0       ; 1    if Osborne 1 only                      022BH
                        ; 0    for all others                                    
                                                                                 
; Video enhancements

IVON:   DB      01      ; inverse video ON (for menu selections)     022CH                                                    
        DB      '[',0,0 ; must be 01,'[' if not available
        DB      0,0,0
IVOFF:  DB      01      ; inverse video OFF                          0233H
        DB      ']',0,0 ; must be 01,']' if not available
        DB      0,0,0
HIVON:  DB      0       ; highlight or underline ON (drive)          023AH
        DB      0,0,0   ; - if not available set to 0
        DB      0,0,0
HIVOFF: DB      0       ; highlight or underline OFF                 0241H
        DB      0,0,0
        DB      0,0,0 
TRMINI: DB      0       ; string sent to terminal at beginning       0248H
        DB      0,0,0,0 ; of program
        DB      0,0,0,0
TRMUNI: DB      0       ; sent to terminal before exit               0251H
        DB      0,0,0,0
        DB      0,0,0,0
; The following are optional jumps or dummy subroutines which may                
; be modified by FRNSTL terminal installation.  Use caution!                            
INISUB: RET ! NOP ! NOP ; optional jump to initialization            025AH
                        ; subroutine called every time FRONT is
                        ; started (routine be put at morpat)                         
UNISUB: RET ! NOP ! NOP ; jump to de-initialization                  025DH
                        ; routine (called every time FRONT ends)
EXESUB: RET ! NOP ! NOP ; jump to special routine called if          0260H
                        ; executing a command                            
ESCSUB: RET ! NOP ! NOP ; jump to special routine called if          0263H
                        ; ESCaping to to CP/M                            
; Terminal name (12 bytes) - used by FRINSTAL only
TRMNAM:  DB     0,0,0,0,0,0,0,0,0,0,0,0 ;                            0266H
INSTFLG: DB     1       ; installation flag (if not zero, FRONT      0272H
                        ; has not been installed yet)                    
                                                                                 
; Arrow key definition (the normal ^H,^J,^K,^L will also work whatever           
; definitions are installed below)                                               
; (as shown, compatible with WordStar cursor commands)
ARRWKL:  DB     1       ; length of string sent by terminal          0273H
                        ; when arrow key is pressed (1..4)               
ESCDELY: DB     5       ; (0..255)                                   0274H
                        ; length of the delay loop to discriminate        
                        ; between lead-in character alone and lead-      
                        ; in character as part of the string sent        
                        ; by an arrow key (adjust according to the       
                        ; time between each character and to cpu         
                        ; clock speed)                                   
; 4 bytes each                                                                   
ARROWL:  DB     'S'-40h,0,0,0   ; left arrow key code                0275H
ARROWU:  DB     'E'-40h,0,0,0   ; up arrow                           0279H
ARROWR:  DB     'D'-40h,0,0,0   ; right arrow                        027DH
ARROWD:  DB     'X'-40h,0,0,0   ; down arrow                         0281H
                                                                                 
;====== ADDITIONAL CUSTOM PATCH AREA ======                                      
                                                                                 
MORPAT:                                                                          
                                                                                 
        DS      80H             ; 128 bytes available                0286H
                                ; note: FRNSTL may overwrite
                                ; part of this area when installing
                                ; for some machines
                                                                                 
;==== FUNCTIONAL PATCH AREA ====                                                 
                                                                                 
        ORG     MORPAT + 80H                                         

;file search masks                                                               
                                                                                 
TYPECOM: DB     'COM'   ; replace with 0,0,0 if you do not want      0305H
                        ; to list COM files 
; file type table                                                                
; up to 8 file types to be listed in menu can be defined here                    
; pad with zeros for unused types                                                
                                                                                 
TYPE1:  DB      'SUB'   ;                                            0308H
TYPE2:  DB      'BAS'   ;                                            030BH
TYPE3:  DB      'CMD'   ;                                            030EH
TYPE4:  DB      'XQT'   ;                                            0311H
TYPE5:  DB      'INT'   ;                                            0314H
TYPE6:  DB      0,0,0   ;                                            0317H
TYPE7:  DB      0,0,0   ;                                            031AH
TYPE8:  DB      0,0,0   ;                                            031DH
                                                                                 
; The next table contains the name of SUBMIT.COM or other program           
; required to execute files of each of the types defined above.                                  
; Must be followed by at least one zero, and include drive designator.           
; (examples: 'A:SUBMIT',0,0,0 or 'A:EX14',0).                                    
; Each entry must be exactly 11 bytes long.                                      
                                                                                 
TYP1COM:        DB      'A:SUBMIT',0,0          ,0 ;                 0320H
TYP2COM:        DB      'A:MBASIC',0,0          ,0 ;                 032BH
TYP3COM:        DB      'A:DBASE',0,0,0         ,0 ;                 0336H
TYP4COM:        DB      'A:SC2'  ,0,0,0,0,0     ,0 ;                 0341H
TYP5COM:        DB      'A:CRUN2',0,0,0         ,0 ;                 034CH
TYP6COM:        DB      'A:XXXXXXXX'            ,0 ;                 0357H
TYP7COM:        DB      'A:XXXXXXXX'            ,0 ;                 0362H
TYP8COM:        DB      'A:XXXXXXXX'            ,0 ;                 036DH
                                                                                 
LSTSYS: DB      0       ; non-zero to list SYS files                 0378H
LISTOG: DB      'H'     ; char used to toggle SYS file display       0379H
SHWTYP: DB      0       ; if non-zero and command not                037AH
                        ; .com, type will be shown                       
SHWTOG: DB      'T'     ; char used to toggle type display           037BH
SORTED  DB      1       ; if non-zero, menu sorted alphabetically    037CH
SORTOG  DB      'S'     ; character used to toggle sorted menu       037DH
ESCCHAR DB      ESC     ; character used to call special options     037EH

; wildcard name for all searches except ID   
WLDNM   DB      '???????????'   ;                                    037FH
IDFLAG  DB      1       ; if not zero, show disk ID on menu          038AH
IDMASK  DB      '-??????????'   ; wildcard for disk ID dummy file    038BH
CROWDED DB      0       ; if not zero, packed display                0396H
                        ; if zero, more space between menu items
DFLTDRV DB      0       ; drive to select when starting FRONT        0397H
                        ; 0 = 'current' default drive                    
                        ; 1..16 decimal = specific drive A..P            
DFLTUSR DB      0       ; startup user number (0-16 decimal)         0398H
                        ; used only if DFLTDRV non-zero                  
STDBIOS DB      0       ;  1 = standard BIOS calls                   0399H
                        ;  may be used for error trapping
			;  and chaining to executed program is done
			;  by writing command into CCP command buffer
			;  0 = no BIOS calls, and 
			;  chaining is through $$$.SUB file
			;  (set to zero if FRONT bombs when changing
			; drive or attempting to execute a command)
DELAY1  DB      0       ; time between display of selected command   039AH
                        ; and actual execution.                                  
                        ; 1 = approx. 1/10 second with 4MHz clock
                        ; (if long enough, will allow user                       
                        ; to cancel execution by hitting ESC)                    
SUBRPT  DB      2       ; 0 = no repeat                              039BH
                        ; 1 = allow Osborne 1 repeat (FRONT must 
                        ;     be renamed AUTOST.COM for this to work)                                      
                        ;     A special patch must be installed in MORPAT                
                        ; 2 = create a $$$.SUB file on drive A so 
                        ;     CCP will automatically reload FRONT
			; 3 = create a $$$.SUB file on default drive
			;     so ZCPR can reload FRONT
SUBMSFL DB      1       ; if non-zero and SUBRPT > 1, print warning  039CH
                        ; message in case disk is write-protected                           

ZCMDFL  DB	0       ; non-zero if using ZCMD (change user areas  039DH
			; with the >Dn: command rather than the
			; standard >USER n command)

; command installed into $$$.SUB to make it repeat FRONT 
; (this is the name under which FRONT is installed, and it is 
; patched automatically by FRNSTL when saving FRONT)
; no more than 10 characters in command after initial "$"                              
; 
; note: FRNSTL always saves the name with A: for the drive;
; if you want FRONT to reside on another drive, patch manually 
SUBPFNAM DB     '$A:FRONT51',0,0,0 ;                                 039EH
                                                                                 
;---- END OF PATCH AREA -----                                                    
END