The REGS union elements used in C, equivalent to Assembly language have been in the table given next:
16-bit |
8-bit |
C language |
Assembly language |
C language |
Assembly language |
inregs.x.ax |
AX |
inregs.h.al |
AL |
|
|
inregs.h.ah |
AH |
inregs.x.bx |
BX |
inregs.h.bl |
BL |
|
|
inregs.h.bh |
BH |
inregs.x.cx |
CX |
inregs.h.cl |
CL |
|
|
inregs.h.ch |
CH |
inregs.x.dx |
DX |
inregs.h.dl |
DL |
|
|
inregs.h.dh |
DH |
inregs.x.si |
SI |
|
|
inregs.x.di |
DI |
|
|
inregs.x.cflag |
CF |
|
|
Let us see the examples of int86 and int86x functions. The Following Program Scans the every sector of the floppy disk and prints the status of every sector on the screen.
/* Program To Scan Every Sector Of The Floppy Disk and
Print the Status */
#include<dos.h>
#include<conio.h>
void main()
{
int head,track,sector,i;
char *buf;
union REGS inregs, outregs;
struct SREGS sregs;
clrscr();
| Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi |
|
Publishers of the Book
Number of Pages
ISBN
Price of the Book
|
BPB Publications, New Delhi, India
540
81-7656-922-4
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)
|
 |
|
|