summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/DBCS.ASM
blob: a856a09de818ec52c3bf12515910b4168d3398e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;
page 80,132
;
title CP/DOS DosGetDBCSEv
;
dosxxx	segment byte public 'dos'
	assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing
;
;**********************************************************************
;*
;*   MODULE:   DosGetDBCSEv
;*
;*   CALLING SEQUENCE:
;*
;*	       PUSH   WORD     Length
;*	       PUSH@  DWORD    Countrycode
;*	       PUSH@  DWORD    Memorybuffer
;*
;*   MODULES CALLED:  none
;*
;*********************************************************************
;
	public	DosGetDBCSEv
	.sall
	include macros.inc

str	struc
old_bp	dw	?
return	dd	?
DataAreaPtr	dd	?      ; Data buffer pointer
CountryCodePtr	dd	?      ; Country code pointer
DataAreaLength	dw	?      ; Length of data area
str	ends

DosGetDBCSEv	proc	far

	Enter  DosGetDBCSEv		    ;AN000; push registers

; Get the country, so we can then get the country case map stuff

;	lds	si,[bp].CountryCodePtr
;	mov	ax,ds:[si]

; Note: do the country selection later (maybe never)

	mov	ax,6300H		     ;AN000; get DBCS vector
	INT	21H			     ;AN000; DS:SI-->vector area

	jc	Exit
Copy_Vector:
	les	di,[bp].DataAreaPtr	     ;AN000; ES:DI-->return buffer
	mov	cx,[bp].DataAreaLength	     ;AN000;
loopx:
	mov    al,ds:[si]		     ;AN000;
	mov    es:[di],al		     ;AN000;
	inc    si			     ;AN000;
	inc    di			     ;AN000;
	loop   loopx			     ;AN000;

	xor	ax,ax			     ;AN000;

Exit:
	Mexit				    ;AN000;pop registers

	ret	size str - 6		    ;AN000; return

DosGetDBCSEv	endp

dosxxx	ends

	end