Home › Forums › C Programming › Using the interrupts in c language › Reply To: Using the interrupts in c language
February 13, 2005 at 12:15 pm
#3131
coolsoum
Participant
As i already explained how to use intrepput routine in BIOS now here is example to get the time from the CMOS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include<dos.h><br /> #include<stdio.h><br /> void main()<br /> {<br /> int size[10],i=0;<br /> union REGS inregs,outregs;<br /> inregs.h.ah=0x02;<br /> int86(0x1A,&inregs,&outregs);<br /> size[0]=outregs.h.ch;<br /> size[1]=outregs.h.cl;<br /> size[2]=outregs.h.dh;<br /> size[3]=outregs.h.dl;<br /> printf("n%d",size);<br /> for(i=1;i<=3;i++)<br /> printf(":%d",size);<br /> } |