; ;In order to minimize changes to the locations of User area ;data, the origin is forced here to 180H above the start of ;the TPA. ; ORG TPA+180H ;Always start user area in same spot ; ;This jump table provides commonly used subroutines for use ;by custom subroutines in the User areas. It must not be ;modified in any way. ; ; ;To output a character to the terminal from within your ; custom subroutines, call DISPLA with the character ; to be output in the accumulator (A register). All ; registers will be preserved. ; 0280 DISPLA:: 0280 C3 0CB6 JMP CO ;Display character routine ; ;To output a string to the terminal that is in the normal ; user area format (count followed by bytes), call ; STRING with HL pointing to the string to be output. ; Upon returning, HL points to the byte following the ; string. ; 0283 STRING:: 0283 C3 17C6 JMP STROUT ;Display string routine ; ;To use WordStar's standard list output drivers, call the ; following subroutines. In all cases, all registers ; except for the PSW are unchanged by the subroutines. ; 0286 LSTOUT: ;Prints char in A. 0286 C3 0000* JMP LO 0289 LSOSTA: ;Returns output status to A (0 if busy). 0289 C3 0000* JMP LOSTAT 028C LSTIN: ;Inputs char from printer to A. (Only 028C C3 0000* JMP LI ;works if custom ULISTI exists.) 028F LSISTA: ;Returns input status to A (0 if no char). 028F C3 0000* JMP LISTAT ;(Only works if custom ULISTA.) 0292 LSTRNG: ;Send string to list device. (HL points 0292 C3 0000* JMP LSTSTR ;to string, count byte first, just like ;console strings). ; ;This flag is used if WordStar is on a multi-user system. It should ;be set to zero on single-user systems. Each bit of MPMFLG is used ;as follows: ; ; Bit Meaning ; ; ; 0 If 0, WordStar will issue a SYSTEM RESET when logging ; onto a removable disk drive. If 1, no reset will ; occur, and the operating system itself must handle ; any disk swapping. ; ; 1 If 1, users can share documents. Before opening a ; document to edit, WordStar will check to see if temporary ; files with that document name (e.g. FILENAME.$A$) ; already exist. If such files exist, WordStar will open ; the document as a protected document, preventing any ; changes to it. If 0, WordStar will delete existing ; temporary files when opening the document for editing. ; ; 2 If 1, users can share printer. MP/M function calls are ; issued to attach and detach the list device. If 0, ; the printer is assumed to be always attached. ; ; 3 If 1, WordStar will issue frequent MP/M "dispatch to ; next task" function calls to assure that multiple users ; have balanced access to the computer. If 0, WordStar ; assumes that only one user is on the computer at a time. ; If the operating system itself can load share adequately ; (such as MP/M 8/16 systems), set this bit to 0. ; ; 4-6 Reserved. ; ; 7 If 1, TurboDOS 1.3 operating system. WordStar will not ; check the disk drive write protect vector, will not check ; printer busy status, and will issue the TurboDos printer ; detach call when done printing. If 0, CP/M or MP/M. ; WordStar does not support TurboDos 1.2. ; ;If you are using MP/M, bits 0, 1 and 2 should all be set to 1. Bit 3 ;should be set for older versions of MP/M. If you are running on a ;networked system, only bit 1 should be set. If you are using TurboDos ;1.3 in a multi-user environment, bits 1 and 7 should be set. If you ;are using single-user TurboDos, only bit 7 should be set. ; 0295 MPMFLG:: 0295 00 DB 0 ;Zero for single-user systems 0296 00 DB 0 ;Reserved ; ;SHARE specifies how WordStar will handle two users in a shared file ;system who attempt to edit the same file. If 0, the second user ;will be denied access to the file. If 1, the second user can ;view as much of the file as can be loaded into memory, but he ;cannot modify the file. ; 0297 SHARE:: 0297 01 DB 1 ;Allow viewing (protected edit) 0298 00 00 00 DB 0,0,0 ;Reserved ; ;The function key table allows you to program any function keys that ;your terminal supports into one or more other keystrokes. Note that ;on many terminals, the function keys generate a sequence of characters ;where the first character is a control code. Since WordStar probably ;uses this same code for one its commands, a timer is used to determine ;when the "burst" of characters from the function key is done. ;This works because the terminal will usually send the function ;key characters at close to full baud rate. At 9600 baud, each character ;takes 1/960 of a second to send, or close to one millisecond. That ;means that three characters would take approximately three milliseconds. ;There is no way that even the fastest human typist could type that ;fast! Therefore, this method will usually work. ; ;Each function key in the table below is represented by two strings. ;The first describes the "burst" from the key. The second is what it ;should be translated into. You may not use string indirections in ;this table (size of -1 followed by address). ; ;The end of the function key table is indicated when the size of the ;function key string is zero. If you have more function keys than will ;fit, you can put a continuation address after the zero to point to more ;table. The table at that address must be the same format as this ;one. No continuation is indicated by an address of zero. ; ;One character "bursts" will not work here. If you need to translate ;a single character into something else, use the user console input ;routine UCONI. ; ;Warning! Terminals or computers that have their own type-ahead ;buffering may cause problems with this approach since it will be more ;likely that characters other than just function keys will be "burst" ;into WordStar by it. ; 029B FUNDLY:: 029B 00 DB 0 ;Milliseconds of delay between characters ;of function key burst (if zero, no ;function keys are implemented). See ;section on delays below before adjusting ;FUNDLY for your system. 029C 01 DB CTRLA ;Character that starts each burst ;(set to 0FFh to disable) 029D FUNTBL:: 029D 03 DB 3 ;Three chars in burst 029E 01 40 0D DB CTRLA,'@',CR ;Function key 1 02A1 02 DB 2 ;Two chars in replacement 02A2 0B 42 DB CTRLK,'B' ;Mark beginning of block 02A4 03 DB 3 02A5 01 41 0D DB CTRLA,'A',CR ;Function key 2 02A8 02 DB 2 02A9 0B 4B DB CTRLK,'K' ;Mark end of block 02AB 03 DB 3 02AC 01 42 0D DB CTRLA,'B',CR ;Function key 3 02AF 02 DB 2 02B0 0B 43 DB CTRLK,'C' ;Copy marked block 02B2 03 DB 3 02B3 01 43 0D DB CTRLA,'C',CR ;Function key 4 02B6 02 DB 2 02B7 0B 56 DB CTRLK,'V' ;Move marked block 02B9 03 DB 3 02BA 01 44 0D DB CTRLA,'D',CR ;Function key 5 02BD 02 DB 2 02BE 0B 59 DB CTRLK,'Y' ;Delete marked block 02C0 03 DB 3 02C1 01 45 0D DB CTRLA,'E',CR ;Function key 6 02C4 02 DB 2 02C5 11 46 DB CTRLQ,'F' ;Find string 02C7 03 DB 3 02C8 01 46 0D DB CTRLA,'F',CR ;Function key 7 02CB 02 DB 2 02CC 11 41 DB CTRLQ,'A' ;Search and replace 02CE 03 DB 3 02CF 01 47 0D DB CTRLA,'G',CR ;Function key 8 02D2 01 DB 1 02D3 0C DB CTRLL ;Repeat last find or replace again 02D4 03 DB 3 02D5 01 48 0D DB CTRLA,'H',CR ;Function key 9 02D8 02 DB 2 02D9 0B 44 DB CTRLK,'D' ;Save document 02DB 03 DB 3 02DC 01 49 0D DB CTRLA,'I',CR ;Function key 10 02DF 02 DB 2 02E0 0B 51 DB CTRLK,'Q' ;Abandon editing 02E2 03 DB 3 02E3 01 4A 0D DB CTRLA,'J',CR ;Function key 11 02E6 06 DB 6 02E7 11 46 10 DB CTRLQ,'F',CTRLP ;Find end of paragraph 02EA 0D 0D 0D DB CR,CR,CR 02ED 03 DB 3 02EE 01 4B 0D DB CTRLA,'K',CR ;Function key 12 02F1 08 DB 8 02F2 11 46 10 DB CTRLQ,'F',CTRLP ;Find beginning of paragraph 02F5 0D 0D 42 0D DB CR,CR,'B',CR,CTRLD 02F9 04 02FA 00 DB 0 ;End of table 02FB 0000 DW 0 ;No continuation REPT 128-($-FUNTBL) ;Allow 128 bytes for table DB 0 ENDM 031D 00 00 DB 0,0 ;Reserved ; ; TERMINAL PATCH AREA ; ;This section contains the user-modifiable constants and ; routines for hardware-dependent terminal functions ; and characteristics required by the editor. ; ;There are three types of patches in this area. One can ; patch data values (HITE, WID) which describe the ; terminal, strings (CLEAD1, ERAEOL) which define ; control sequences, or actual microprocessor ; instructions. ; ;For the string sequences, the first byte of the patch ; indicates the number of bytes in the string, ; followed by that many string bytes. If there is ; insufficient room for the whole string, the format ; can be modified by putting a -1 (0FFH) where the ; number of bytes would go, and then putting the ; address in the following two bytes (low order byte ; first) of the address where the longer patch ; resides. The longer patch must then be of the ; normal format which is the number of bytes followed ; by the string. ; ;This area is normally patched for your specific terminal ; by the interactive INSTALL program. Additional ; patching to this area is needed only for unusual ; terminals or video boards, or to meet special ; requirements, or to enhance or personalize your ; copy of WordStar. The default user area is ; set up for this example installation. ; ; ;Video screen height, width, and wrap-around parameters are required. ; 031F HITE:: 031F 18 DB 24 ;Must be exact screen height in lines. 0320 WID:: 0320 50 DB 80 ;Must be <= exact screen width in columns. 0321 WRAP:: 0321 FF DB TRUE ;Indicates if terminal wraps around to next ;line if a character is displayed in WIDth ;column of screen (set FALSE if it doesn't) 0322 XONOFF:: 0322 FF DB TRUE ;TRUE if XON/XOFF protocol to be used for ;the CRT terminal 0323 SCROLL:: 0323 14 DB 20 ;Number of columns that are horizontally ;scrolled when cursor moves beyond right ;or left side of screen. 0324 DIRSIZ:: 0324 05 DB 5 ;Number of lines available for directory ;at bottom of screen. If zero, no directory. 0325 0B DB 11 ;Larger directory for document selection ; ;Delete Display String ; ;The following string indicates to WordStar how to display a delete ;character (hex 7F) on the screen while editing. On terminals that ;interpret the delete character code into a displayable character, it ;is recommended that DELSTR be translated into the delete code itself ;(length of 1, then 7FH). All characters in the string must display. ; 0326 DELSTR:: 0326 03 DB 3 ;Number of chars in string 0327 44 45 4C DB 'DEL' ;What is displayed 032A 00 00 DB 0,0 ;Spare bytes ; ;Soft and End of Line Hyphen Display String ; ;In order to distinguish soft hyphens from normal hyphens in the text, ;WordStar will substitute the following string when one is encountered. ; 032C SHYSTR:: 032C 01 DB 1 ;Number of chars in string 032D 3D DB '=' ;What is displayed 032E 00 00 00 00 DB 0,0,0,0 ;Spare bytes ; ;Block Marker Strings ; ;Block marker strings are displayed on the screen to show the start and ;end of a block of text. The strings are in the typical format of the ;length followed by as many characters. Control characters should not ;be included within these strings because they would not be sent ;directly to the screen. ; 0332 BBLOCK:: 0332 03 DB 3 ;Three chars 0333 3C 42 3E DB '' ;Begin block 0336 00 DB 0 ;1 spare ; 0337 KBLOCK:: 0337 03 DB 3 ;Three chars 0338 3C 4B 3E DB '' ;End block 033B 00 DB 0 ;1 spare ; ;Special character used when displaying soft spaces with ^OB. ; 033C SOFTSP:: 033C 2B DB '+' ;Soft spaces show up as plus signs 033D 00 00 00 00 DB 0,0,0,0,0 ;Reserved 0341 00 ; ;The following string is used at sign-on to describe the type ;of terminal being used by WordStar. Up to 40 bytes are available ;for the string, including its null terminator. ; 0342 CRTID:: 0342 55 6E 69 6E DB 'Uninstalled Terminal',CR,LF,0 ;Terminal name 0346 73 74 61 6C 034A 6C 65 64 20 034E 54 65 72 6D 0352 69 6E 61 6C 0356 0D 0A 00 0359 20 20 20 20 DB ' ' ;Extra room 035D 20 20 20 20 0361 20 20 20 20 0365 20 20 20 20 0369 20 ; ;Cursor positioning control sequences are required. ; ;Cursor positioning for most terminals is accomplished ; by sending: ; ; 1. A 'lead-in' string of one or more terminal ; specific characters. ; 2. The line number, with an offset (often 20H) added. ; For some terminals, the column number is ; sent first. ; 3. For some terminals, another 'lead-in' string. ; 4. The column (or line) number, with an offset. ; 5. For some terminals, a terminating string. ; ;For most terminals, the line and column number are sent ; as one-byte binary numbers. Some terminals require ; that a two- or three-digit ASCII number is sent. ; ;For terminals that do not fit the above patterns, you ; must code your own subroutine. ; ;For example, the cursor is positioned on this sample ; installation by sending: ; ; ESCAPE, '=', ; line number plus 20H, ; column number plus 20H. ; 036A CLEAD1:: ;Initial lead-in string 036A 02 DB 2 ;Number of characters 036B 1B DB ESC ;First character 036C 3D DB '=' ;Second character 036D 00 00 DB 0,0 ;Space for two more characters 036F CLEAD2:: ;Sent between line and column 036F 00 DB 0 ;Number of characters, none in our 0370 00 DB 0 ;example. First character 0371 00 00 00 DB 0,0,0 ;Space for three more characters 0374 CTRAIL:: ;Terminating string 0374 00 DB 0 ;Number of characters 0375 00 00 00 00 DB 0,0,0,0 ;Space for four characters 0379 CB4LFG:: ;Send column before line? 0379 00 DB 0 ;Set non-zero to send column first 037A CUROFF:: ;Cursor offsets ;Offset to add to line 037A 20 DB 20H ;Add 20H to line number (0 is top ;line of screen before offset) ;Offset to add to column 037B 20 DB 20H ;Add 20H to column number (0 is ;left-most column of screen ;before offset) 037C ASCUR:: ;Binary/ASCII digit flag 037C 00 DB 0 ;0 to send binary line and column ;2 to send 2-digit ASCII numbers ;3 to send 3-digit ASCII numbers ; ;Provision for positioning cursor by user-coded ; subroutine, instead of under control of above ; items. For use in exceptional cases only. ; ;Insert a JMP instruction to your subroutine in the ; following three bytes. Whenever the first byte ; is non-NOP, this location will be called to ; position the cursor, and the above cursor patch ; items will be ignored. ; ;Your subroutine will receive the line number in the L ; register (0 = top line), the column number in ; the H register (0 = left-most column), and the ; video attributes at the next typing position in ; the A register. Attributes are represented as ; described for the VIDATT routine, except that the ; warning/error bit indicates double-strike. ; ;Your subroutine may alter all registers. ; 037D UCRPOS:: 037D 00 NOP ;Normally NOP, or JMP to your cursor 037E 00 NOP ;positioning routine. 037F C9 RET ; ;Displaying characters on some screens can be significantly faster if the ;cursor can be turned off. ; 0380 ONCUR:: ;Turn cursor on by changing to jump 0380 00 NOP ;to custom subroutine. 0381 00 NOP ; L = current cursor line 0382 C9 RET ; H = cursor column 0383 OFFCUR:: ;Turn cursor off by changing to jump 0383 00 NOP ;to custom subroutine. 0384 00 NOP ; L = current cursor line 0385 C9 RET ; H = cursor column ; ;Everything in the rest of this section is optional. ; The items relate either to enhanced performance, ; or for accomodating unusual terminals. ; ; ;Erase screen. If this function is not available, leave ; the first byte zero, and the WordStar will either send ; line feeds, or update a screen of text using ERAEOL ; below. ; ;After the screen is erased, WordStar assumes that the video ; attributes are set to normal (dim for the example ; terminal), and that the cursor is at the home position ; (upper left hand corner). ; 0386 ERASCR:: 0386 03 DB 3 ;Number of characters 0387 1A DB CTRLZ ;First character (clear screen) 0388 1B 29 DB ESC,')' ;Additional characters (dim) 038A 00 00 00 00 DB 0,0,0,0,0,0 ;Room for 13 more 038E 00 00 0390 00 00 00 00 DB 0,0,0,0,0,0,0 0394 00 00 00 ; ;Backspace one character string. If this function is not ; available, leave the first byte zero, and WordStar ; will use cursor addressing to backspace. ; 0397 BAKSPC:: 0397 01 DB 1 ;Number of characters 0398 08 DB BS ;First character 0399 00 00 00 DB 0,0,0 ;Additional characters ; ;Erase to end of line string. If this function is not ; available, leave the first byte zero, and WordStar ; will perform the function more slowly via software. ; 039C ERAEOL:: 039C 02 DB 2 ;Number of characters 039D 1B DB ESC ;First character 039E 54 00 00 DB 'T',0,0 ;Additional characters ; ;Erase to end of screen string. If this function is not ; available, leave the first byte zero, and WordStar ; will perform the function more slowly via software. ; 03A1 ERAEOS:: 03A1 02 DB 2 ;Number of characters 03A2 1B DB ESC ;First character 03A3 59 00 00 DB 'Y',0,0 ;Additional characters ; ;Delete screen line containing the cursor, and move lower ; lines on the screen up one line. If this function ; is not available, leave the first byte zero, and ; WordStar will perform the function more slowly ; via software. ; 03A6 LINDEL:: 03A6 02 DB 2 ;Number of characters 03A7 1B DB ESC ;First character 03A8 52 00 00 DB 'R',0,0 ;Additional characters ; ;Insert a blank line on the screen, moving the line ; containing the cursor, and the lines below it down ; one line. If this function is not available, leave ; the first byte zero, and WordStar will perform ; the function more slowly via software. ; 03AB LININS:: 03AB 02 DB 2 ;Number of characters 03AC 1B DB ESC ;First character 03AD 45 00 00 DB 'E',0,0 ;Additional characters ; ;WordStar will use LINDEL and LININS to delete or insert a group ; of lines rather than just displaying a whole new screenful ; of characters. LINMAX below indicates the maximum number ; of lines that this would generally be faster than the ; re-display. Set to zero if don't care. ; 03B0 LINMAX:: 03B0 05 DB 5 ;Five lines ; ;Terminal initialization string. A string of bytes which ; will be sent to the terminal at the beginning of a ; session. See also INISUB. ; 03B1 TRMINI:: 03B1 FF DB -1 ;Number of bytes 03B2 0386 DW ERASCR ;Use extension mechanism (-1 as byte 03B4 00 00 DB 0,0 ;count) to erase screen as initialization. ; ;Terminal un-initialization string. A string of bytes ; which will be sent to the terminal at the end of a ; session. See also UNISUB. ; 03B6 TRMUNI:: 03B6 02 DB 2 ;Number of bytes 03B7 1B 28 DB ESC,'(' 03B9 00 00 DB 0,0 ; ;User-patchable initialization subroutine. Called before ; the TRMINI string is sent. This subroutine may be ; used for special console initialization or other ; purposes. See UCRPOS comments. ; 03BB INISUB:: 03BB 00 NOP ;Normally NOP, or JMP to 03BC 00 NOP ;your subroutine 03BD C9 RET ; ;User patchable un-initialization subroutine. Called ; before the TRMUNI string is sent. This subroutine ; may be used to 'undo' any special terminal status ; used for the WordStar. See UCRPOS comments. ; 03BE UNISUB:: 03BE 00 NOP ;Normally NOP, or JMP to 03BF 00 NOP ;your subroutine 03C0 C9 RET ; ;Video attributes are used in various places on the WordStar display. ;The following table describes what each bit of an attribute byte ;means when used within WordStar. Note that when no bit is set, that ;is the normal condition. ; ; Bit WordStar Usage ; ; none Normal text ; 0 Strike-out text ; 1 Warning & error messages ; 2 Marked block of text ; 3 Underlined text ; 4 Subscripted text ; 5 Superscripted text ; 6 Bold text ; 7 Italic (or ribbon color) ; ;For this sample installation, the following translation of attribute ;bits into video conditions could be used. ; ; WordStar Example ; ; Normal Dim ; Warning Blink ; Marked Inverse ; Underlined Underline ; Subscripted Bright ; Superscripted Bright ; Highlighted Bright ; ;Because each terminal uses such diverse strings to change video ;attributes, you must provide a custom subroutine at VIDATT to ;build the proper one for yours. You may be able to take advantage ;of the fact that many terminals use a binary method to encode the ;attributes. If you do not wish to use any video attributes, put ;the customary two NOP's followed by a RET at VIDATT to disable it. ; ;The following implementation is for this sample installation. On that ;terminal the following sequences are required for the different ;attributes in our table: ; ; Attribute Sequence Screen Space ; ; Dim ESC ) NO ; Bright ESC ( NO ; Normal video ESC G 0 YES ; Blink ESC G 2 YES ; Inverse ESC G 4 YES ; Underline ESC G 8 YES ; Underline, blink ESC G : YES ; Underline, inverse ESC G < YES ; Underline, inverse, blink ESC G > YES ; ;However, since the ESC G attributes take up screen space, we cannot ;use them with WordStar. Therefore, all attributes are highlighted ;using bright. ; ;The VIDATT subroutine is used to change video attributes on the screen. ;On entry, WordStar will supply the attributes that are on in the C ;register. You must translate them into whatever your particular terminal ;requires. The following implementation is a sample installation. ;This subroutine is called only when a video attribute changes. ; 03C1 VIDATT:: ;Change to NOP, NOP, RET if not needed 03C1 21 03D2 LXI H,vdim 03C4 0C INR C ;Normal video? 03C5 0D DCR C 03C6 CA 0283 JZ STRING ; 03C9 21 03CF LXI H,vbrite ;Highlight everything else 03CC C3 0283 JMP STRING ; 03CF 02 1B 28 vbrite: DB 2,ESC,'(' ;Bright 03D2 02 1B 29 vdim: DB 2,ESC,')' ;Dim REPT 128-($-VIDATT) ;Allow total of 128 bytes for VIDATT DB 0 ENDM ; ;Normally the status line, text and directories are displayed in ;dim intensity so that bold and doublestruck text can be shown in ;high intensity. Setting BRITE to 0FFH reverses the usage of ;bright and dim for the status line, text and directories ;zero ;normally. ; 0441 00 BRITE:: DB 0 ;Don't reverse ;0FFH = normal text bright ; ;Delays are executed after various terminal functions, before ; the next character is sent to the terminal, to ; allow response time required by certain terminals ; when operating at a high baud rate. Set to a ; larger value if you suffer a loss of characters ; after a terminal function. ; ;Note that an additional delay FUNDLY is located near the ; function key table FUNTBL above. ; ;Each delay is approximately the number of milliseconds ; on a 4 MHz Z80 processor, about twice as long on ; a 2 MHz 8080 (in other words, divide delay values ; in half for a 2 MHz processor to achieve the same ; results). ; 0442 DELCUS:: 0442 00 DB 0 ;No delay after cursor positioning ;(if your terminal works better with ;5 milliseconds of delay, you would ;put a "5" here instead) 0443 DELMIS:: ;Miscellaneous screen delays 0443 00 DB 0 ;No delay 0444 DXOFF:: ;If XON/XOFF used for terminal, sometimes 0444 07D0 DW 2000 ;a legitimate ^S will be interpreted as an ;XOFF character. DXOFF is used to time out ;so that the terminal will continue. 0446 DLONG:: ;Long delays (like at sign-on) 0446 07D0 DW 2000 ;2 seconds = 2,000 milliseconds ;(1000 if 8080) 0448 DMED:: ;Medium delays (like at P, O, or K menus) 0448 03E8 DW 1000 ;1 second = 1,000 milliseconds ;(500 if 8080) 044A DSHORT:: ;Short delays (like before help menus) 044A 00C8 DW 200 ;200 milliseconds (100 if 8080) 044C UPDLY:: ;Position update delay 044C 00C8 DW 200 ;200 milliseconds (100 if 8080) 044E DDISK:: ;Disk access delay. If character typed 044E 01F4 DW 500 ;during disk access, wait this duration for ;more characters. 500 milliseconds 0450 DFAST:: ;Delay when typing fast. Holds off displaying 0450 0032 DW 50 ;the rest of the line briefly ; ;Optional user-supplied console I/O subroutines. You may ; patch JMP's here to your own console input, console ; output, and console status subroutines, in which ; case these routines, instead of the operating ; system BIOS entry points, will be used for all ; console I/O. These subroutines may alter all registers. ; ;Use of a custom subroutine accessed here is suggested, ; for example, to drive a video board that cannot be ; driven via output to the operating system. ; 0452 UCNSTA:: ;User console status subroutine. 0452 00 NOP ;Normally NOP, or JMP to your own 0453 00 NOP ;subroutine. Must return 0 in A if 0454 C9 RET ;no character ready, 0FFH if one is ;ready. 0455 UCONI:: ;User console input subroutine. 0455 00 NOP ;Normally NOP, or JMP to your own 0456 00 NOP ;subroutine. Must return the 0457 C9 RET ;character in A. May be called ;before a character is ready. If ;no character is ready, routine ;must wait until a character is ;available. 0458 UCONO:: ;User console output subroutine. 0458 00 NOP ;Normally NOP, or JMP to your own 0459 00 NOP ;subroutine. Subroutine receives 045A C9 RET ;the character in A, video attributes in ;B, and current cursor address in HL. ; ;This is 128 bytes set aside for anything that the user wishes to use. ;If more than 128 bytes are required, it is necessary to put them after ;the main WordStar code which can be determined by looking at the ;contents of BGNMEM to see where it is. After using as much space as ;necessary, change BGNMEM to the new beginning of free memory. ; 045B MORPAT:: 045B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 045F 0000 0000 0463 0000 0000 0467 0000 0000 046B 0000 0000 046F 0000 0000 0473 0000 0000 0477 0000 0000 047B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 047F 0000 0000 0483 0000 0000 0487 0000 0000 048B 0000 0000 048F 0000 0000 0493 0000 0000 0497 0000 0000 049B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 049F 0000 0000 04A3 0000 0000 04A7 0000 0000 04AB 0000 0000 04AF 0000 0000 04B3 0000 0000 04B7 0000 0000 04BB 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 04BF 0000 0000 04C3 0000 0000 04C7 0000 0000 04CB 0000 0000 04CF 0000 0000 04D3 0000 0000 04D7 0000 0000 ; ;CRTPAT is a patch area that may be used by WordStar's installation ;program. ; 04DB CRTPAT:: 04DB 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 04DF 0000 0000 04E3 0000 0000 04E7 0000 0000 04EB 0000 0000 04EF 0000 0000 04F3 0000 0000 04F7 0000 0000 04FB 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 04FF 0000 0000 0503 0000 0000 0507 0000 0000 050B 0000 0000 050F 0000 0000 0513 0000 0000 0517 0000 0000 051B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 051F 0000 0000 0523 0000 0000 0527 0000 0000 052B 0000 0000 052F 0000 0000 0533 0000 0000 0537 0000 0000 053B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 053F 0000 0000 0543 0000 0000 0547 0000 0000 054B 0000 0000 054F 0000 0000 0553 0000 0000 0557 0000 0000 ; ;The following string is used to describe the name of the default ;printer used by WordStar. Up to 40 bytes are provided for the ;string, including its null terminator. ; 055B PRNID:: 055B 44 72 61 66 DB 'Draft Printer',CR,LF,0 ;Printer name 055F 74 20 50 72 0563 69 6E 74 65 0567 72 0D 0A 00 056B 20 20 20 20 DB ' ' ;Additional room 056F 20 20 20 20 0573 20 20 20 20 0577 20 20 20 20 057B 20 20 20 20 057F 20 20 20 20 ; ;WordStar uses a default printer driver if none is specified by the ;user. The following is its name. It may be up to six characters long, ;null terminated. ; 0583 DEFPRN:: 0583 44 52 41 46 DB 'DRAFT',0 ;Standard driver 0587 54 00 0589 20 DB ' ' ;One extra char ; ;The print delay timer is used to time how long the printer is busy ;before telling the user that it's been busy a long time. This would ;primarily be used when the printer was in another room and you might ;not know that it was busy due to a paper jam or being off line. ; 058A PRNDLY:: ;Delay before saying printer busy 058A 0000 DW 0 ;Zero to disable ; ;Pausing between each page is used if single sheets of paper are being ;printed. ; 058C PPAUSE:: 058C 00 DB FALSE ;Continuous form (don't pause) ; ;Many printers can use form feeds to quickly get from one page to the ;next. If your printer can, setting PFFEED to TRUE will cause WordStar ;to use form feeds instead of carriage returns and line feeds. ; 058D PFFEED:: 058D 00 DB FALSE ;Carriage returns to next page ; ;Some users, like programmers, may want to usually print non-documents. ;In this case, WordStar prints any lines that begin with a period (dot ;commands), and expands tab characters (09H) according to the filetype ;in the EDCOND table elsewhere in the User Area. ; 058E PNODOC:: 058E 00 DB FALSE ;Don't print as a non-document ; ;Printer protocol flags. Only one of these flags may be set TRUE at ;one time. If neither flag is set, WordStar assumes all printer busy ;handshaking is done externally to WordStar (requires ULISTA and ULSTI ;subroutines below). ; 058F LXOFF:: ;Printer XON/XOFF protocol. 058F 00 DB FALSE 0590 LETX:: ;Printer ETX/ACK protocol. 0590 00 DB FALSE 0591 LCHRMX:: ;Maximum chars before sending ETX. 0591 80 DB 128 ;Half of buffer size. ; ;User list device output subroutines are used if the normal systems list ;device is not to be used. The user subroutine overrides the LSTDEV ;selection below. ; 0592 ULOSTA:: 0592 00 NOP ;User list output status subroutine. 0593 00 NOP ;Normally NOP, or JMP to your own 0594 C9 RET ;subroutine. Must return 0 in AL if ;list device is busy, 0FFH if idle. 0595 ULSTO:: 0595 00 NOP ;User list output subroutine. 0596 00 NOP ;Normally NOP, or JMP to your own 0597 C9 RET ;subroutine. Subroutine receives the ;character in AL. ; ;User list input subroutines are used if either XON/XOFF or ETX/ACK ;protocols are used to indicate when the printer is busy. ; 0598 ULISTA:: 0598 00 NOP ;User list input status subroutine. 0599 00 NOP ;Normally NOP, or JMP to your own 059A C9 RET ;subroutine if LXOFF or LETX is TRUE. ;Must return 0 in AL if no char pending. 059B ULSTI:: 059B 00 NOP ;User list input subroutine. 059C 00 NOP ;Normally NOP, or JMP to your own 059D C9 RET ;subroutine if LXOFF or LETX is TRUE. ;Returns character in AL. ; ;Printer Output Selection ; ;When WordStar prints, it sends its output to one of the devices specified ;with LSTDEV. ; ; 00H = TTY device ; 01H = CRT device ; 02H = LPT device ; 03H = UL1 device ; FFH = Default LST device ; 059E LSTDEV:: 059E FF DB 0FFH ;Use LST device ; ;Before printing, WordStar will call ULPORT below to allow for custom ;print output redirection. A pointer to the name of the printer (null ;terminated, all capital letters) will be passed to the subroutine in HL. ;It is up to this subroutine to then route the printer output to the ;appropriate output port by whatever means is available to it. ; 059F ULPORT:: 059F 00 NOP ;Normally NOP if no redirection to be done. 05A0 00 NOP ;Change to JMP to your own subroutine. 05A1 C9 RET ; ;The user list device uninitialize routine is called after printing is ;completed, and can be used to restore the printer state for non-WordStar ;applications. ; 05A2 ULUNPT:: 05A2 00 NOP 05A3 00 NOP 05A4 C9 RET ; ;The ULINI string is sent to the list device after ULPORT is executed ;and before the document is printed. ; 05A5 ULINI:: ;User list device initialize string 05A5 00 DB 0 05A6 00 00 00 00 DB 0,0,0,0,0,0,0,0,0 05AA 00 00 00 00 05AE 00 ; ;The ULUNI string is sent to the list device after the document is ;printed and before the ULUNPT routine is executed. ; 05AF ULUNI:: ;User list device uninitialize routine 05AF 00 DB 0 05B0 00 00 00 00 DB 0,0,0,0,0,0,0,0,0 05B4 00 00 00 00 05B8 00 ; ;When WordStar begins printing, space is allocated for the three header and ;three footer lines. HFMAX determines how much space to allocate. ; 05B9 HFMAX:: 05B9 0064 DW 100 ;Up to 100 characters per header or footer ; ;DATSEP is used while merge printing to separate one data item from ;another in the data file. ; 05BB DATSEP:: ;Comma 05BB 2C DB ',' ; ;DLIST is the list output delay. Every time a character is output to ;the printer, this delay is used. ; 05BC DLIST:: 05BC 00 DB 0 ;No delay ; ;Custom Printer Control Strings: These strings are sent to the printer ;when the custom print control characters, ^Q, ^W, ^E, or ^R are ;encountered in text being printed. They can be used to invoke special ;printer functions not controlled by the standard driver, such as expanded ;or compressed modes of printing. ; ;Note that some drivers may interfere or override the custom print controls ;you have defined. In this case, use a generic driver such as DRAFT or ;CUSTOM. ; ;A fixed length of 25 bytes is reserved for each string, where the ;first byte is the count of characters to be sent to the printer, and ;the following bytes (up to 5) are the characters to be sent. If ;longer strings are required, the first byte can be -1, followed by a ;two byte address pointing into a patch area, where the actual count ;and string can be found. ; 05BD UPRCTL:: ;Custom Print Controls 05BD 00 UPRQ:: DB 0 ;^Q, length 05BE 00 00 00 00 DB 0,0,0,0,0,0 ; string of up to 24 characters 05C2 00 00 05C4 00 00 00 00 DB 0,0,0,0,0,0 05C8 00 00 05CA 00 00 00 00 DB 0,0,0,0,0,0 05CE 00 00 05D0 00 00 00 00 DB 0,0,0,0,0,0 05D4 00 00 ; 05D6 00 UPRW:: DB 0 ;^W 05D7 00 00 00 00 DB 0,0,0,0,0,0 05DB 00 00 05DD 00 00 00 00 DB 0,0,0,0,0,0 05E1 00 00 05E3 00 00 00 00 DB 0,0,0,0,0,0 05E7 00 00 05E9 00 00 00 00 DB 0,0,0,0,0,0 05ED 00 00 ; 05EF 00 UPRE:: DB 0 ;^E 05F0 00 00 00 00 DB 0,0,0,0,0,0 05F4 00 00 05F6 00 00 00 00 DB 0,0,0,0,0,0 05FA 00 00 05FC 00 00 00 00 DB 0,0,0,0,0,0 0600 00 00 0602 00 00 00 00 DB 0,0,0,0,0,0 0606 00 00 ; 0608 00 UPRR:: DB 0 ;^R 0609 00 00 00 00 DB 0,0,0,0,0,0 060D 00 00 060F 00 00 00 00 DB 0,0,0,0,0,0 0613 00 00 0615 00 00 00 00 DB 0,0,0,0,0,0 0619 00 00 061B 00 00 00 00 DB 0,0,0,0,0,0 061F 00 00 ; ;Strike-out character ; 0621 STKCHR:: 0621 2D DB '-' ;Strike out character ; ;If PFFEED above is TRUE, or you specifically tell WordStar to use form feeds ;during printing, the following string is sent to the printer to eject the ;paper to the next page. All printer drivers use this string. ; 0622 01 FORMF:: DB 1 ;^L 0623 0C DB FFEED 0624 00 00 00 00 DB 0,0,0,0,0 0628 00 0629 00 00 00 00 DB 0,0,0,0,0,0 062D 00 00 062F 00 00 00 00 DB 0,0,0,0,0,0 0633 00 00 0635 00 00 00 00 DB 0,0,0,0,0,0 0639 00 00 ; ;This is 128 bytes set aside for printer subroutines. ;This area is also used for print control strings for the CUSTOM ;printer driver. ; 063B PRNPAT:: 063B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 063F 0000 0000 0643 0000 0000 0647 0000 0000 064B 0000 0000 064F 0000 0000 0653 0000 0000 0657 0000 0000 065B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 065F 0000 0000 0663 0000 0000 0667 0000 0000 066B 0000 0000 066F 0000 0000 0673 0000 0000 0677 0000 0000 067B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 067F 0000 0000 0683 0000 0000 0687 0000 0000 068B 0000 0000 068F 0000 0000 0693 0000 0000 0697 0000 0000 069B 0000 0000 DW 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 069F 0000 0000 06A3 0000 0000 06A7 0000 0000 06AB 0000 0000 06AF 0000 0000 06B3 0000 0000 06B7 0000 0000 ; ;If non-standard initialization parameters are used, the ;following identification string can be displayed at ;sign-on. Up to 40 bytes are available for the string, ;including the null terminator. ; 06BB INITID:: 06BB 00 DB 0 ;No ID if standard 06BC 20 20 20 20 DB ' ' 06C0 20 20 20 20 06C4 20 20 20 20 06C8 20 20 20 20 06CC 20 20 20 06CF 20 20 20 20 DB ' ' 06D3 20 20 20 20 06D7 20 20 20 20 06DB 20 20 20 20 06DF 20 20 20 20 ; ;Legal Drives ; ;Note that the first drive is assumed to be the default drive where any ;special files are located such as the WSMSGS.OVR file. The drives listed ;should be reduced to the ones that are actually in use on the system ;upon which WordStar is running. ; ;If the most significant bit of the drive letter is set to 1, WordStar ;will assume that the drive is non-removable. A disk reset will not ;be done when non-removable drives are logged. ; 06E3 LGLDRV:: 06E3 41 42 43 44 DB 'ABCDEFGHIJKLMNOP',0 ;Every legal drive 06E7 45 46 47 48 06EB 49 4A 4B 4C 06EF 4D 4E 4F 50 06F3 00 ; ;Legal User Numbers ; ;Some CP/M operating systems can support user numbers from 0 to 15, ;others support 0 to 31. Also, a user can be prevented from accessing ;other user numbers if zero. ; 06F4 LGLUSR:: 06F4 10 DB 16 ;Sixteen user numbers from 0 to 15 ; ;WordStar uses several files. Their names are specified here. WordStar ;uses the following search pattern to try to find the file: ; ; 1. Look on the current drive and user. ; 2. Default user (DEFUSR) on the current drive. ; 3. Current user on the default drive. ; 4. Default user on the default drive. ; ;If the drive byte of the filename is non-zero, it should be set to a ;number 1 through 16 representing drives A through P respectively. In ;this case, WordStar will look only on the specified drive and the ;DEFUSR user number for the file. ; 06F5 MSFILE:: ;Message file 06F5 00 57 53 4D DB 0,'WSMSGS OVR' 06F9 53 47 53 20 06FD 20 4F 56 52 0701 HPFILE:: ;Help messages file 0701 00 57 53 48 DB 0,'WSHELP OVR' 0705 45 4C 50 20 0709 20 4F 56 52 070D FF DB 0FFH ;Zero if never to search for help 070E IXFILE:: ;Indexer exclusion word list filename 070E 00 57 53 49 DB 0,'WSINDEX XCL' 0712 4E 44 45 58 0716 20 58 43 4C 071A LDFILE:: ;Load file for overlays 071A 00 57 53 20 DB 0,'WS OVR' 071E 20 20 20 20 0722 20 4F 56 52 0726 OVFILE:: ;Print driver overlays 0726 00 57 53 50 DB 0,'WSPRINT OVR' 072A 52 49 4E 54 072E 20 4F 56 52 0732 WSFILE:: ;File containing WordStar (after running pgm) 0732 00 57 53 20 DB 0,'WS COM' 0736 20 20 20 20 073A 20 43 4F 4D 073E SHFILE:: ;Shorthand file 073E 00 57 53 53 DB 0,'WSSHORT OVR' 0742 48 4F 52 54 0746 20 4F 56 52 ; ;If WordStar does not find its own files (WS.COM, WS.OVR...) on the ;logged user, it will look for them on the default user. ; 074A DEFUSR:: 074A 00 DB 0 ;Default user number for system files ;Set to 0-16 or 0-31 (depends on LGLUSR), ; or -1 to defeat ; ;When you use the S command at the Opening Menu, this is the spelling ;check command that is used. If you want WordStar to prompt for the ;document to be checked and then automatically append it to this command, ;set SPFILE non-zero. ; 074B 02 SPCMD:: DB 2 ;Five letters in command 074C 54 57 DB 'TW' ;Run The WORD Plus 074E 00 00 00 00 DB 0,0,0,0,0 ;Spare bytes for longer commands 0752 00 0753 00 00 00 00 DB 0,0,0,0,0 0757 00 0758 FF SPFILE::DB 0FFH ;Automatically ask ; ;When you run a program at the Opening Menu, WordStar first tries to find ;the COM file in the current drive and user, then in this drive and user. ;The default is to look on drive A, user 0. ; 0759 01 URUN:: DB 1 ;Drive code (0=disabled, 1=A, 2=B, ...) 075A 00 DB 0 ;User number ; ;INILOG allows the user to specify a drive and user number for WordStar to ;log onto at start up time. The first byte is a character count, the ;following bytes (up to three) can contain a drive name (A-P) and user ;number (0-31). ; 075B INILOG:: 075B 00 DB 0 075C 00 00 00 DB 0,0,0 ; ;WordStar creates backup and temporary files. The following ;are the file types to be used for them. ; 075F BAKTYP:: ;Type for backup files 075F 42 41 4B DB 'BAK' 0762 BFTYPE:: 0762 24 42 24 DB '$B$' ;File type of temporary file before memory 0765 AFTYPE:: 0765 24 41 24 DB '$A$' ;File type of temporary file after memory 0768 BLKTYP:: 0768 24 43 24 DB '$C$' ;Type for block move/copy buffer file ; ;When the directory is displayed, file types from this table ;are suppressed. Question marks may be used as wild cards to ;match any character. ; 076B NOTYPE:: ;File types to be ommitted from directories 076B 43 4F 4D DB 'COM' ;Command files 076E 4F 56 52 DB 'OVR' ;Overlays 0771 24 3F 24 DB '$?$' ;WordStar temporary files 0774 00 00 00 DB 0,0,0 0777 00 00 00 DB 0,0,0 077A 00 00 00 DB 0,0,0 077D 00 00 00 DB 0,0,0 0780 00 00 00 DB 0,0,0 0783 00 DB 0 ;End of table ; ;DIRFIL is a file name "image" that is used in conjunction with NOTYPE (above) ;to determine which files are to be displayed in WordStar's directories. ;DIRFIL determines which files can possibly be included, and NOTYPE then ;eliminates certain types of files. Use a question mark in DIRFIL at each ;spot where any file name character can match. ; 0784 DIRFIL:: 0784 3F 3F 3F 3F DB "???????????" ;All files match 0788 3F 3F 3F 3F 078C 3F 3F 3F ; ;The name of the file to be edited can be specified at the operating system ;prompt. ININON indicates whether the file should be edited as a document ;or nondocument. ; 078F ININON:: 078F 00 DB FALSE ;Not non-document from command line ; ;WordStar normally makes BAK backup files every time you save your work. ;INITBAK can be used to disable backups by setting it FALSE. ; 0790 INIBAK:: 0790 FF DB TRUE ;Make backups ; ;When a nondocument is edited, WordStar will decide how to expand tabs ;(ASCII 09H), and whether or not to use auto-indenting by looking in this ;table. ; ;There is a special case of the tab masks shown below. When the most ;significant bit of the tab mask is set to 1, WordStar will assume that ;you want to use variable tabbing. When the tab key is typed, instead ;of inserting an ASCII 09H into the file, spaces will be entered up to ;the next tab stop. The tab stops used are in the INIRLR table. An ;ASCII 09H can still be entered in this mode, however, by typing ^PI. ; 0791 EDCOND:: ;Edit conditions for specific file types 0791 50 41 53 01 DB 'PAS',00000001B,TRUE ;File extension, followed by a 0795 FF 0796 50 4C 49 03 DB 'PLI',00000011B,TRUE ;binary tab mask (e.g. a mask of 079A FF 079B 43 20 20 03 DB 'C ',00000011B,TRUE ;00000111B expands tab characters 079F FF 07A0 48 20 20 03 DB 'H ',00000011B,TRUE ;to every 8th column), followed by 07A4 FF ;TRUE if auto-indent is turned on. 07A5 00 00 00 07 DB 0,0,0,00000111B,FALSE ;End of table with defaults if file 07A9 00 ;type doesn't match above 07AA 00 00 00 00 DB 0,0,0,0,0 ;Room for four more 07AE 00 07AF 00 00 00 00 DB 0,0,0,0,0 07B3 00 07B4 00 00 00 00 DB 0,0,0,0,0 07B8 00 07B9 00 00 00 00 DB 0,0,0,0,0 07BD 00 ; ;WordStar normally only considers alphabetic or numeric characters ;as being within a "word". If other characters are legally part ;or a word too, then the bit for the corresponding character code in ;the following table must be set to a 1. ; ;There are 256 bits in the table to allow for 8-bit character sets. ;The default table has the bits set for the numbers "0" through "9" ;(ASCII codes of 30H through 39H), for the upper case letters ;"A" through "Z" (41H through 5AH), and the lower case letters "a" ;through "z" (61H through 7AH). Since the ASCII codes are only ;seven bits, the corresponding codes with the eighth bit set are ;also legal. ; 07BE LGLCHR::; 01234567 89ABCDEF 07BE 00 00 DB 00000000B,00000000B ;Codes 00H to 0FH 07C0 00 00 DB 00000000B,00000000B ;Codes 10H to 1FH 07C2 00 00 DB 00000000B,00000000B ;Codes 20H to 2FH 07C4 00 00 DB 00000000B,00000000B ;Codes 30H to 3FH 07C6 7F FF DB 01111111B,11111111B ;Codes 40H to 4FH 07C8 FF E0 DB 11111111B,11100000B ;Codes 50H to 5FH 07CA 7F FF DB 01111111B,11111111B ;Codes 60H to 6FH 07CC FF E0 DB 11111111B,11100000B ;Codes 70H to 7FH 07CE 00 00 DB 00000000B,00000000B ;Codes 80H to 8FH 07D0 00 00 DB 00000000B,00000000B ;Codes 90H to 9FH 07D2 00 00 DB 00000000B,00000000B ;Codes A0H to AFH 07D4 00 00 DB 00000000B,00000000B ;Codes B0H to BFH 07D6 7F FF DB 01111111B,11111111B ;Codes C0H to CFH 07D8 FF E0 DB 11111111B,11100000B ;Codes D0H to DFH 07DA 7F FF DB 01111111B,11111111B ;Codes E0H to EFH 07DC FF E0 DB 11111111B,11100000B ;Codes F0H to FFH ; ;When you use ^A or ^F to move a word at a time, WordStar uses the ;following table to determine which characters to skip. It is organized ;in the same manner as LGLCHR above. ; 07DE MOVCHR::; 01234567 89ABCDEF 07DE FF 92 DB 11111111B,10010010B ;Codes 00H to 0FH 07E0 FB C3 DB 11111011B,11000011B ;Codes 10H to 1FH 07E2 3F F5 DB 00111111B,11110101B ;Codes 20H to 2FH 07E4 FF CE DB 11111111B,11001110B ;Codes 30H to 3FH 07E6 FF FF DB 11111111B,11111111B ;Codes 40H to 4FH 07E8 FF FF DB 11111111B,11111111B ;Codes 50H to 5FH 07EA FF FF DB 11111111B,11111111B ;Codes 60H to 6FH 07EC FF FE DB 11111111B,11111110B ;Codes 70H to 7FH 07EE FF 92 DB 11111111B,10010010B ;Codes 80H to 8FH 07F0 FB C3 DB 11111011B,11000011B ;Codes 90H to 9FH 07F2 3F F5 DB 00111111B,11110101B ;Codes A0H to AFH 07F4 FF CE DB 11111111B,11001110B ;Codes B0H to BFH 07F6 FF FF DB 11111111B,11111111B ;Codes C0H to CFH 07F8 FF FF DB 11111111B,11111111B ;Codes D0H to DFH 07FA FF FF DB 11111111B,11111111B ;Codes E0H to EFH 07FC FF FE DB 11111111B,11111110B ;Codes F0H to FFH ; ;Certain special characters can be inserted into this table to cause ;WordStar to automatically generate a backspace character (^H) preceding ;the character as you type. This can be especially useful for accent ;characters in some foreign languages. ; 07FE AUTOBS:: ;Automatic backspace table 07FE 00 DB 0 ;Number of characters in table 07FF 00 00 00 00 DB 0,0,0,0 ;Up to 8 character codes 0803 00 00 00 00 DB 0,0,0,0 ; ;When WordStar gets a file for editing, it will use the following ;initial conditions. ; 0807 INIDOC:: ;Document initializations 0807 03 DB 3 ;Top of page margin. 0808 08 DB 8 ;Bottom of page margin. 0809 42 DB 66 ;Total lines per page. 080A 0001 DW 1 ;Initial page number (note 2 bytes). 080C FF DB TRUE ;Page number prints at bottom of page ;if TRUE. No page number if FALSE. 080D 1C DB 28 ;Column where page number prints. 080E 02 DB 2 ;Heading margin. This is the number of lines ;above the text where the heading is to print. 080F 02 DB 2 ;Footing margin. This is the number of lines ;below the text where the footing is to print. 0810 07 DB 00000111B ;Default document tab mask (must be ;binary, 00000000B through 01111111B). 0811 08 DB 8 ;Left column where printing starts. 0812 FF DB TRUE ;Bidirectional printing if TRUE. Just ;unidirectional or printer controlled ;if FALSE. (Many printers do not allow ;software control of print direction). 0813 FF DB TRUE ;Letter quality printing if TRUE. Draft ;quality if FALSE. (Only supported on ;some printers.) 0814 02 DB 2 ;Microjustified printing. 0 turns it off, ;1 turns it on, and 2 makes it discretionary ;(depending on the printer driver in use). 0815 00 DB FALSE ;Underline blanks between words if TRUE. ;NOTE: Not implemented for all printers. 0816 0C DB 12 ;Standard character width (in HMI units). ;The printer is reset to this when done ;printing. 0817 08 DB 8 ;Standard line height (in VMI units). The ;printer is reset to this after .LH dot ;commands. It is also used to determine ;the page size in VMI units by multiplying ;by the lines per page above. 0818 0C DB 12 ;Character width (in HMI units) ;for normal pitch. If HMI is 120, ten pitch ;is 12/120, twelve pitch is 10/120. 0819 0A DB 10 ;Character width for alternate pitch (use ;^PA to select alternate pitch while editing). 081A 03 DB 3 ;Subscript and superscript roll (in VMI ;units). This value determines how ;far up or down the carriage moves when ;subscripting or superscripting. 081B 08 DB 8 ;Line height (in VMI units). This value ;determines how far to roll the carriage ;to get to the next line. ; ;The default ruler line can be described by defining the following values. ;Note that the tab stop tables must contain values in ascending order only. ;The regular tab stops are put in the table first, immediately followed by ;the decimal tabs. ; 081C INIRLR:: ;Ruler data 081C 01 DB 1 ;Left ruler margin 081D 41 DB 65 ;Right ruler margin 081E 00 DB 0 ;Paragraph margin 081F 0B DB 11 ;Eleven tabs 0820 06 0B 10 15 DB 6,11,16,21 ;Tab stops 0824 1A 1F 24 29 DB 26,31,36,41 ;(Must be in 0828 2E 33 38 DB 46,51,56 ;ascending order) 082B 00 00 00 00 DB 0,0,0,0 ;Space for 4 more 082F 00 DB 0 ;No decimal tabs 0830 00 00 00 00 DB 0,0,0,0,0,0 ;Space for 6 0834 00 00 002F inisiz EQU $-INIDOC ;Size of document initialization ; ;INIRLI determines whether the ruler line is re-initialized from INIRLR each ;time any document is edited. If INIRLI is FALSE, you can change the initial ;ruler line with ^OL, ^OR, ^OI, and ^ON commands, and have those changes ;be used for every document edited until you exit WordStar. ; 0836 INIRLI:: 0836 FF DB TRUE ;Initialize ruler for each document ; ;As you move through a document, WordStar executes some of the dot commands, ;like .RR ruler line commands, as they are encountered. As WordStar moves ;forward through the text, the old ruler line is stored in memory so that it ;can be restored when you move backwards over the .RR later. Other dot ;commands work in a similar manner. ; ;DSTKSZ is used to allocate storage for the dot commands. While you are ;editing, WordStar puts a Dot-Limit indicator in the status line if you ;use too many dot commands. ; ; Dot Command Size ; .RR 26 ; .RM .LM .LH .PL 1 ; .MT .MB 1 ; .PN 2 ; 0837 DSTKSZ:: 0837 01F4 DW 500 ;Room for 19 .RR commands or 500 .RM & .LM ; ;INIDIR determines whether the directory is initially displayed or not. ;DIRSRT tells WordStar whether or not to sort directories in alphabetical ;order before displaying them. ; 0839 INIDIR:: 0839 FF DB TRUE ;Directory on 083A DIRSRT:: 083A FF DB TRUE ;Sort directory in alphabetical order ; ;INIHLP is the default help level. It can have a value from 0 to 3. ; 083B INIHLP:: 083B 03 DB 3 ;Maximum help level at start ; ;When editing, the last erasure can be undone with ^U. UNONE determines ;whether single character erasures with ^G and DEL can also be undone. ; ;UNSIZE is the maximum erasure that can later be undone. The unerase ;buffer shares the same memory space as the text you are editing. Making ;UNSIZE very large may cause WordStar to "spill over" to disk more ;frequently, slowing down editing. ; 083C UNONE:: ;Don't unerase single characters 083C 00 DB FALSE 083D UNSIZE:: 083D 01F4 DW 500 ;Maximum unerase size ; ;VMSIZE indicates the number of 128-byte records that can be read from ;the disk for WordStar's messages and menus. ; 083F VMSIZE:: 083F 04 DB 4 ;Four records (.5k byte) ; ;EDSIZE indicates the minimum number of records of edit buffer required ;to edit a document properly. WordStar must be able to keep a whole ;page in memory to determine page breaks and line numbers correctly. ;Less memory can sometimes be used with occasional strange results. ;(Non-documents are automatically allocated a minimum of 6 records.) ; 0840 EDSIZE:: 0840 1C DB 28 ;Enough memory for an average full page ; ;BFSIZE is the number of 128-byte records that WordStar uses for its ;general purpose buffer. There is a different buffer allocation for ;editing, the Opening Menu, and for merge printing. ; ;This buffer is used for: ; ; - File directories (each file uses 11 bytes), ; - Printer driver directory (each driver uses 11 bytes and 256 ; bytes are used for buffering), ; - File copies, ; - Block reads and writes, ; - Merge printing. ; 0841 BFSIZE:: 0841 10 DB 16 ;Edit buffer size (16 records = 2k) ;(Minimum is 1 record) 0842 10 DB 16 ;Opening menu buffer size ;(Minimum is 3 records) 0843 10 DB 16 ;Merge print buffer size ;(Minimum is 1 record) ; ;If a document becomes too large to fit in memory at one time, WordStar ;begins to "spill" the excess to the disk. TYSIZE determines how many ;128-bytes records to use for each spillover. Picking a correct size ;is important but can usually be done by trial and error. If TYSIZE is ;too large, you may see long delays during scrolling or typing when memory ;fills. ; 0844 TYSIZE:: 0844 10 DB 16 ;Number records read or stored while typing 0845 00 00 00 00 DB 0,0,0,0 ;Reserved ; ;A "find" or "find and replace" uses the INIFIN options if you do not ;explicitly enter any at the "Options?" prompt. The possible options ;that can be used are: ; ; W whole words only ; U ignore case ; B backwards search ; G whole file ; R rest of file ; N replace without asking ; ;Blank the unused options. ; 0849 INIFIN:: 0849 20 20 20 20 DB ' ' ;No options 084D 20 20 ; ;The status line is usually displayed at the top of the screen. ;INISTA lets you always turn it off. STFILL specifies what character ;to use to fill unused space in the status line. ; 084F INISTA:: 084F FF DB TRUE ;Display status line 0850 STFILL:: 0850 20 DB ' ' ;Fill with blanks ; ;When paragraphs are aligned with ^B or ^QU and hyphen help is on, HYMAX ;is used to determine when to ask the user to hyphenate a word. ; 0851 HYMAX:: 0851 05 DB 5 ;Ask user when the word extends more than 5 ;characters past the right margin ; ;When WordStar asks a question that requires a Y for yes or N for no response, ;YNCR indicates whether or not the user must push the RETURN key before ;WordStar will accept it. ; 0852 YNCR:: 0852 00 DB FALSE ;Don't wait for RETURN key ; ;WordStar can index every word in a document as well as selected words and ;phrases. IDXALL determines whether this is the default or not. ; 0853 IDXALL:: 0853 00 DB FALSE ;Don't index every word ; ;Using ^B or ^QU in a nondocument normally strips the eighth bit from ;each character in a line. STRPFL can disable stripping. ; 0854 STRPFL:: 0854 FF DB TRUE ;Stripping is enabled ; ;Editor Entry Conditions ; 0855 INIEDT:: 0855 FF DB TRUE ;Right justification when typing 0856 FF DB TRUE ;Word wrap when typing at end of line 0857 FF DB TRUE ;Insert on 0858 FF DB TRUE ;Print controls displayed 0859 00 DB FALSE ;No hyphen help 085A FF DB TRUE ;Ruler displayed 085B 00 DB FALSE ;Block column mode off 085C 00 DB FALSE ;Block column replace mode off 085D 01 DB 1 ;Single spacing 085E 02 DB 2 ;Scrolling speed 085F 00 DB FALSE ;Proportional spacing off 0860 00 DB FALSE ;Soft space not displayed 0861 00 00 00 DB 0,0,0 ;Reserved ; 000F iniesz EQU $-INIEDT ;Size of editor conditions ; ;The following are special characters that affect how numbers are ;evaluated and dispayed. ; 0864 COMCHR:: 0864 2C DB ',' ;Comma to separate 1,000's 0865 DECCHR:: 0865 2E DB '.' ;Decimal point ; ;The following flags are used to control the way WordStar processes ;certain commands. CTLNFL and CTLHFL are provided primarily to allow ;WordStar 3.3 users to use ^N and ^H in the same way as they are accustomed. ; 0866 CTLNFL:: 0866 FF DB TRUE ;Set non-zero if ^N to break line and ;RETURN moves down a line when insert off. ;Set to zero so ^N converts paragraph lines ;and turns auto indent on/off for ;nondocuments, and RETURN always inserts CRLF. 0867 CTLHFL:: 0867 00 DB 0 ;Set non-zero if ^H to be same as ^S instead ;of DEL. 0868 CASEFL:: 0868 00 DB 0 ;Set non-zero if ^^ is case toggle. When ;zero and CLTNFL is non-zero, use as ;paragraph line and auto-indent on/off. 0869 DELFLG:: 0869 00 DB 0 ;Set non-zero if DEL erases to left, zero ;to erase to right (like ^G). 086A BLKFLG:: 086A FF DB 0FFH ;Set non-zero if the cursor should move ;to column 1 if the cursor is next to a block ;marker at the left edge of the screen 086B LSPFLG:: 086B 00 DB 0 ;Set non-zero if lines with soft carriage ;returns should not be added to paragraphs ;for line spacing other than 1 ; ;RLRVID allows the user to select video attributes used to highlight ;the ruler line. See VIDATT for bit definitions. ; 086C RLRVID:: 086C 00 DB 0 ;No ruler highlighting ; ;AHEAD indicates whether type ahead is allowed for ^E, ^X, ^W, ^Z, ;^G, DEL, ^T, ^Y, ^QY, and ^QDEL. If AHEAD is 0, WordStar's type ;ahead buffer will be flushed whenever one of the functions is ;encountered. If it is non-zero, no flushing will occur. This ;flag should be used primarily for external keyboard enhancers where ;the functions shown above are to be used. WordStar's function key ;and shorthand processing automatically compensate. ; 086D AHEAD:: 086D 00 DB 0 ;Flush ; ;Maximum size for the shorthand definitions. Should be optimized to ;match actual usage since it reduces the amount of memory available ;for text while editing and printing. The size of each definition ;is equal to 5 plus the number of characters defined. If this value ;is smaller than the size of the shorthand file (see SVFILE above), ;only some of the definitions will be used. Setting it to zero ;disables shorthand and makes the ESC key clear the screen instead. ; 086E HANMAX:: 086E 04 DB 4 ;Size of shorthand buffer in records ;(4 times 128 = 512 bytes) ; ;With shorthand you can insert the dollar-formatted results of the last ;math you performed. WordStar uses the format below when you do this. ;(Make sure that the character count includes the zero at the end.) ; 086F DOLLAR:: 086F 11 DB 17 ;Character count 0870 2D 2D 2C 2D DB '--,---,---,---.99' 0874 2D 2D 2C 2D 0878 2D 2D 2C 2D 087C 2D 2D 2E 39 0880 39 0881 00 00 00 DB 0,0,0 ;Spare 0884 00 00 00 00 DB 0,0,0,0,0,0,0,0 ;Reserved 0888 00 00 00 00 088C 00 00 00 00 DB 0,0,0,0,0,0,0,0 0890 00 00 00 00 ; ;EXTRA is a large buffer area for general patching. Some versions of ;the WINSTALL installation program use EXTRA. Whenever EXTRA is used, ;RAM1ST must be changed to point to the first available byte within EXTRA ;that is still available for WordStar's use. If all of EXTRA is used, ;RAM1ST should point to endpat. ; 0894 RAM1ST:: 0894 0896 DW EXTRA ;First location in EXTRA that WordStar can use ; 0896 EXTRA:: DS 512 ;Patch area 0A96 endpat:: ;End of patch area 0A96 08 0C 57 UDATE: DB 08,12,87 ;User area version date