;*; Updated on 01-Apr-89 at 9:49 PM by Ami Bar-Yadin; edit time: 2:04:17
;***************************************************************************;
;                                                                           ;
;                    AlphaWRITE MESSAGE MODULE FOR USA                      ;
;                    (Main root)                                            ;
;                                                                           ;
; WRT:MSG400 to support Okidata 393 printer driver OK393                    ;
; as modified by Ami Bar-Yadin.
;                                                                           ;
;       label
;
;         9$:   Changed "user 2" to "subscript", "user 3" to "superscript"
;       115$,116$:  Changed to sync with 9$
;
;         9$:   Changed "type color" to "type justify"
;        86$:   List of justify modes
;        87$:   Justify prompt
;       61$:  UNCHANGED
;       118$-125$:  replaced color messages with justify messages
;               included LQ/utility mode and debug on/off toggles as
;               colors 6 and 7.
;               include Control shift as color 8.
;
;       126$:   added "-normal"   ("/select font 0-normal/")
;       127$:   added "-italics"
;       128$:   added "-graphics"
;
; special characters: 1=degree,2=paragraph,3=dagger,4=section,5=cent,
;       6=quarter,7=half,8=trademark,9=copyright,0=registered
;
;***************************************************************************;
;
       OBJNAM  WRT400.USA

;Macro to generate cursor position for display table
;
DEFINE  CURP    ROW,COL
       BYTE    ^D'ROW,^D'COL
ENDM

;Macro to generate text for display table
;
DEFINE  TXT     TEXT
       ASCII   ^TEXT^
       BYTE    0
ENDM

;Macro to generate keyword table
;
DEFINE  KWRD    KEY,TERM,VALU
       ASCII   !KEY!
       BYTE    TERM,VALU
ENDM

PAGE
;Define Pointer Table
;

       LWORD   MSGTBL                  ; points to message table
       LWORD   MNUTBL                  ; points to menu table
       LWORD   CMDTBL                  ; points to command table

PAGE
; Message table index
;
MSGTBL: WORD    1$
       WORD    2$
       WORD    3$
       WORD    4$
       WORD    5$
       WORD    6$
       WORD    7$
       WORD    8$
       WORD    9$
       WORD    10$
       WORD    11$
       WORD    12$
       WORD    13$
       WORD    14$
       WORD    15$
       WORD    16$
       WORD    17$
       WORD    18$
       WORD    19$
       WORD    20$
       WORD    21$
       WORD    22$
       WORD    23$
       WORD    24$
       WORD    25$
       WORD    26$
       WORD    27$
       WORD    28$
       WORD    29$
       WORD    30$
       WORD    31$
       WORD    32$
       WORD    33$
       WORD    34$
       WORD    35$
       WORD    36$
       WORD    37$
       WORD    38$
       WORD    39$
       WORD    40$
       WORD    41$
       WORD    42$
       WORD    43$
       WORD    44$
       WORD    45$
       WORD    46$
       WORD    47$
       WORD    48$
       WORD    49$
       WORD    50$
       WORD    51$
       WORD    52$
       WORD    53$
       WORD    54$
       WORD    55$
       WORD    56$
       WORD    57$
       WORD    58$
       WORD    59$
       WORD    60$
       WORD    61$
       WORD    62$
       WORD    63$
       WORD    64$
       WORD    65$
       WORD    66$
       WORD    67$
       WORD    68$
       WORD    69$
       WORD    70$
       WORD    71$
       WORD    72$
       WORD    73$
       WORD    74$
       WORD    75$
       WORD    76$
       WORD    77$
       WORD    78$
       WORD    79$
       WORD    80$
       WORD    81$
       WORD    82$
       WORD    83$
       WORD    84$
       WORD    85$
       WORD    86$
       WORD    87$
       WORD    88$
       WORD    89$
       WORD    90$
       WORD    91$
       WORD    92$
       WORD    93$
       WORD    94$
       WORD    95$
       WORD    96$
       WORD    97$
       WORD    98$
       WORD    99$
       WORD    100$
       WORD    101$
       WORD    102$                                                            ;[199]
       WORD    103$
       WORD    104$
       WORD    105$
       WORD    106$
       WORD    107$
       WORD    108$
       WORD    109$
       WORD    110$
       WORD    111$
       WORD    112$
       WORD    113$
       WORD    114$
       WORD    115$
       WORD    116$
       WORD    117$
       WORD    118$
       WORD    119$
       WORD    120$
       WORD    121$
       WORD    122$
       WORD    123$
       WORD    124$
       WORD    125$
       WORD    126$
       WORD    127$
       WORD    128$
       WORD    129$
       WORD    130$
       WORD    131$
       WORD    132$
       WORD    133$
       WORD    134$
       WORD    135$

