4 title CP
/DOS DosGetCtryInfo mapper
6 Buffer
segment word public 'buffer'
10 dosxxx
segment byte public 'dos'
11 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
13 ;**********************************************************************
15 ;* MODULE: dosgetctryinfo
17 ;* FILE NAME: dos024.asm
21 ;* push word data area length
22 ;* push word country code
23 ;* push@ struc data area
24 ;* call dosgetctryinfo
26 ;* MODULES CALLED: PC-DOS Int 21h, ah=38h, get cntry info
28 ;*********************************************************************
45 cntry
struc ;country info. sturctrue
51 decimal_sep db 2 dup(?
)
63 Doscntry
struc ;country info. sturctrue
66 Dthous_sep db 2 dup(?
)
67 Ddecimal_sep db 2 dup(?
)
79 dosgetctryinfo proc
far
83 lds si,[bp].CountryCodePtr
86 cmp ax,256 ;16 bit country code
89 mov bx,ax ;if so, load into bx
90 mov al,0ffH ;and tell DOS
96 mov dx,offset buffer
:CountryInfo
98 mov ah,38h
; remember: the al value was set above!!!
102 mov si,offset buffer
:CountryInfo
103 les di,[bp].BufferPtr
106 mov cx,[bp].BufferLength
;length to move
108 rep movsb ;copy all to output area
110 mov cx,[bp].BufferLength
;was buffer larger than pc-dos gave us?
114 les di,[bp].BufferPtr
117 mov al,0 ;fill with zeroes