Program for digital clock design using 8086.
Aim:
To write an assembly language program to displaycurrent system time.(DOS PROGRAMMING)
Software required:
TASM TURBO ASSEMBLER
Program:
.MODEL SMALL .STACK 100H .DATA PROMPT DB 'Current System Time is : $' TIME DB '00:00:00$' .CODE MAIN PROC MOV AX, @DATA MOV DS, AX LEA BX, TIME CALL GET_TIME LEA DX, PROMPT MOV AH, 09H INT 21H LEA DX, TIME MOV AH, 09H INT 21H MOV AH, 4CH INT 21H MAIN ENDP GET_TIME PROC PUSH AX PUSH CX MOV AH, 2CH INT 21H MOV AL, CH CALL CONVERT MOV [BX], AX MOV AL, CL CALL CONVERT MOV [BX + 3], AX MOV AL, DH CALL CONVERT MOV [BX + 6], AX POP CX POP AX RET GET_TIME ENDP CONVERT PROC PUSH DX MOV AH, 0 MOV DL, 10 DIV DL OR AX, 3030H POP DX RET CONVERT ENDP END MAIN
Result:
-
UpdatedNov 05, 2014
-
Views24,324
You May Like
Programs for 16 bit arithmetic operations for 8086 (using various addressing modes)
Program for String manipulations for 8086
Program for sorting an array for 8086
Program for searching for a number or character in a string for 8086
Program for digital clock design using 8086.
Programming using arithmetic, logical and bit manipulation instructions of 8051