; Message table
;
1$:     ASCIZ   /?Memory allocation failed/
2$:     ASCIZ   /?Improper SSD/
3$:     ASCIZ   /Enter command name and press RETURN:/
4$:     ASCIZ   /[ Press MENU key to return to text ]/
5$:     ASCIZ   / AlphaWRITE SEARCH COMMAND /
6$:     ASCIZ   /Not found/
7$:     ASCIZ   /[ Press any key to continue ]/
8$:     ASCIZ   /Product Installation Code = /
9$:     ASCII   /1 = bold,      2 = strikeout, 3 = overbar,   4 = overprint, 5 = dbl underscore/
       BYTE    15
       ASCII   /6 = type font, A = type justify, B = user 1, C = subscript, D = superscript, /
       BYTE    15
       ASCIZ   /E = user 4                                                /
10$:    ASCIZ   /   Enter code: /
11$:    ASCIZ   /Enter character to strikeout with: /
12$:    ASCIZ   /%WARNING - Line longer than/
13$:    ASCIZ   /characters in document/
14$:    ASCIZ   /incompatible overlay/
15$:    ASCIZ   /?Cannot alter display width on this terminal/
16$:    ASCII   /Word Ins/
       BYTE    ^H7F,0
17$:    ASCIZ   /Char /
18$:    ASCII   /Ovr/                           ; THIS CANNNOT EXCEED 3 CHARACTERS!!!!
       BYTE    ^H7F,0
19$:    ASCIZ   /Line /
20$:    ASCIZ   / AlphaWRITE /
21$:    ASCIZ   / EDITING MENU /
22$:    ASCIZ   /bytes in use, /
23$:    ASCIZ   /free./
24$:    ASCIZ   /Editing /
25$:    ASCIZ   /  Lpi     Lpp      Ltm      Ltxt      Lpo      Cpi     Rjst    Wspc    Lspc/
26$:    ASCIZ   /Do you wish to abandon your changes?/
27$:    ASCIZ   /  [ Press SPACE to stop scrolling, S to slow scrolling, F to make it faster ]/
28$:    ASCIZ   /margin/
29$:    ASCIZ   / /                     ; not used
30$:    ASCIZ   / /                     ; not used
31$:    ASCIZ   /strikeout/
32$:    ASCIZ   ! w/ space!
33$:    ASCIZ   / with /
34$:    ASCIZ   /?File error - /
35$:    ASCIZ   /Enter string:/
36$:    ASCIZ   /Locate the first occurrence of the following character string:/
37$:    ASCIZ   / AlphaWRITE REPLACE COMMAND /
38$:    ASCIZ   / AlphaWRITE GLOBAL REPLACE COMMAND /
39$:    ASCIZ   /Enter old string: /
40$:    ASCIZ   /Replace the character string: /
41$:    ASCIZ   /Replace all occurrences of the character string:/
42$:    ASCIZ   /Enter new string:/
43$:    ASCIZ   /with the character string:/
44$:    ASCIZ   /string replaced/
45$:    ASCIZ   /?Specified string was not found/
46$:    ASCIZ   /[ Press RETURN key when string has been entered ]/
47$:    ASCIZ   /footnote/
48$:    ASCIZ   /Enter page number:/
49$:    ASCIZ   / /                     ; not used
50$:    ASCIZ   /Enter type font number: /
51$:    ASCIZ   /[ PRESS ANY KEY to return to main menu ]/                     ;[177]
52$:    ASCII   /B = Top of F/                                                 ;[177]
       BYTE    057
       ASCII   /PAGE,    L = Top of L/
       BYTE    057
       ASCII   /PAGE,    UP ARROW   = Top of Current PAGE/
       BYTE    15
       ASCII   /F = Bottom of F/
       BYTE    057
       ASCII   /PAGE, E = Bottom of L/
       BYTE    057
       ASCIZ   /PAGE, DOWN ARROW = Bottom of Current PAGE/                    ;[177]
