Digital Clock developed in assembly language.
View the Project on GitHub AnindyaPaul/digital-clock-in-assembly
Digital Clock in assembly language is developed as an educational project to learn assembly language in more detail and have practical experience.
This interrupt is used to execute graphics based routines.
AH = 00H; set graphics mode
AL = 13H; graphics mode VGA 320 x 200 256 color
INT 10H
AH = 0CH; draw pixel
AL = color
BH = page
CX = column
DX = row
INT 10H
The bios interrupt 16H routine is the key-board driver. In order to take an input from the keyboard we have used this interrupt where the function value 00H was stored in AH.
AH = 00H; wait for a key press
INT 16H
This is a DOS interrupt. It is used to request different DOS function. The function value is stored in AH. In our program we have used three functions.
AL = interrupt number
AH = 35H; gets interrupt vector stored in AL
INT 21H; returns the address to ES:BX
AL = interrupt number
AH = 25H; sets interrupt vector stored in AL
INT 21H; sets the vector to DS:DX
AH = 2CH; gets the current time, CH = hour, CL = minute, DH = second
INT 21H;
AH = 4CH; returns program to DOS
INT 21H;
The 1CH interrupt is automatically generated by an internal clock circuit. It is generated about 18.2 times per second on an average. We can define a routine for this interrupt which will be executed every time the interrupt is generated. Since we need to continuously refresh the display, we simply define a routine to refresh the display.