Showing posts with label interrupt 21. Show all posts
Showing posts with label interrupt 21. Show all posts

C Program to Display and Set System Time and Date Using 8086 Interrupts

This is a C Program to Display and Set System Time and Date Using 8086 Interrupts. Interrupt number 21 (in hexadecimal) is used to:
C program to get system time and date and also to set it using 8086 interrupt INT 21 interrupt 0x21 21h int86() function call interrupts in C program
Output of c Program to get and set system time and date 

  • Get System time
  • Set System time
  • Get System Date
  • Set System Date
To Get system date:
- Call interrupt 0x21 (hexadecimal) 
- AH (higher byte of accumulator) should be made equal to 2A (hex) before calling interrupt
Output: