summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/CASEMAP.ASM
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/MAPPER/CASEMAP.ASM
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/MAPPER/CASEMAP.ASM')
-rw-r--r--v4.0/src/MAPPER/CASEMAP.ASM73
1 files changed, 73 insertions, 0 deletions
diff --git a/v4.0/src/MAPPER/CASEMAP.ASM b/v4.0/src/MAPPER/CASEMAP.ASM
new file mode 100644
index 0000000..900ad4f
--- /dev/null
+++ b/v4.0/src/MAPPER/CASEMAP.ASM
@@ -0,0 +1,73 @@
1
2;
3page 80,132
4;
5title CP/DOS DosCaseMap
6;
7dosxxx segment byte public 'dos'
8 assume cs:dosxxx,ds:nothing,es:nothing,ss:nothing
9
10;**********************************************************************
11;*
12;* MODULE: doscasemap
13;*
14;*
15;* CALLING SEQUENCE:
16;*
17;* PUSH WORD Length
18;* PUSH@ DWORD CountryCode
19;* PUSH@ DWORD BinaryString
20;* DosCaseMap
21;*
22;* MODULES CALLED: none
23;*
24;*********************************************************************
25
26 public doscasemap
27 .sall
28 include macros.inc
29
30str struc
31old_bp dw ?
32return dd ?
33StringPtr dd ? ; binary string pointer
34CountryCodePtr dd ? ; country code pointer
35StringLength dw ? ; lenght of the string
36str ends
37
38DosCaseMap proc far
39
40 Enter DosCaseMap ; save registers
41
42; Get the country, so we can then get the country case map stuff
43
44 lds si,[bp].CountryCodePtr
45 mov ax,ds:[si]
46
47; Note: do the country selection later (maybe never)
48
49 lds si,[bp].StringPtr
50 mov cx,[bp].StringLength
51
52MapLoop: ; convert characters to upper case
53 lodsb
54 cmp al,'a'
55 jc ThisCharDone
56
57 cmp al,'z'+1
58 jnc ThisCharDone
59
60 add al,'A' - 'a'
61 mov ds:[si-1],al
62
63ThisCharDone:
64 loop MapLoop ; loop until string is complete
65
66 MExit ; pop registers
67 ret size str - 6 ; return
68;
69DosCaseMap endp
70
71dosxxx ends
72
73 end