Interrupt Handling with C SREGS REGS union BYTEREGS WORDREGS Structures int86 int86x intdos intdosx segread

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

Interrupt Handling with C

C is sometimes called a high level assembly language because it can call the different interrupts using some of its some defined functions. Some important functions are as follows:

  • int86: Invokes MS-DOS interrupts.
  • int86x: Invokes MS-DOS interrupt with segment register values.
  • intdos: invokes MS-DOS service using registers other than DX and AL
  • intdosx: invokes MS-DOS service with segment register values.
  • segread: Reads Segment registers

We shall discuss these functions in detail. First of all we discuss some predefined structure and unions that are frequently or necessarily used with these functions.

SREGS Structure

This structure has been defined in dos.h and it is a structure of the segment registers passed to and filled in by the functions, int86x, intdosx and segread. The declaration of the structure is as follows:

struct SREGS {
unsigned int es;
unsigned int cs;
unsigned int ss;
unsigned int ds;
};

REGS union

REGS is the union of two structures. The union REGS has been defined dos.h and it is used to pass information to and from the functions, int86, int86x, intdos and intdosx. The declaration of the union is as follows:

union REGS {
struct WORDREGS x;
struct BYTEREGS h;

};

BYTEREGS and WORDREGS Structures

The BYTEREGES and WORDREGS structures have been defined in dos.h and these are used for storing byte and word registers. The WORGREGS structure allows the user to access the registers of CPU as 16-bit quantities where BYTEREGES structure gives the access to the individual 8-bit registers.

The BITEREGS structure is declared as follows:

struct BYTEREGS {
unsigned char al, ah, bl, bh;
unsigned char cl, ch, dl, dh;
};
And the WORDREGS structure is declared as follows:

struct WORDREGS {
unsigned int ax, bx, cx, dx;
unsigned int si, di, cflag, flags;
};

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20


page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 

 

Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor