Subversion Repositories SvarDOS

Rev

Rev 1485 | Rev 1487 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1485 Rev 1486
1
;
1
;
2
; SvarDOS MORE
2
; SvarDOS MORE
3
;
3
;
4
; Displays output one screen at a time
4
; Displays output one screen at a time
5
;
5
;
6
;  - multilingual (looks up the LANG env variable)
6
;  - multilingual (looks up the LANG env variable)
7
;  - tiny (fits in a single disk sector)
7
;  - tiny (fits in a single disk sector)
8
;
8
;
9
; This program is part of the SvarDOS project <http://svardos.org>
9
; This program is part of the SvarDOS project <http://svardos.org>
10
;
10
;
11
; ****************************************************************************
11
; ****************************************************************************
12
; *** Distributed under the terms of the MIT LICENSE *************************
12
; *** Distributed under the terms of the MIT LICENSE *************************
13
; ****************************************************************************
13
; ****************************************************************************
14
;
14
;
15
; Copyright (C) 2023 Mateusz Viste
15
; Copyright (C) 2023 Mateusz Viste
16
;
16
;
17
; Permission is hereby granted, free of charge, to any person obtaining a copy
17
; Permission is hereby granted, free of charge, to any person obtaining a copy
18
; of this software and associated documentation files (the "Software"), to
18
; of this software and associated documentation files (the "Software"), to
19
; deal in the Software without restriction, including without limitation the
19
; deal in the Software without restriction, including without limitation the
20
; rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
20
; rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
21
; sell copies of the Software, and to permit persons to whom the Software is
21
; sell copies of the Software, and to permit persons to whom the Software is
22
; furnished to do so, subject to the following conditions:
22
; furnished to do so, subject to the following conditions:
23
;
23
;
24
; The above copyright notice and this permission notice shall be included in
24
; The above copyright notice and this permission notice shall be included in
25
; all copies or substantial portions of the Software.
25
; all copies or substantial portions of the Software.
26
;
26
;
27
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
32
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
32
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
33
; IN THE SOFTWARE.
33
; IN THE SOFTWARE.
34
; ****************************************************************************
34
; ****************************************************************************
35
;
35
;
36
; To be compiled with the A72 assembler:
36
; To be compiled with the A72 assembler:
37
; A72 MORE.ASM MORE.COM
37
; A72 MORE.ASM MORE.COM
38
;
38
;
39
 
39
 
40
 
40
 
41
; COM file always has a 100h origin
41
; COM file always has a 100h origin
42
ORG     100h
42
ORG     100h
43
 
43
 
44
 
44
 
45
; ****************************************************************************
45
; ****************************************************************************
46
; * Display a short help screen if any (non-empty) argument is provided.     *
46
; * Display a short help screen if any (non-empty) argument is provided.     *
47
; *                                                                          *
47
; *                                                                          *
48
; * detect presence of arguments in the command's tail (PSP 81h), looking    *
48
; * detect presence of arguments in the command's tail (PSP 81h), looking    *
49
; * at the first non-space character. If it's a CR then no argument (CR is   *
49
; * at the first non-space character. If it's a CR then no argument (CR is   *
50
; * the tail's terminator).                                                  *
50
; * the tail's terminator).                                                  *
51
; ****************************************************************************
51
; ****************************************************************************
52
mov     ax, ds
52
mov     ax, ds
53
mov     es, ax
53
mov     es, ax
54
mov     al, ' '
54
mov     al, ' '
55
mov     cx, 0ffh
55
mov     cx, 0ffh
56
mov     di, 81h
56
mov     di, 81h
57
repe    scasb                          ; compare AL with [ES:DI++]
57
repe    scasb                          ; compare AL with [ES:DI++]
58
mov     al, [di-1]
58
mov     al, [di-1]
59
 
59
 
60
cmp     al, 0Dh
60
cmp     al, 0Dh
61
je      NO_ARGS
61
je      NO_ARGS
62
 
62
 
63
; some arg found: display help and quit
63
; some arg found: display help and quit
64
mov     ah, 9h
64
mov     ah, 9h
65
mov     dx, offset HELP
65
mov     dx, offset HELP
66
int     21h
66
int     21h
67
int     20h
67
int     20h
68
 
68
 
69
HELP db "SvarDOS MORE 2023.0", 13, 10
69
HELP db "SvarDOS MORE 2023.0", 13, 10
70
     db 10
