Hello,
Could someone please look at this code and tell me why it is not working. I am trying to retrieve the number that is stored in the "Hundredths" section of the system time and output it to the screen.
Thanks.
.MODEL SMALL
.286
.STACK 100h
.DATA
Typed DB LF,LF,CR,' My answer is "$'
CharTyped DB ?
.CODE
Main:
call Clock
mov CharTyped,dl
call PutChar
mov ax,@data
mov ds,ax
lea dx,Typed
call PrintString
call PutChar
TerminateProg:
mov ax,4c00h
int 21h
;********************* Near procedure to print a char
;*****************************************************
PutChar PROC
mov ah,02h
int 21h
ret
PutChar ENDP
;******************* Near procedure to print a string
;*****************************************************
PrintString PROC ;Define procedure
mov ah,9h ;DOS print string function #9
int 21h ;display the string
ret ;Return to calling procedure
PrintString ENDP ;End of procedure
;********************* Procedure to Read System Clock
;*****************************************************
Clock PROC
mov ah,2ch
int 21h
ret
Clock ENDP
END Main