1/38
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Debug
A software that is classified as debugger which is used for testing and debugging executable programs.
Hexadecimal Format
Debug displays all program code and data in ________ and any data that you enter into memory must also in hex form.
CLS
CD
DIR
COPY
DEL
REN
MD
RD
Common Disk Operating System Commands
CL
clear
CD
change dir
DIR
Directory
COPY
copy
DEL
delete
REN
rename
MD
make directory
RD
remove directory
65,280 bytes or less
DEBUG was originally designed to work with .COM programs having a maximum size of only ___________.
FF hex
The subtraction of 256 bytes is necessary since DEBUG often uses the area from offset 00 through _______.
It is free.
It is universally available.
It is simple to use.
It requires relatively little memory.
Advantages of Debug.
Q
H
R
E
D
A
T
G
U
N
W
Debug Commands
Q (Quit)
Finishes the Debug session and exits back to DOS environment
H (Hexarithmetic)
Shows the sum and difference of two 4-bit hexadecimal numbers, coded as H <hex value> <hex value>
R (Register)
Allows you to display all registers and their values. It also shows the next instruction and permits you to change the value of a particular register.
E (Enter)
Enables you to key in data or machine instructions into memory beginning at a specific location address.
D (Display or Dump)
Displays the content of a portion memory in hex and ASCII forms starting with the given address.
A (Assemble)
Allows you to create program in mnemonic or symbolic code. It also translates this assembly source statements that you create into machine code.
T (Trace)
Runs the program in a single-step mode. It also displays the new values of the registers and the next instructions to be executed.
G (Go)
Runs the program as a whole in memory and displays the output.
U (Unassemble)
Lists all the instructions contained in the program beginning at the given address. You can also specify the last address location.
N (Name)
Gives a name to your program, coded as N <path><filename>. The base name of the filename must be eight characters long and the extension name is .COM
W (Write)
Saves the program onto the disk storage.
<segment>:<offset>
One of the rules of Debug Commands you should specify segments and offsets with a colon, in the form __________.
Starting Debug
Key in the word debug and press enter. A hyphen (-) appears on the screen, that is the DEBUG prompt. DEBUG is now ready to accept commands.
Quitting and Closing Debug
To close Debug and go back to DOS environment: type Q and press ENTER key.
MOV
ADD
SUB
MUL
DIV
INC
DEC
LOOP
Basic Assembly Instructions Used in Debug
MOV (Move Data)
It copies and transfers data between two registers, or between an immediate data to a register.
ADD (Add Data)
It is used to get the sum of two registers or a register and an immediate data, and stores the result to the left most register.
SUB (Subtract Data)
It is used to get the difference of two registers or a register and an immediate data, and stores the result to the left most register.
MUL (Multiply Data)
It is used to get the product of the given register and AX register, and stores the result to AX register. If the product is greater than 16 bits, the overflow is stored in DX register.
DIV (Divide Data)
It is used to divide the value of a given register and AX register, and stores the quotient to AX and the remainder to DX registers respectively.
INC (Increment by one)
It is used to increase the value of the register by one (1).
DEC (Decrement by one)
The opposite of INC, instead of increasing, it decreases the value of the register by one (1).
LOOP (Loop Until Complete)
It controls the execution of a program segment in a specified number of times.
CX
The ____ register should contain a count value before starting the loop and automatically decrements by one (1). If CX is not equal to zero (0), it transfers to its operand address which points to the start of the loop; otherwise it drops through to the next instruction.