70
     db 10
71
     db "MORE < README.TXT", 13, 10
71
     db "MORE < README.TXT", 13, 10
72
     db "TYPE README.TXT | MORE", 13, 10, '$'
72
     db "TYPE README.TXT | MORE", 13, 10, '$'
73
 
73
 
74
NO_ARGS:
74
NO_ARGS:
75
 
75
 
76
 
76
 
77
; ****************************************************************************
77
; ****************************************************************************
78
; * detect screen dimensions (max usable row and column)                     *
78
; * detect screen dimensions (max usable row and column)                     *
79
; ****************************************************************************
79
; ****************************************************************************
80
mov     ah, 0Fh                        ; GET CURRENT VIDEO MODE
80
mov     ah, 0Fh                        ; GET CURRENT VIDEO MODE
81
int     10h
81
int     10h
82
mov     byte ptr [MAXCOL], ah
82
mov     byte ptr [MAXCOL], ah
83
mov     ax, 40h
83
mov     ax, 40h
84
mov     es, ax
84
mov     es, ax
85
mov     ah, [es:84h]                   ; 0040:0084
85
mov     ah, [es:84h]                   ; 0040:0084
86
test    ah, ah                         ; ancient PCes do not know this
86
test    ah, ah                         ; ancient PCes do not know this
87
jz      SKIP_ROWS_DETECTION
87
jz      SKIP_ROWS_DETECTION
88
mov     byte ptr [MAXROW], ah
88
mov     byte ptr [MAXROW], ah
89
 
89
 
90
SKIP_ROWS_DETECTION:
90
SKIP_ROWS_DETECTION:
91
 
91
 
92
 
92
 
93
; ****************************************************************************
93
; ****************************************************************************
-
 
94
; * preset lang to EN                                                        *
-
 
95
; ****************************************************************************
-
 
96
mov     bp, LANGLIST+2
-
 
97
 
-
 
98
 
-
 
99
; ****************************************************************************
94
; * Scan the environement block looking for the LANG variable                *
100
; * Scan the environement block looking for the LANG variable                *
95
; ****************************************************************************
101
; ****************************************************************************
96
 
102
 
