]> wirehaze git hosting - MS-DOS.git/blob - v4.0/src/MAPPER/DBCS.ASM

wirehaze git hosting

MZ is back!
[MS-DOS.git] / v4.0 / src / MAPPER / DBCS.ASM
1 ;
2 page 80,132
3 ;
4 title CP/DOS DosGetDBCSEv
5 ;
6 dosxxx segment byte public 'dos'
7 assume cs:dosxxx,ds:nothing,es:nothing,ss:nothing
8 ;
9 ;**********************************************************************
10 ;*
11 ;* MODULE: DosGetDBCSEv
12 ;*
13 ;* CALLING SEQUENCE:
14 ;*
15 ;* PUSH WORD Length
16 ;* PUSH@ DWORD Countrycode
17 ;* PUSH@ DWORD Memorybuffer
18 ;*
19 ;* MODULES CALLED: none
20 ;*
21 ;*********************************************************************
22 ;
23 public DosGetDBCSEv
24 .sall
25 include macros.inc
26
27 str struc
28 old_bp dw ?
29 return dd ?
30 DataAreaPtr dd ? ; Data buffer pointer
31 CountryCodePtr dd ? ; Country code pointer
32 DataAreaLength dw ? ; Length of data area
33 str ends
34
35 DosGetDBCSEv proc far
36
37 Enter DosGetDBCSEv ;AN000; push registers
38
39 ; Get the country, so we can then get the country case map stuff
40
41 ; lds si,[bp].CountryCodePtr
42 ; mov ax,ds:[si]
43
44 ; Note: do the country selection later (maybe never)
45
46 mov ax,6300H ;AN000; get DBCS vector
47 INT 21H ;AN000; DS:SI-->vector area
48
49 jc Exit
50 Copy_Vector:
51 les di,[bp].DataAreaPtr ;AN000; ES:DI-->return buffer
52 mov cx,[bp].DataAreaLength ;AN000;
53 loopx:
54 mov al,ds:[si] ;AN000;
55 mov es:[di],al ;AN000;
56 inc si ;AN000;
57 inc di ;AN000;
58 loop loopx ;AN000;
59
60 xor ax,ax ;AN000;
61
62 Exit:
63 Mexit ;AN000;pop registers
64
65 ret size str - 6 ;AN000; return
66
67 DosGetDBCSEv endp
68
69 dosxxx ends
70
71 end