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


				
				;
				page 80,132
				;
				title CP/DOS DosCaseMap
				;
 0000				dosxxx  segment byte public 'dos'
				        assume  cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				
				;**********************************************************************
				;*
				;*   MODULE:   doscasemap
				;*
				;*
				;*   CALLING SEQUENCE:
				;*
				;*             PUSH     WORD    Length
				;*             PUSH@    DWORD   CountryCode
				;*             PUSH@    DWORD   BinaryString
				;*             DosCaseMap
				;*
				;*   MODULES CALLED:  none
				;*
				;*********************************************************************
				
				        public  doscasemap
				        .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
			     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			StringPtr       dd      ?       ; binary string pointer
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
CP/DOS DosCaseMap                                           Page     1-2


 000A  00000000			CountryCodePtr  dd      ?       ; country code pointer
 000E  0000			StringLength    dw      ?       ; lenght of the string
 0010				str     ends
				
 0000				DosCaseMap      proc    far
				
				        Enter  DosCaseMap               ; save registers
				
				; Get the country, so we can then get the country case map stuff
				
 000C  C5 76 0A			        lds     si,[bp].CountryCodePtr
 000F  8B 04			        mov     ax,ds:[si]
				
				; Note: do the country selection later (maybe never)
				
 0011  C5 76 06			        lds     si,[bp].StringPtr
 0014  8B 4E 0E			        mov     cx,[bp].StringLength
				
 0017				MapLoop:                                ; convert characters to upper case
 0017  AC			        lodsb
 0018  3C 61			        cmp     al,'a'
 001A  72 09			        jc      ThisCharDone
				
 001C  3C 7B			        cmp     al,'z'+1
 001E  73 05			        jnc     ThisCharDone
				
 0020  04 E0			        add     al,'A' - 'a'
 0022  88 44 FF			        mov     ds:[si-1],al
				
 0025				ThisCharDone:
 0025  E2 F0			        loop    MapLoop                 ; loop until string is complete
				
				        MExit                           ; pop registers
 0033  CA 000A			        ret     size str - 6            ; return
				;
 0036				DosCaseMap      endp
				
 0036				dosxxx  ends
				
				        end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
CP/DOS DosCaseMap                                           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  . . . . . . . . . . . . . .  	0010	0005
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  STRINGPTR  . . . . . . . . . .  	0006
  COUNTRYCODEPTR . . . . . . . .  	000A
  STRINGLENGTH . . . . . . . . .  	000E

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0036	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

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

MAPLOOP  . . . . . . . . . . . .  	L NEAR	0017	DOSXXX

THISCHARDONE . . . . . . . . . .  	L NEAR	0025	DOSXXX

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


    119 Source  Lines
    143 Total   Lines
     20 Symbols

  47414 + 290949 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