97
; set ES to point at the environment segment (PSP's offset 2Ch)
103
; set ES to point at the environment segment (PSP's offset 2Ch)
98
mov     es, [2Ch]
104
mov     es, [2Ch]
99
 
105
 
100
; compare DS:[SI] with ES:[DI], up to 5 bytes ("LANG=")
106
; compare DS:[SI] with ES:[DI], up to 5 bytes ("LANG=")
101
cld
107
cld
102
mov     di, 0
108
mov     di, 0
103
CMP_NEXT_VAR:
109
CMP_NEXT_VAR:
104
 
110
 
105
; if it points at a nul already then it's the end of the env block
111
; if it points at a nul already then it's the end of the env block
106
mov     al, [es:di]
112
mov     al, [es:di]
107
test    al, al
113
test    al, al
108
jz      ENDOFENV
114
jz      LANG_DONE
109
 
115
 
110
mov     si, LANG
116
mov     si, LANG
111
mov     cx, 5
117
mov     cx, 5
112
repe    cmpsb
118
repe    cmpsb
113
 
119
 
114
; if CX == 0 then found a LANG= match
120
; if CX == 0 then found a LANG= match
115
jcxz    FOUND_LANG
121
jcxz    FOUND_LANG
116
 
122
 
117
; otherwise jump to next var (look for nearest nul terminator)
123
; otherwise jump to next var (look for nearest nul terminator)
118
xor     al, al
124
xor     al, al
119
mov     cx, 0ffffh
125
mov     cx, 0ffffh
120
repne   scasb                          ; compare AL with [ES:DI++]
126
repne   scasb                          ; compare AL with [ES:DI++]
121
jmp     CMP_NEXT_VAR
127
jmp     short CMP_NEXT_VAR
122
 
128
 
123
; FOUND THE LANG VARIABLE (at ES:DI)
129
; FOUND THE LANG VARIABLE (at ES:DI)
124
FOUND_LANG:
130
FOUND_LANG:
125
 
131
 
126
mov     ax, [es:di]                    ; load the LANG ID to AX and make
132
mov     bx, [es:di]                    ; load the LANG ID to BX and make
127
and     ax, 0DFDFh                     ; sure it is always upper case
133
and     bx, 0DFDFh                     ; sure it is always upper case
128
 
134
 
129
 
135
 
130
; ****************************************************************************
136
; ****************************************************************************
131
; * Now I have a LANG ID in AX and I have to match it for something I know.  *
137
; * Now I have a LANG ID in BX and I have to match it for something I know.  *
132
; * The LANG ID is simply the value for the two uppercase LANG letters, for  *
-
 
133
; * example the LANG ID for "PL" is 4C50h (50h = 'P', 4Ch = 'L').            *
-
 
134
; ****************************************************************************
138
; ****************************************************************************
135
 
139
 
136
; DE [44h 45h]
-
 
137
mov     bp, TEXT_DE
-
 
138
cmp     ax, 4544h
-
 
139
je      LANGOK
-
 
140
 
-
 
141
; DK [44h 4Bh]
-
 
142
mov     bp, TEXT_DK
-
 
143
cmp     ax, 4B44h
-
 
144
je      LANGOK
-
 
145
 
-
 
146
; ES [45h 53h]
-
 
147
mov     bp, TEXT_ES
140
mov     di, LANGLIST
148
cmp     ax, 5345h
-
 
149
je      LANGOK
-
 
150
 
-
 
151
; FI [46h 49h]
-
 
152
mov     bp, TEXT_FI
-
 
153
cmp     ax, 4946h
141
mov     ax, ds
154
je      LANGOK
-
 
155
 
-
 
156
; FR [46h 52h]
-
 
157
mov     bp, TEXT_FR
142
mov     es, ax
158
cmp     ax, 5246h
-
 
159
je      LANGOK
-
 
160
 
143
 
161
; IT [49h 54h]
-
 
162
mov     bp, TEXT_IT
-
 
163
cmp     ax, 5449h
-
 
164
je      LANGOK
144
NEXTLANG:
165
 
-
 
166
; NL [4Eh 4Ch]
-
 
167
mov     bp, TEXT_NL
-
 
168
cmp     ax, 4C4Eh
-
 
169
je      LANGOK
-
 
170
 
-
 
171
; PL [50h 4Ch]
-
 
172
mov     bp, TEXT_PL
-
 
173
cmp     ax, 4C50h
-
 
174
je      LANGOK
-
 
175
 
-
 
176
; RU [52h 55h]
-
 
177
mov     bp, TEXT_RU
-
 
178
cmp     ax, 5552h
-
 
179
je      LANGOK
-
 
180
 
-
 
181
; SL [53h 4Ch]
-
 
182
mov     bp, TEXT_SL
-
 
183
cmp     ax, 4C53h
-
 
184
je      LANGOK
-
 
185
 
-
 
186
; SV [53h 56h]
-
 
187
mov     bp, TEXT_SV
-
 
188
cmp     ax, 5653h
145
cmp     byte ptr [di], 0               ; look for the end of list terminator
189
je      LANGOK
146
je      LANG_DONE
190
 
-
 
191
; TR [54h 52h]
-
 
192
mov     bp, TEXT_TR
-
 
193
cmp     ax, 5254h
147
cmp     [di], bx                       ; look for a LANG ID match
194
je      LANGOK
148
je      LANGIDOK
195
 
149
 
-
 
150
; skip string (look for its $ terminator) and repeat
-
 
151
SKIPLANG:
-
 
152
mov     al, '$'
-
 
153
mov     cx, 0ffffh
-
 
154
repne   scasb                          ; compare AL with [ES:DI++]
-
 
155
jmp     short NEXTLANG
196
 
156
 
-
 
157
LANGIDOK:
197
; *** LANG NOT FOUND OR LANG ID MATCH FAILED: FALL BACK TO EN ****************
158
mov     bp, di                         ; ptr to localized msg is always in BP
-
 
159
inc     bp
-
 
160
inc     bp
198
 
161
 
199
ENDOFENV:
-
 
200
mov     bp, TEXT_EN
-
 
201
 
162
 
202
LANGOK:
163
LANG_DONE:
203
 
164
 
204
 
165
 
205
; ****************************************************************************
166
; ****************************************************************************
206
; * DUPLICATING HANDLES: here I duplicate stdin into a new handle so I can   *
167
; * DUPLICATING HANDLES: here I duplicate stdin into a new handle so I can   *
207
; * safely close original stdin (file handle 0) and then duplicate stderr    *
168
; * safely close original stdin (file handle 0) and then duplicate stderr    *
208
; * into stdin. The purpose of these shenanigans is to be able to cope with  *
169
; * into stdin. The purpose of these shenanigans is to be able to cope with  *
209
; * situations when stdin is redirected (eg. with CTTY)                      *
170
; * situations when stdin is redirected (eg. with CTTY)                      *
210
; ****************************************************************************
171
; ****************************************************************************
211
 
172
 
212
; duplicate stdin and keep the new file handle in FHANDLE
173
; duplicate stdin and keep the new file handle in FHANDLE
213
xor     bx, bx
174
xor     bx, bx
214
mov     ah, 45h
175
mov     ah, 45h
215
int     21h
176
int     21h
216
mov     [FHANDLE], ax
177
mov     [FHANDLE], ax
217
 
178
 
218
; I can close stdin now
179
; I can close stdin now
219
mov     ah, 3Eh
180
mov     ah, 3Eh
220
int     21h
181
int     21h
221
 
182
 
222
; duplicate stderr to stdin
183
; duplicate stderr to stdin
223
; bx = file handle / cx = file handle to become duplicate of bx
184
; bx = file handle / cx = file handle to become duplicate of bx
224
mov     ah, 46h
185
mov     ah, 46h
225
mov     bx, 2
186
mov     bx, 2
226
xor     cx, cx
187
xor     cx, cx
227
int     21h
188
int     21h
228
; ****************************************************************************
189
; ****************************************************************************
229
 
190
 
230
 
191
 
231
; make sure cursor is on column 0
192
; make sure cursor is on column 0
232
mov ah, 2h                             ; write character in DL to stdout
193
mov ah, 2h                             ; write character in DL to stdout
233
mov dl, 0Dh                            ; carriage return
194
mov dl, 0Dh                            ; carriage return
234
int 21h
195
int 21h
235
 
196
 
236
; reset BX - from now on bh = cur row and bl = cur col
197
; reset BX - from now on bh = cur row and bl = cur col
237
xor     bx, bx
198
xor     bx, bx
238
 
199
 
239
; consume stdin bytes by loading them into buffer
200
; consume stdin bytes by loading them into buffer
240
RELOADBUF:
201
RELOADBUF:
241
xchg    di, bx                         ; save BX to DI (contains cur row+col)
202
xchg    di, bx                         ; save BX to DI (contains cur row+col)
242
mov     ah, 3Fh                        ; DOS 2+ - read from file or device
203
mov     ah, 3Fh                        ; DOS 2+ - read from file or device
243
mov     bx, [FHANDLE]                  ; duplicated stdin was saved in FHANDLE
204
mov     bx, [FHANDLE]                  ; duplicated stdin was saved in FHANDLE
244
mov     cx, 1024
205
mov     cx, 1024
245
mov     dx, offset BUFFER
206
mov     dx, offset BUFFER
246
int     21h
207
int     21h
247
 
208
 
248
; abort on error
209
; abort on error
249
jc EXIT
210
jc EXIT
250
 
211
 
251
; restore bx
212
; restore bx
252
xchg    bx, di
213
xchg    bx, di
253
 
214
 
254
; did I get any bytes? 0 bytes read means "EOF"
215
; did I get any bytes? 0 bytes read means "EOF"
255
test    ax, ax
216
test    ax, ax
256
jnz     PREPLOOP
217
jnz     PREPLOOP
257
 
218
 
258
EXIT:
219
EXIT:
259
int     20h
220
int     20h
260
 
221
 
261
; prepare the LODSB loop
222
; prepare the LODSB loop
262
PREPLOOP:
223
PREPLOOP:
263
mov     cx, ax
224
mov     cx, ax
264
mov     si, dx
225
mov     si, dx
265
 
226
 
266
NEXTCHAR:
227
NEXTCHAR:
267
 
228
 
268
; AL = DS:[SI++]
229
; AL = DS:[SI++]
269
cld
230
cld
270
lodsb
231
lodsb
271
 
232
 
272
; EOF char? (check this first so a short jump to exit is still possible)
233
; EOF char? (check this first so a short jump to exit is still possible)
273
cmp     al, 1Ah
234
cmp     al, 1Ah
274
jz      EXIT
235
jz      EXIT
275
 
236
 
276
; [7h] BELL?
237
; [7h] BELL?
277
cmp     al, 7h
238
cmp     al, 7h
278
je      OUTPUT_CHAR
239
je      OUTPUT_CHAR
279
 
240
 
280
; [8h] BACKSPACE? moves the cursor back by one column, no effect if it is on
241
; [8h] BACKSPACE? moves the cursor back by one column, no effect if it is on
281
; first column already. it does not blank the characters it passes over.
242
; first column already. it does not blank the characters it passes over.
282
cmp     al, 8h
243
cmp     al, 8h
283
jne     NOTBS
244
jne     NOTBS
284
test    bl, bl                         ; am I on on column 0? (bl = cur col)
245
test    bl, bl                         ; am I on on column 0? (bl = cur col)
285
jz      OUTPUT_CHAR
246
jz      OUTPUT_CHAR
286
dec     bl
247
dec     bl
287
jmp     short OUTPUT_CHAR
248
jmp     short OUTPUT_CHAR
288
NOTBS:
249
NOTBS:
289
 
250
 
290
; [9h] TAB?
251
; [9h] TAB?
291
cmp     al, 9h
252
cmp     al, 9h
292
jne     NOTTAB
253
jne     NOTTAB
293
add     bl, 8                          ; bl = cur col
254
add     bl, 8                          ; bl = cur col
294
and     bl, 248
255
and     bl, 248
295
jmp     short OUTPUT_CHAR
256
jmp     short OUTPUT_CHAR
296
NOTTAB:
257
NOTTAB:
297
 
258
 
298
; [0Ah] LF?
259
; [0Ah] LF?
299
cmp     al, 0Ah
260
cmp     al, 0Ah
300
jne     NOTLF
261
jne     NOTLF
301
inc     bh                             ; bh = cur row
262
inc     bh                             ; bh = cur row
302
jmp     short OUTPUT_CHAR
263
jmp     short OUTPUT_CHAR
303
NOTLF:
264
NOTLF:
304
 
265
 
305
; [0Dh] CR?
266
; [0Dh] CR?
306
cmp     al, 0Dh
267
cmp     al, 0Dh
307
jnz     NOTCR
268
jnz     NOTCR
308
xor     bl, bl                         ; bl = cur col
269
xor     bl, bl                         ; bl = cur col
309
jmp     short OUTPUT_CHAR
270
jmp     short OUTPUT_CHAR
310
NOTCR:
271
NOTCR:
311
 
272
 
312
; otherwise: increment cur column, and then maybe cur row
273
; otherwise: increment cur column, and then maybe cur row
313
inc     bl                             ; bl = cur col
274
inc     bl                             ; bl = cur col
314
cmp     bl, [MAXCOL]
275
cmp     bl, [MAXCOL]
315
jb      OUTPUT_CHAR
276
jb      OUTPUT_CHAR
316
inc     bh                             ; bh = cur row
277
inc     bh                             ; bh = cur row
317
xor     bl, bl                         ; bl = cur col
278
xor     bl, bl                         ; bl = cur col
318
 
279
 
319
OUTPUT_CHAR:
280
OUTPUT_CHAR:
320
mov     dl, al
281
mov     dl, al
321
mov     ah, 2h
282
mov     ah, 2h
322
int     21h
283
int     21h
323
cmp     bh, [MAXROW]                   ; bh = cur row
284
cmp     bh, [MAXROW]                   ; bh = cur row
324
jae     PRESSANYKEY
285
jae     PRESSANYKEY
325
 
286
 
326
CHARLOOP:
287
CHARLOOP:
327
loop    NEXTCHAR                       ; dec cx and jmp to NEXTCHAR if cx > 0
288
loop    NEXTCHAR                       ; dec cx and jmp to NEXTCHAR if cx > 0
328
jmp     RELOADBUF
289
jmp     RELOADBUF
329
 
290
 
330
 
291
 
331
; display " --- More ---"
292
; display " --- More ---"
332
PRESSANYKEY:
293
PRESSANYKEY:
333
mov     ah, 9h                         ; disp $-termin. string pointed by DX
294
mov     ah, 9h                         ; disp $-termin. string pointed by DX
334
mov     dx, offset SEPAR1
295
mov     dx, offset SEPAR1
335
int     21h
296
int     21h
336
mov     dx, bp
297
mov     dx, bp
337
int     21h
298
int     21h
338
mov     dx, offset SEPAR2
299
mov     dx, offset SEPAR2
339
int     21h
300
int     21h
340
 
301
 
341
; wait for a keypress
302
; wait for a keypress
342
mov     ah, 08h                        ; read char from stdin, no echo
303
mov     ah, 08h                        ; read char from stdin, no echo
343
int     21h
304
int     21h
344
; read again if an extended key was pressed
305
; read again if an extended key was pressed
345
test    al, al
306
test    al, al
346
jnz     GETKEY_DONE
307
jnz     GETKEY_DONE
347
int     21h
308
int     21h
348
GETKEY_DONE:
309
GETKEY_DONE:
349
 
310
 
350
; output a CR/LF pair and reset counters
311
; output a CR/LF pair and reset counters
351
mov     dx, offset CRLF
312
mov     dx, offset CRLF
352
mov     ah, 9h
313
mov     ah, 9h
353
int     21h
314
int     21h
354
xor     bx, bx                         ; bh = cur row, bl = cur col
315
xor     bx, bx                         ; bh = cur row, bl = cur col
355
jmp     CHARLOOP
316
jmp     CHARLOOP
356
 
317
 
357
 
318
 
358
; ****************************************************************************
319
; ****************************************************************************
359
; * DATA                                                                     *
320
; * DATA                                                                     *
360
; ****************************************************************************
321
; ****************************************************************************
361
 
322
 
362
MAXROW  db      24                     ; maximum *addressable* row (not total)
323
MAXROW  db      24                     ; maximum *addressable* row (not total)
363
MAXCOL  db      80                     ; total available columns
324
MAXCOL  db      80                     ; total available columns
364
 
325
 
365
CRLF DB 13, 10, '$'
326
CRLF DB 13, 10, '$'
366
LANG DB "LANG="
327
LANG DB "LANG="
367
SEPAR1 DB "--- $"
328
SEPAR1 DB "--- $"
368
SEPAR2 DB " ---$"
329
SEPAR2 DB " ---$"
369
 
330
 
-
 
331
LANGLIST:
-
 
332
DB "EN",  "MORE$"                      ; EN must be 1st to be used as default
370
TEXT_DE DB "WEITER$"
333
DB "DE",  "WEITER$"
371
TEXT_DK DB "MERE$"
334
DB "DK",  "MERE$"
372
TEXT_ES DB "M", 0B5h, "S$"              ; "MAS" with an A-acute (CP 850)
335
DB "ES",  "M", 0B5h, "S$"              ; "MAS" with an A-acute (CP 850)
373
TEXT_EN DB "MORE$"
-
 
374
TEXT_FI DB "LIS", 8Eh, 8Eh, "$"         ; "LISAA" - AA with diaeresis (CP 850)
336
DB "FI",  "LIS", 8Eh, 8Eh, "$"         ; "LISAA" - AA with diaeresis (CP 850)
375
TEXT_FR DB "PLUS$"
337
DB "FR",  "PLUS$"
376
TEXT_IT DB "PI", 0EBh, "$"              ; "PIU" with U-acute (CP 850)
338
DB "IT",  "PI", 0EBh, "$"              ; "PIU" with U-acute (CP 850)
377
TEXT_NL DB "MEER$"
339
DB "NL",  "MEER$"
378
TEXT_PL DB "DALEJ$"
340
DB "PL",  "DALEJ$"
379
TEXT_RU DB 84h,80h,8Bh,85h,85h,'$'     ; "DALEE" (CP 866)
341
DB "RU",  84h,80h,8Bh,85h,85h,'$'      ; "DALEE" (CP 866)
380
TEXT_SL DB "VE", 0ACh, "$"             ; "VEC" with C-caron (CP 852)
342
DB "SL",  "VE", 0ACh, "$"              ; "VEC" with C-caron (CP 852)
381
TEXT_SV DB "MERA$"
343
DB "SV",  "MERA$"
382
TEXT_TR DB "DAHA FAZLA$"
344
DB "TR",  "DAHA FAZLA$"
-
 
345
DB, 0                                  ; LANGLIST terminator
383
 
346
 
384
; uninitialized area (must be defined last)
347
; uninitialized area (must be defined last)
385
 
348
 
386
FHANDLE dw      ?                      ; file handle I read from (DUPed stdin)
349
FHANDLE dw      ?                      ; file handle I read from (DUPed stdin)
387
 
350
 
388
BUFFER:
351
BUFFER:
389
 
352