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


				;
				page 80,132
				;
				title CP/DOS DosGetDateTime mapper
				;
 0000				dosxxx	segment byte public 'dos'
					assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				;
				;**********************************************************************
				;*
				;*   MODULE:   dosgetdatetime
				;*
				;*   FUNCTION:	get date and time information
				;*
				;*   CALLING SEQUENCE:
				;*
				;*	 push@	   struc  date/time
				;*	 call	   dosgetdatetime
				;*
				;*   MODULES CALLED:  PC-DOS Int 21h, ah=2ah, get date
				;*				      ah=2ch, get time
				;*
				;*********************************************************************
				
					    public   dosgetdatetime
					    .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			data	    dd	     ?	     ; date and time info return pointer
 000A				str	    ends
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS DosGetDateTime mapper                                Page     1-2


				
 0000				dosgetdatetime	proc far
				
					    Enter    dosgetdatetime	   ; push registers
				
 000C  C5 76 06				    lds      si,[bp].data	   ; set return data area
				
 000F  B4 2C				    mov      ah,2ch		   ; get time information
 0011  CD 21				    int      21h
									   ; save info in return data are
 0013  88 2C				    mov      byte ptr [si],ch	   ; save hour
 0015  88 4C 01				    mov      byte ptr [si]+1,cl    ;	 minutes
 0018  88 74 02				    mov      byte ptr [si]+2,dh    ;	 seconds
 001B  88 54 03				    mov      byte ptr [si]+3,dl    ;	 hundredths
				
 001E  B4 2A				    mov      ah,2ah		   ; get date  and save it
 0020  CD 21				    int      21h		   ;	in return data area
				
 0022  88 54 04				    mov      byte ptr [si]+4,dl    ; save day
 0025  88 74 05				    mov      byte ptr [si]+5,dh    ;	 month
 0028  89 4C 06				    mov      word ptr [si]+6,cx    ;	 year
 002B  C7 44 08 0168			    mov      word ptr [si]+8,360   ;	 min. from GMT
 0030  88 44 0A				    mov      byte ptr [si]+10,al   ;	 day of week
				
 0033  2B C0			exit:	    sub      ax,ax		   ; set good return code
				
					    Mexit			   ; pop registers
 0041  CA 0004				    ret      size str - 6	   ; return
				
 0044				dosgetdatetime endp
				
 0044				dosxxx	    ends
				
					    end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS DosGetDateTime 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
  DATA . . . . . . . . . . . . .  	0006

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0044	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

dosgetdatetime . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 0044

EXIT . . . . . . . . . . . . . .  	L NEAR	0033	DOSXXX

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


    113 Source  Lines
    137 Total   Lines
     17 Symbols

  47486 + 300607 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
