summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/SCNTRY.ASM
blob: 2d17ce9a2271e01d2b25936cb7ddacf2d84e90d8 (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
;
page 60,132
;
title CP/DOS DosSetCtryCode mapper
;
dosxxx  segment
        assume  cs:dosxxx,ds:dosxxx,es:dosxxx,ss:dosxxx
;
;**********************************************************************
;*
;*   MODULE:   dossetctrycode
;*
;*   FILE NAME: dos049.asm
;*
;*   CALLING SEQUENCE:
;*
;*       push@     dword   country code
;*       call      dossetctrycode
;*
;*   MODULES CALLED:  PC-DOS Int 21h, ah=38h, set country code
;*
;*********************************************************************

            public   dossetctrycode
            .sall
            include  macros.inc

str         struc
Old_bp      dw       ?
Return      dd       ?
Ccode       dd       ?        ; country code
str         ends

dossetctrycode  proc far
            Enter    dossetctrycode        ; push registers

            lds      si,[bp].ccode
            mov      ax,word ptr [si]      ; get country code
            mov      cx,255
            cmp      ax,cx                 ; check for country code >= 255
            jl       okay                  ; branch if less

            mov      bx,ax                 ; if so, load into bx
            mov      al,cl                 ; and set flag
okay:       mov      dx,0ffffh             ; Set DX

            mov      ah,38h                ; DOS INT function code
            int      21h                   ; set country information
            jc       exit                  ; branch if error

            sub      ax,ax                 ; set good return
exit:       mexit                          ; pop registers
            ret      size  str - 6         ; return

dossetctrycode endp
dosxxx      ends
            end