53$:    ASCIZ   /?Not able to get the memory for directory files!/
54$:    ASCIZ   /AlphaWRITE 1.2A is INITIALIZING!/
55$:    ASCIZ   /Phase - /
56$:    ASCIZ   /?Not able to delete Message overlay!/
57$:    ASCII   /Ins/                           ; THIS CANNOT EXCEED 3 CHARACTERS!!!!!
       BYTE    ^H7F,0
58$:    ASCIZ   /       Busy      /             ; clear by message 91$!!!!!
59$:    ASCIZ   /[ Press any key to exit this menu ]/
60$:    ASCIZ   /bold/
61$:    ASCIZ   /ribbon color std./
62$:    ASCIZ   /overprint/
63$:    ASCIZ   /required space/
64$:    ASCIZ   /overbar/
65$:    ASCIZ   /disc. hyphen/
66$:    ASCIZ   /underscore/
67$:    ASCIZ   /double underscore/
68$:    ASCIZ   /Bad reply/
69$:    ASCIZ   /Protected/
70$:    ASCIZ   /Too long/
71$:    ASCIZ   /No block marked/
72$:    ASCIZ   /Incorrect entry/
73$:    ASCIZ   /Bad page format/
74$:    ASCIZ   /Outline error/
75$:    ASCIZ   /?Unrecognized command - type HELP for more information/
76$:    ASCIZ   /Abandoning unchanged document/
77$:    ASCIZ   /?You must confirm with "YES" in order to QUIT/
78$:    ASCIZ   /?There is not enough MEMORY to complete the desired COMMAND/
79$:    ASCIZ   /?There is not enough MEMORY to load the desired FOOTNOTE/
80$:    ASCIZ   /[ Press "C" to try again or any other key to QUIT ]/
81$:    ASCIZ   /strings replaced/
82$:    ASCIZ   /No file opened/
83$:    ASCIZ   /Please wait ... /
84$:    ASCIZ   /[ Press MENU to abort this command ]/
85$:    ASCIZ   / - /
86$:    ASCII   /1 = Justify Off,     2 = Justify Left,    3 = Center,         4 = Right,   /
       BYTE    15
       ASCII   "5 = Justify Full,    6 = Utility mode,   7 = DEBUG mode,  8 = Control shift"
       BYTE    15,0
87$:    ASCIZ   /Enter (Okidata 393) Justification code: /
88$:    ASCIZ   /?This command is not supported while in FOOTNOTES/
89$:    ASCIZ   /Math error/
90$:    ASCIZ   /Not a number/
91$:    ASCIZ   /                 /             ; this clears message 58$!!!!!
92$:    ASCIZ   /Protected Block/
93$:    ASCIZ   /NO TABS/
94$:    ASCIZ   /?Replacement String contains Search String text/
95$:    ASCIZ   /[ Press any key to try again ]/
;
;       Note:   The Page Break line must be 78 characters including the null!
;               The first two characters of the Page Break line must not be
;               changed!!!!!
;
96$:    BYTE    310
       ASCII   "///////////////////////////////"       ; 31 CHARACTERS
       ASCII   " PAGE BREAK "                          ; 12 CHARACTERS
       ASCII   "///////////////////////////////"       ; 31 CHARACTERS
       BYTE    311,314,0
;
;       Note:   The Page Break search sequence must be the first two char of the above line!
;               These two characters must not be changed!!!!!
;
97$:
       BYTE    310
       ASCII   "/"
       BYTE    0
98$:    ASCIZ   /Pag     Lin      Col/
99$:    ASCIZ   /[ Press ESC key twice to terminate the FOOTNOTE command ]/                    ;[177]
100$:   ASCIZ   /?There is not enough MEMORY to continue this FOOTNOTE command/
101$:   ASCIZ   /LOW ON MEMORY/
102$:   ASCIZ   /?Possible page format error with title or footer/              ;[199]
103$:   ASCIZ   /[ PRESS ANY KEY to write out current document and return to main menu ]/  ;[177]
104$:   ASCIZ   /[ PRESS ANY KEY to return to the edit screen ]/                ;[201]
105$:   ASCIZ   /?There is not enough MEMORY to perform this command/           ;[201]
106$:   ASCIZ   /Too long (adj)/
107$:   ASCIZ   /[ Press ESC key twice to ABORT and return to main menu ]/
108$:   ASCIZ   /[ Press RETURN key to try again ]/
109$:   ASCIZ   /?Left margin is greater than Right margin/                     ;[202]
110$:   ASCIZ   /Overflow/
111$:   ASCIZ   /Underflow/
112$:   ASCIZ   /Divide by zero/
113$:   ASCIZ   /[ Reformatting Text - Please Wait ]/
114$:   ASCIZ   /user function 1/
115$:   ASCIZ   /user Subscript/
116$:   ASCIZ   /user Superscript/
117$:   ASCIZ   /user function 4/
118$:   ASCIZ   /Justify Off/           ; 0
119$:   ASCIZ   /Justify Left/          ; 1
120$:   ASCIZ   /Justify Center/        ; 2
121$:   ASCIZ   /Justify Right/         ; 3
122$:   ASCIZ   /Justify Full/          ; 4
123$:   ASCIZ   "LQ/Utility mode"       ; 5
124$:   ASCIZ   "DEBUG on/off"          ; 6
125$:   ASCIZ   /Control shift/         ; 7
126$:   ASCIZ   /select font 0-normal/
127$:   ASCIZ   /select font 1-italics/
128$:   ASCIZ   /select font 2-graphics/
129$:   ASCIZ   /select font 3/
130$:   ASCIZ   /select font 4/
131$:   ASCIZ   /select font 5/
132$:   ASCIZ   /select font 6/
133$:   ASCIZ   /select font 7/
134$:   ASCIZ   /select font 8/
135$:   ASCIZ   /select font 9/
       EVEN

PAGE
;Define Menu Text Used by Modules
;

MNUTBL: WORD    MN1                     ; pointer to menu 1
       WORD    MN2                     ; pointer to menu 2

MN1:    CURP    8,1
       TXT     <HELP>
       CURP    8,10
       TXT     <\- display help information>
       CURP    9,1
       TXT     <FINISH>
       CURP    9,10
       TXT     <\- write out current document>
       CURP    10,1
       TXT     <SAVE>
       CURP    10,10
       TXT     <\- update current document>
       CURP    11,1
       TXT     <QUIT>
       CURP    11,10
       TXT     <\- quit document w/o update>
       CURP    13,1
       TXT     <SEARCH>
       CURP    13,10
       TXT     <\- locate a string>
       CURP    14,1
       TXT     <REPLACE>
       CURP    14,10
       TXT     <\- replace a string>
       CURP    15,1
       TXT     <GLOBAL>
       CURP    15,10
       TXT     <\- replace all occurrences>
       CURP    17,1
       TXT     <HEADER>
       CURP    17,10
       TXT     <\- display header information>
       CURP    18,1
       TXT     <OUTLINE>
       CURP    18,10
       TXT     <\- change outline format>
       CURP    19,1
       TXT     <SORT>
       CURP    19,10
       TXT     <\- sort text>
       CURP    8,42
       TXT     <PAGINATE>
       CURP    8,52
       TXT     <\- re-paginate the document>
       CURP    9,42
       TXT     <PRINT>
       CURP    9,52
       TXT     <\- send document to printer>
       CURP    10,42
       TXT     <QUEUE>
       CURP    10,52
       TXT     <\- printer queue maintenance>
       CURP    11,42
       TXT     <SPELL>
       CURP    11,52
       TXT     <\- verify spelling>
       CURP    13,42
       TXT     <DIRECTORY>
       CURP    13,52
       TXT     <\- display list of documents>
       CURP    14,42
       TXT     <GLOSSARY>
       CURP    14,52
       TXT     <\- select a glossary file>
       CURP    16,42
       TXT     <CUT>
       CURP    16,52
       TXT     <\- copy text block to file>
       CURP    17,42
       TXT     <PASTE>
       CURP    17,52
       TXT     <\- insert file into document>
       CURP    18,42
       TXT     <WIDTH>
       CURP    18,52
       TXT     <\- change display width>
       CURP    19,42
       TXT     <MODE>
       CURP    19,52
       TXT     <\- set operating mode>
       CURP    21,1                    ; position for 'Enter function'
       BYTE    0                       ; no text
       BYTE    0                       ; end of table

MN2:    CURP    2.,1.
       TXT     <\Replace (|Y\es, |N\o, |C\enter, |Q\uit):>
       BYTE    0
       EVEN

PAGE
;Define Command Tables
;

