]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/DOS/DOSMES.ASM
1 ; SCCSID = @(#)dosmes.asm 1.7 85/10/23
2 ; SCCSID = @(#)dosmes.asm 1.7 85/10/23
4 ; Message file for Internationalized messages. There is
5 ; only one message here available for translation.
9 ; A000 version 4.00 Jan. 1988
24 CONSTANTS
SEGMENT WORD PUBLIC 'CONST'
26 PUBLIC UserNum
, OEMNum
27 Public DMES001S
,DMES001E
29 USERNUM
DW ?
; 24 bit user number
33 OEMNUM
DB 0 ; 8 bit OEM number
35 OEMNUM
DB 0FFH ; 8 bit OEM number
45 TABLE
SEGMENT BYTE PUBLIC 'TABLE'
50 ; The following table is used for DOS 3.3
51 ;DOS country and code page information is defined here for DOS 3.3.
52 ;The initial value for ccDosCountry is 1 (USA).
53 ;The initial value for ccDosCodepage is 850.
56 PUBLIC COUNTRY_CDPG
,UCASE_TAB
,FILE_UCASE_TAB
59 ; country and code page infomation
61 COUNTRY_CDPG
label byte
63 db 0,0,0,0,0,0,0,0 ; reserved words
64 db '\COUNTRY.SYS',0 ; path name of country.sys
66 dw 437 ; system code page id
67 dw 6 ; number of entries
68 db SetUcase
; Ucase type
69 dw OFFSET DOSGROUP
:UCASE_TAB
;pointer to upper case table
70 dw 0 ; segment of poiter
71 db SetUcaseFile
; Ucase file char type
72 dw OFFSET DOSGROUP
:FILE_UCASE_TAB
;pointer to file upper case table
73 dw 0 ; segment of poiter
74 db SetFileList
; valid file chars type
75 dw OFFSET DOSGROUP
:FILE_CHAR_TAB
;pointer to valid file char tab
76 dw 0 ; segment of poiter
77 db SetCollate
; collate type
78 dw OFFSET DOSGROUP
:COLLATE_TAB
;pointer to collate table
79 dw 0 ; segment of poiter
80 db SetDBCS
;AN000; DBCS Ev 2/12/KK
81 dw OFFSET DOSGROUP
:DBCS_TAB
;AN000;;pointer to DBCS Ev table 2/12/KK
82 dw 0 ;AN000; segment of poiter 2/12/KK
83 db SetCountryInfo
; country info type
84 dw NEW_COUNTRY_SIZE
; extended country info size
86 dw 437 ; USA system code page id
88 db '$',0,0,0,0 ; currency symbol
89 db ',',0 ; thousand separator
90 db '.',0 ; decimal separator
91 db '-',0 ; date separator
92 db ':',0 ; time separator
93 db 0 ; currency format flag
94 db 2 ; # of disgit in currency
96 dw OFFSET DOSGROUP
:MAP_CASE
;mono case routine entry point
97 dw 0 ; segment of entry point
98 db ',',0 ; data list separator
99 dw 0,0,0,0,0 ; reserved
112 db 128,154,069,065,142,065,143,128
113 db 069,069,069,073,073,073,142,143
114 db 144,146,146,079,153,079,085,085
115 db 089,153,154,155,156,157,158,159
116 db 065,073,079,085,165,165,166,167
117 db 168,169,170,171,172,173,174,175
118 db 176,177,178,179,180,181,182,183
119 db 184,185,186,187,188,189,190,191
120 db 192,193,194,195,196,197,198,199
121 db 200,201,202,203,204,205,206,207
122 db 208,209,210,211,212,213,214,215
123 db 216,217,218,219,220,221,222,223
124 db 224,225,226,227,228,229,230,231
125 db 232,233,234,235,236,237,238,239
126 db 240,241,242,243,244,245,246,247
127 db 248,249,250,251,252,253,254,255
130 ; file upper case table
132 FILE_UCASE_TAB
label byte
134 db 128,154,069,065,142,065,143,128
135 db 069,069,069,073,073,073,142,143
136 db 144,146,146,079,153,079,085,085
137 db 089,153,154,155,156,157,158,159
138 db 065,073,079,085,165,165,166,167
139 db 168,169,170,171,172,173,174,175
140 db 176,177,178,179,180,181,182,183
141 db 184,185,186,187,188,189,190,191
142 db 192,193,194,195,196,197,198,199
143 db 200,201,202,203,204,205,206,207
144 db 208,209,210,211,212,213,214,215
145 db 216,217,218,219,220,221,222,223
146 db 224,225,226,227,228,229,230,231
147 db 232,233,234,235,236,237,238,239
148 db 240,241,242,243,244,245,246,247
149 db 248,249,250,251,252,253,254,255
154 FILE_CHAR_TAB
label byte
156 db 1,0,255 ; include all
157 db 0,0,20h
; exclude 0 - 20h
158 db 2,14,'."/\[]:|<>+=;,' ; exclude 14 special
159 db 24 dup (?
) ; reserved
163 COLLATE_TAB
label byte
166 db 8,9,10,11,12,13,14,15
167 db 16,17,18,19,20,21,22,23
168 db 24,25,26,27,28,29,30,31
169 db " ","!",'"',"#","$","%","&","'"
170 db "(",")","*","+",",","-",".","/"
171 db "0","1","2","3","4","5","6","7"
172 db "8","9",":",";","<","=",">","?"
173 db "@","A","B","C","D","E","F","G"
174 db "H","I","J","K","L","M","N","O"
175 db "P","Q","R","S","T","U","V","W"
176 db "X","Y","Z","[","\","]","^
","_
"
177 db "`","A
","B
","C
","D
","E
","F
","G
"
178 db "H
","I
","J
","K
","L
","M
","N
","O
"
179 db "P
","Q
","R
","S
","T
","U
","V
","W
"
180 db "X
","Y
","Z","{","|","}","~",127
181 db "C
","U
","E
","A
","A
","A
","A
","C
"
182 db "E
","E
","E
","I
","I
","I
","A
","A
"
183 db "E
","A
","A
","O
","O
","O
","U
","U
"
184 db "Y
","O
","U
","$","$","$","$","$"
185 db "A
","I
","O
","U
","N
","N
",166,167
186 db "?
",169,170,171,172,"!
",'"','"'
187 db 176,177,178,179,180,181,182,183
188 db 184,185,186,187,188,189,190,191
189 db 192,193,194,195,196,197,198,199
190 db 200,201,202,203,204,205,206,207
191 db 208,209,210,211,212,213,214,215
192 db 216,217,218,219,220,221,222,223
194 db 226,227,228,229,230,231
195 db 232,233,234,235,236,237,238,239
196 db 240,241,242,243,244,245,246,247
197 db 248,249,250,251,252,253,254,255
199 ; dbcs is not supported in DOS 3.3
200 ; DBCS_TAB CC_DBCS <>
202 ; DBCS for DOS 4.00 2/12/KK
204 DBCS_TAB label byte ;AN000; 2/12/KK
205 dw 0 ;AN000; 2/12/KK max number
206 db 16 dup(0) ;AN000; 2/12/KK
209 ; db 081h,09fh ; 2/12/KK
210 ; db 0e0h,0fch ; 2/12/KK
219 CODE SEGMENT BYTE PUBLIC 'CODE'
220 ASSUME CS:DOSGROUP,DS:NOTHING,ES:NOTHING,SS:NOTHING
222 ;CASE MAPPER ROUTINE FOR 80H-FFH character range, DOS 3.3
223 ; ENTRY: AL = Character to map
224 ; EXIT: AL = The converted character
225 ; Alters no registers except AL and flags.
226 ; The routine should do nothing to chars below 80H.
230 Procedure MAP_CASE,FAR
232 JAE Map1 ;Map no chars below 80H ever
235 SUB AL,80H ;Turn into index value
238 MOV BX,OFFSET DOSGROUP:UCASE_TAB + 2
242 XLAT ds:[bx] ;Get upper case character
248 SUBTTL EDIT FUNCTION ASSIGNMENTS AND HEADERS
250 ; The following two tables implement the current buffered input editing
251 ; routines. The tables are pairwise associated in reverse order for ease
252 ; in indexing. That is; The first entry in ESCTAB corresponds to the last
253 ; entry in ESCFUNC, and the last entry in ESCTAB to the first entry in ESCFUNC.
258 CANCHAR DB CANCEL ;Cancel line character
260 ESCCHAR DB ESCCH ;Lead-in character for escape sequences
265 DB 0C0h ; ^Z inserter
266 DB 0C1H ; Copy one char
267 DB 0C1H ; Copy one char
268 DB 0C7H ; Skip one char
269 DB 08AH ; Copy to char
270 DB 088H ; Skip to char
272 DB 0CBH ; Kill line (no change in template)
273 DB 08BH ; Reedit line (new template)
275 DB 0C6H ; Enter insert mode
276 DB 0D6H ; Exit insert mode
277 DB 0C6H ; Escape character
278 DB 0C6H ; End of table
282 DB "S
" ; F1 Copy one char
283 DB "S
" ; F1 Copy one char
284 DB "V
" ; F4 Skip one char
285 DB "T
" ; F2 Copy to char
286 DB "W
" ; F5 Skip to char
287 DB "U
" ; F3 Copy line
288 DB "E
" ; SHIFT ERASE Kill line (no change in template)
289 DB "J
" ; ERASE Reedit line (new template)
290 DB "D
" ; LEFT Backspace
291 DB "P
" ; BLUE Enter insert mode
292 DB "Q
" ; RED Exit insert mode
293 DB "R
" ; GRAY Escape character
294 DB "R
" ; End of table
299 DB 77 ; Copy one char - -->
300 DB 59 ; Copy one char - F1
301 DB 83 ; Skip one char - DEL
302 DB 60 ; Copy to char - F2
303 DB 62 ; Skip to char - F4
304 DB 61 ; Copy line - F3
305 DB 61 ; Kill line (no change to template ) - Not used
306 DB 63 ; Reedit line (new template) - F5
307 DB 75 ; Backspace - <--
308 DB 82 ; Enter insert mode - INS (toggle)
309 DB 82 ; Exit insert mode - INS (toggle)
310 DB 65 ; Escape character - F7
314 ESCTABLEN EQU ESCEND-ESCTAB
317 short_addr GETCH ; Ignore the escape sequence
335 ; OEMFunction key is expected to process a single function
336 ; key input from a device and dispatch to the proper
337 ; routines leaving all registers UNTOUCHED.
339 ; Inputs: CS, SS are DOSGROUP
340 ; Outputs: None. This function is expected to JMP to one of
341 ; the following labels:
343 ; GetCh - ignore the sequence
344 ; TwoEsc - insert an ESCChar in the buffer
345 ; ExitIns - toggle insert mode
346 ; EnterIns - toggle insert mode
347 ; BackSp - move backwards one space
348 ; ReEdit - reedit the line with a new template
349 ; KilNew - discard the current line and start from scratch
350 ; CopyLin - copy the rest of the template into the line
351 ; SkipStr - read the next character and skip to it in the template
352 ; CopyStr - read next char and copy from template to line until char
353 ; SkipOne - advance position in template one character
354 ; CopyOne - copy next character in template into line
355 ; CtrlZ - place a ^Z into the template
356 ; Registers that are allowed to be modified by this function are:
359 Procedure OEMFunctionKey,NEAR
360 ASSUME DS:NOTHING,ES:NOTHING,SS:DOSGROUP
362 extrn intCNE0:near ;AN000; 2/17/KK
363 CALL intCNE0 ;AN000; 2/17/KK
365 invoke $std_con_input_no_echo ; Get the second byte of the sequence
368 MOV CL,ESCTABLEN ; length of table for scan
369 PUSH DI ; save DI (cannot change it!)
370 MOV DI,OFFSET DOSGROUP:ESCTAB ; offset of second byte table
371 REPNE SCASB ; Look it up in the table
373 SHL CX,1 ; convert byte offset to word
374 MOV BP,CX ; move to indexable register
375 JMP [BP+OFFSET DOSGROUP:ESCFUNC] ; Go to the right routine
379 TransferIf MACRO value,address
387 CMP AL,'[' ; is it second lead char
388 JZ EatParm ; yes, go walk tree
390 transfer GetCh ; no, ignore sequence
392 invoke $std_con_input_no_echo ; get argument
393 CMP AL,'A' ; is it alphabetic arg?
394 JAE EatAlpha ; yes, go snarf one up
395 XOR BP,BP ; init digit counter
396 JMP InDigit ; jump into internal eat digit routine
398 invoke $std_con_input_no_echo ; get next digit
400 CMP AL,'9' ; still a digit?
401 JA CheckNumEnd ; no, go check for end char
402 SUB AL,'0' ; turn into potential digit
403 JL GoGetCh ; oops, not a digit, ignore
404 MOV CX,BP ; save BP for 10 multiply
405 CBW ; make AL into AX
410 ADD BP,AX ; 10*BP + digit
411 JMP EatNum ; continue with number
413 CMP AL,7Eh ; is it end char ~
414 JNZ GoGetCh ; nope, ignore key sequence
416 transferIf 1,SkipStr ; FIND key
417 transferIf 2,EnterIns ; INSERT HERE key
418 transferIf 3,SkipOne ; REMOVE
419 transferIf 4,CopyStr ; SELECT
420 transferIf 17,TwoEsc ; INTERRUPT
421 transferIf 18,ReEdit ; RESUME
422 transferIf 19,KilNew ; CANCEL
423 transferIf 21,CtrlZ ; EXIT
424 transferIf 29,CopyLin ; DO
427 CMP AL,'O' ; is it O?
428 JA GoGetCh ; no, after assume bogus
429 JZ EatPQRS ; eat the rest of the bogus key
430 transferIf 'C',CopyOne ; RIGHT
431 transferIf 'D',BackSp ; LEFT
434 invoke $std_con_input_no_echo ; eat char after O
438 EndProc OEMFunctionKey