Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
CP/DOS DosSetCtryCode mapper                                Page     1-1


				;
				page 60,132
				;
				title CP/DOS DosSetCtryCode mapper
				;
 0000				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
			     C	;
			     C	
			     C	
			     C	pushal  macro
			     C	        push    bx
			     C	        push    cx
			     C	        push    dx
			     C	        push    si
			     C	        push    di
			     C	        push    ds
			     C	        push    es
			     C	        push    ss
			     C	        push    bp
			     C	        endm
			     C	;
			     C	popal   macro
			     C	        pop     bp
			     C	        pop     ss
			     C	        pop     es
			     C	        pop     ds
			     C	        pop     di
			     C	        pop     si
			     C	        pop     dx
			     C	        pop     cx
			     C	        pop     bx
			     C	        endm
			     C	;
			     C	Enter   macro   Routine
			     C	
			     C	        push    bp
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
CP/DOS DosSetCtryCode mapper                                Page     1-2


			     C	        mov     bp,sp
			     C	        pushal
			     C	
			     C	        endm
			     C	;
			     C	Mexit   macro
			     C	
			     C	        popal
			     C	        mov     sp,bp
			     C	        pop     bp
			     C	
			     C	        endm
			     C	
				
				str         struc
 0000  0000			Old_bp      dw       ?
 0002  00000000			Return      dd       ?
 0006  00000000			Ccode       dd       ?        ; country code
 000A				str         ends
				
 0000				dossetctrycode  proc far
				            Enter    dossetctrycode        ; push registers
				
 000C  C5 76 06			            lds      si,[bp].ccode
 000F  8B 04			            mov      ax,word ptr [si]      ; get country code
 0011  B9 00FF			            mov      cx,255
 0014  3B C1			            cmp      ax,cx                 ; check for country code >= 255
 0016  7C 04			            jl       okay                  ; branch if less
				
 0018  8B D8			            mov      bx,ax                 ; if so, load into bx
 001A  8A C1			            mov      al,cl                 ; and set flag
 001C  BA FFFF			okay:       mov      dx,0ffffh             ; Set DX
				
 001F  B4 38			            mov      ah,38h                ; DOS INT function code
 0021  CD 21			            int      21h                   ; set country information
 0023  72 02			            jc       exit                  ; branch if error
				
 0025  2B C0			            sub      ax,ax                 ; set good return
 0027				exit:       mexit                          ; pop registers
 0033  CA 0004			            ret      size  str - 6         ; return
				
 0036				dossetctrycode endp
 0036				dosxxx      ends
				            end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
CP/DOS DosSetCtryCode mapper                                Symbols-1


Macros:

		N a m e			Lines

ENTER  . . . . . . . . . . . . .  	   3
MEXIT  . . . . . . . . . . . . .  	   3
POPAL  . . . . . . . . . . . . .  	   9
PUSHAL . . . . . . . . . . . . .  	   9

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

STR  . . . . . . . . . . . . . .  	000A	0003
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  CCODE  . . . . . . . . . . . .  	0006

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0036	PARA	NONE	

Symbols:            

                N a m e         	Type	 Value	 Attr

dossetctrycode . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 0036

EXIT . . . . . . . . . . . . . .  	L NEAR	0027	DOSXXX

OKAY . . . . . . . . . . . . . .  	L NEAR	001C	DOSXXX

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  scntry		
@VERSION . . . . . . . . . . . .  	TEXT  510		


    103 Source  Lines
    127 Total   Lines
     17 Symbols

  47448 + 276565 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