CMDTBL: WORD    CM1                     ; pointer to command table 1
       WORD    CM2                     ; pointer to command table 2
       WORD    CM3                     ; pointer to command table 3
       WORD    CM4                     ; pointer to command table 4
       WORD    CM5                     ; pointer to command table 5
       WORD    CM6                     ; pointer to command table 6
       WORD    CM7                     ; pointer to command table 7
       WORD    CM8                     ; pointer to command table 8
       WORD    CM9                     ; pointer to command table 9
       WORD    CM10                    ; pointer to command table 10

CM1:    KWRD    <CUT>,          40,      1.
       KWRD    <DIRECTORY>,    40,      2.
       KWRD    <FINISH>,       40,      3.
       KWRD    <GLOBAL>,       40,      4.
       KWRD    <GLOSSARY>,     40,      5.
       KWRD    <HEADER>,       40,      6.
       KWRD    <HELP>,         40,      0.
       KWRD    <MODE>,         40,     19.
       KWRD    <OUTLINE>,      40,      7.
       KWRD    <PRINT>,        40,     10.
       KWRD    <PASTE>,        40,      9.
       KWRD    <PAGINATE>,     40,      8.
       KWRD    <REPLACE>,      40,     11.
       KWRD    <SEARCH>,       40,     14.
       KWRD    <SAVE>,         40,     12.
       KWRD    <SPELL>,        40,     13.
       KWRD    <SORT>,         40,     18.
       KWRD    <QUIT>,         40,     15.
       KWRD    <QUEUE>,        40,     17.
       KWRD    <WIDTH>,        40,     16.
       BYTE    0
       EVEN
;
;       Note:   Do not modify the following EMBEDDED (CM2:) commands!
;
CM2:    KWRD    <PAGE>,         40,      0.
       KWRD    <CPAGE>,        40,      1.
       KWRD    <TITLE>,        40,      2.
       KWRD    <FOOTER>,       40,      3.
       KWRD    <SETNUMBER>,    40,      4.
       KWRD    <ETITLE>,       40,      5.
       KWRD    <OTITLE>,       40,      6.
       KWRD    <EFOOTER>,      40,      7.
       KWRD    <OFOOTER>,      40,      8.
       KWRD    <NUMBER>,       40,      9.
       KWRD    <BIN>,          40,     10.
       KWRD    <OUT>,          40,     11.
       BYTE    0
       EVEN

CM3:    KWRD    <T>,    40,     0.      ; math "Total" column char
       KWRD    <C>,    40,     1.      ; math "Clear" totals char
       KWRD    <R>,    40,     2.      ; math total "Row" char
       BYTE    0
       EVEN

CM4:    KWRD    <Q>,    40,     0.      ; replace "Quit"
       KWRD    <C>,    40,     1.      ; replace "Center"
       BYTE    0
       EVEN

CM5:    KWRD    <B>,    40,     0.      ; footnote print type "B"
       KWRD    <E>,    40,     1.      ; footnote print type "E"
       BYTE    0
       EVEN

CM6:    KWRD    <E>,    40,     0.      ; encryption
       KWRD    <P>,    40,     1.      ; protected
       KWRD    <N>,    40,     2.      ; non-protected
       KWRD    <F>,    40,     3.      ; fixed
       KWRD    <V>,    40,     2.      ; variable
       KWRD    <P>,    40,     3.      ; proportional
       BYTE    0
       EVEN

CM7:    KWRD    <S>,    40,     0.      ; Set from previous margin
       KWRD    <L>,    40,     1.      ; Left tab
       KWRD    <R>,    40,     2.      ; Right tab
       KWRD    <C>,    40,     3.      ; Center tab
       KWRD    <D>,    40,     2.      ; Decimal tab
       KWRD    <P>,    40,     3.      ; period leader tab
       BYTE    0
       EVEN

CM8:    KWRD    <A>,    40,     0.      ; Accept word
       KWRD    <E>,    40,     1.      ; Edit the line
       KWRD    <R>,    40,     2.      ; Remember the word
       KWRD    <I>,    40,     3.      ; Insert into personal dictionary
       BYTE    0

CM9:    BYTE    'S                      ; Slow scroll character                 [194]
       BYTE    'F                      ; Fast scroll character                 [194]

CM10:   KWRD    <L>,    40,     0.      ; Top of last page
       KWRD    <E>,    40,     1.      ; Bottom of last page
       KWRD    <B>,    40,     2.      ; Top of 1st page
       KWRD    <F>,    40,     3.      ; Bottom of 1st page
       BYTE    0


       END