Advantages of the Assembler Instruction, operative system interruption functions knowing more the operation of your PC control of the computer make the backup of DBR and to load the backup of DBR to its original location

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

It is not necessary to write the comments which go after the ";". Once the last command has been typed, int 20, <Enter> is pressed without writing anything more, to see the Debugger prompt again.

The last written line is not properly an assembler Instruction, instead it is a call for an operative system interruption, these interruptions save us a great deal of lines and are very useful to access operative system functions.

To execute the program we wrote, the "g" command is used, and when used we will see a message that says:

"Program terminated normally". Naturally with a message like this one we can not be sure the program has done the addition, but there is a simple way to verify it, by using the "r" command of the Debug we can see the contents of all the registers of the processor, simply type:

-r <Enter>

Each register with its respective actual value will appear on the screen like this:

AX=0006 BX=0004 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000
DS=0C1B ES=0C1B SS=0C1B CS=0C1B IP=010A NV UP EI PL NZ NA PO NC
0C1B:010A OF DB

The possibility that the registers contain different values exists, but AX and BX must be the same, since they are the ones we just modified.

Another way to see the values, while the program is executed, is to use the address where we want the execution to end and show the values of the registers as a parameter for "g", in this case it would be: g108, this Instruction executes the program, it stops on the 108 address and shows the contents of the registers.

A follow up of what is happening in the registers can be done by using the "t" command (trace), the function of this command is to execute line by line what was assembled, showing each time the contents of the registers.

To exit Debug use the "q" (quit) command.

Advantages of the Assembler

The first reason to work with assembler is that it provides the opportunity of knowing more the operation of your PC, which allows the development of software in a more consistent manner.

The second reason is the total control of the computer, which you can have with the use of the assembler. Another reason is that the assembly based programs are quicker and in some cases they are smaller, and have larger capacities than ones created with other languages.

Let me keep my promise!!

In the earlier part of this chapter we were using some instructins as example, to make the backup of DBR and to load the backup of DBR to its original location when it is needed. First we examine the Instruction to make the backup.

C:\>DEBUG  A:\BKDBR.BIN <Enter>
File not found

  1. L  100  2  0  1  <Enter>
  2. R  CX     <Enter>

CX  0000
:     200   <Enter>

  1. W    <Enter>

Writing 00200 bytes

  1. Q  <Enter>

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

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