WordStar (c) * user-patchable area documentation:


       Patc� location� fo� termina� contro� sequences� dela� value� an� �
       othe� miscellaneou� user-patchabl� area� a� liste� i� th� "USER1� �
       TERMINA� PATC� AREA� o� WordStar�� (3.� value� take� fro� IBM/MS-�
       DOӠ version�� bu� ar� th� sam� a� CP/M-8� version�� 3.�� value� �
       base� o� Kaypr� bundle� versio� o� 3.3�� bu� shoul� b� th� sam� �
       fo� generi� CP/M-8� versio� an� possibl� 16-bi� versio� a� well.)

       �� muc� faste� versio� o� WordSta� ca� b� mad� o� system� whic� �
       suppor� inser� an� delet� lin� (NO� th� sam� a� eras� line� �
       delet� erase� lin� an� the� scroll� u� th� followin� line� o� th� �
       screen)�� Lowerin� th� dela� value� (o� eliminatin� the� entirel� �
       whe� possible� wil� als� spee� u� scree� updat� tim� an� improv� �
       keyboar� response.

       Als� liste� i� � recommende� patc� (wit� sampl� code�� t� �
       implemen� printe� bus� statu� cal� fo� mos� CP/͠ system� whic� �
       hav� th� "LISTST� (lis� devic� status� functio� implemente� i� �
       thei� BIOӠ (no� al� BIO� imple- men� thi� functio� whic� i� �
       optional)�� Installin� thi� patc� o� system� whic� suppor� th� �
       LISTSԠ BIO� functio� wil� improv� keyboar� respons� TREMENDOUSL� �
       whe� printin� � fil� usin� th� W� prin� functio� whil� editin� a� �
       th� sam� time�� (Not� tha� i� m� example�� th� routin� start� a� �
       2D7� becaus� ther� i� cod� i� MORPA� fro� 2CB-2D6�� yo� ma� star� �
       th� cod� a� 2C� (v3.3� i� yo� hav� al� zeroe� ther� (n� cod� i� �
       MORPAT).)

       Ther� ar� othe� area� i� USER� patc� are� whic� ca� b� se� fro� �
       th� WordSta� option� men� o� WINSTALL�� an� mos� o� th� "USER4� �
       PRINTEҠ PATCȠ AREA�� ca� b� se� u� usin� th� selectio� o� � �
       printe� fro� th� standar� supporte� printe� men� and/o� settin� �
       u� usin� th� custo� set-u� routines.

       Fo� mor� information� consul� you� WordSta� v3.� referenc� manua� �
       appendi� � o� th� v3.� Installatio� Manual.

       Patch locations are one of five types:

          B = Byte value               F = Flag byte (00 or FF)
          J = JMP or NOP/NOP/RET       P = Patch space (00 if unused)
          S = String (1 byte length value + string data area)

       (String� ar� store� wit� singl� byt� indicatin� length�� followe� �
       b�� strin� data�� Mak� lengt� � zer� fo� non-applicabl� contro� �
       sequence� whic� wil� the� b� don� usin� softwar� instea� o� �
       termina� hardware.)



       � (WordSta� i� � registere� trademar� o� MicroPr� International
          Corporation� Sa� Rafael� California)












         LABEL         3.2 ADDR        3.3 ADDR   LENGTH       TYPE
         =====         ========        ========   ======       ====

         HITE          248             232        1            B
         (Number of lines on screen)

         WID           249             233        1            B
         (Number of columns per line)

         CLEAD1        24A             234        9 (1+8)      S
         (Cursor addressing lead in)

         CLEAD2        253             23D        5 (1+4)      S
         (Character(s) separating row/col)

         CTRAIL        258             242        5 (1+4)      S
         (Ending character(s) for cursor address string)

         CB4LFG        25D             247        1            F
         (Column before line flag, 0=line/col, FF=col/line)

         LINOFF        25E             248        1            B
         (Line offset, 1st line=0)

         COLOFF        25F             249        1            B
         (Column offset, 1st column=0)

         ASCUR         260             24A        1            B
         (ASCII/binary cursor addr, 0=binary, 2=2 digit, 3=3 digits)

         ERAEOL        26D             250        7 (1+6)      S
         (Erase to end of line)

         LINDEL        274             257        7 (1+6)      S
         (Delete line)

         LININS        27B             25E        9 (1+8)      S
         (Insert line)

         IVON          284             267        7 (1+6)      S
         (Inverse video on)

         IVOFF         28B             26E        7 (1+6)      S
         (Inverse video off)

         TRMINI        292             275        9 (1+8)      S
         (Terminal initialization (clear screen usually))

         TRMUNI        29B             27E        9 (1+8)      S
         (Terminal de-initialization (also clear screen usually))

         INISUB        2A4             287        3            J
         (NOP/NOP/RET or JMP to user initialization subroutine)












         LABEL         3.2 ADDR        3.3 ADDR   LENGTH       TYPE
         =====         ========        ========   ======       ====

         UNISUB        2A7             28A        3            J
         (NOP/NOP/RET or JMP to user de-initialization subroutine)

         USELST        2AA             28D        1            F
         (Use last line on CRT, 00=don't, FF=OK) (usually 00)

         DELCUS        2AE             28E        1            B
         (Delay after cursor addressing) (appox. # of MSECs)

         DELMIS        2AF             28F        1            B
         (Delay after other misc. functions) (appox. # of MSECs)

         UCNSTA        2BA             29A        3            J
         (0/NOP/RET or JMP to user console status routine)

         UCONI         2BD             29D        3            J
         (0/NOP/RET or JMP to user console input routine)

         UCONO         2C0             2A0        3            J
         (0/NOP/RET or JMP to user console output routine)

         DEL1          2CF             2AF        1            B
         (short delay: cursor blink "on" portion of cycle during replace)

         DEL2          2D0             2B0        1            B
         (medium-short delay: cursor blink "off" portion of cycle)

         DEL3          2D1             2B1        1            B
         (medium-long delay: prefix key till menu, delay till filename help)

         DEL4          2D2             2B2        1            B
         (long delay: time messages displayed, pause for screen refresh)

         DEL5          2D3             2B3        1            B
         (horizontal scrolling keystroke delay)

         SCRLSZ        2DD             2BA        1            B
         (horizontal scrolling scroll amount)

         MORPAT        2E0             2CB        256          P
         (area available for user patches)






















       Printer status routine:

       Implementin� thi� patc� fo� system� whic� suppor� th� LISTS� BIO� �
       functio� wil� improv� keyboar� an� printe� respons� tim� durin� �
       print� whil� editing�� (Se� note� abov� fo� mor� info.�� (Afte� �
       assemblin� th� patch� us� DD� t� overla� .HE� fil� ont� installe� �
       versio� o� WordStar�� the� us� � SAV� 6� WSNEW.CO� an� tes� i� �
       out�� (includin� editin� � fil� durin� print� befor� erasin� you� �
       origina� WS.CO͠ an� renamin� WSNEW.CO� t� WS.COM�� (B� sur� t� �
       sav� � backu� cop� o� th� original� maste� version� though...)

       ;
               ORG     02D7H   ; (in MORPAT area (USER1))
       ;
       ; (Area to use in MORPAT may be different, see notes above.)
       ;
       USRPST:                 ; (User printer status routine)
               LHLD    0001H   ; Get addr of JMP WBOOT in BIOS table
               LXI     D,42    ; +42 (decimal) gives JMP LISTST addr
               DAD     D       ; HL = addr of JMP LISTST
               LXI     B,USRP2 ; return addr after LISTST "call"
               PUSH    B       ; (push ret. addr on stack)
               PCHL            ; (JMP to HL location)
       USRP2:                  ; (return location)
               CPI     0FF     ; is printer ready?
               RZ              ; if so, return with carry = 0
               STC             ; else set carry flag
               RET             ; and return (printer busy/not ready)
       ;
       ;
               ORG     0718H   ; (in USER4 area)
       HAVBSY: DB      0FFH    ; set=FF to indicate have busy
       ;
               ORG     0719H   ; (in USER4 area)
       LIBSY:  JMP     USRPST  ; JMP to user status routine
       ;
               END
       ;