Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 9

Debug Commands

It has a number of commands to facilitate users


to write, execute and debug programs.
A DEBUG command is represented by a one-letter
symbol.
DEBUG commands are not case-sensitive.

A Assemble Command.: It allows user to enter assembly


language program and converts it into machine codes.
Syntax: A [offset-address]
U Unassemble Command : It disassembles machine codes
of specified memory addresses and gives corresponding
mnemonics.
Syntax: U [address-range]
R Register Command : Used to display the contents of
one or more registers. It also display the status of the
flags.
Syntax: R [register name]
G Go Command : It is used to execute a program.
Syntax: G [= address]
T Trace Command : It is used to run a program in
single-step mode.
Syntax: T = address [step]

D Display or Dump Command : It is used to


display the contents of specified memory
locations.
Syntax: D address-range or D address
E Enter Command : It is used to enter the
data or machine code. Its default register is
the DS.
Syntax: E address
F Fill Command : It is used to fill the
specified range of locations with the values
given in a list.
Syntax: F address-range values
M Move Command : It copies the block of
data from one memory area to another.
Syntax: M range address

Directives
DB Define Byte : It defines a byte type
variable. It direct the assembler to reserve one
byte of memory and initialize that byte with the
specified value. It can define single or
multiple variables.
Examples:
Temperature DB 10
Temperature DB ?
Temperature DB 10. 20. 30. 40. 50
Temperature DB ?. ?. ?. ?. ?
Temperature DB 100 DUP(?)
Temperature DB 10. 5 dup(55). 20
Temperature DB 4 DUP( 3 DUP(5))
Temperature DB ABCD

DW Define Word : It defines a word type


variable. It direct the assembler to reserve two
byte of memory and initialize those bytes with
the specified value. It can define single or
multiple variables.
Examples :
Temperature DW 1234H
Temperature DW 1234. 5678. 1456
Temperature DW 2 DUP(0)

DD Define Double Word : It defines a double


word(4 bytes) type variable. It direct the
assembler to reserve four byte of memory and
initialize those bytes with the specified value.
It can define single or multiple variables.
Examples :
Temperature DD 12345678
Temperature DD 5 DUP(0)
DQ Define Quad Word : It defines a quad
word(8 bytes) type variable. It direct the
assembler to reserve eight byte of memory and
initialize those bytes with the specified value.
It can define single or multiple variables.
Examples :
Temperature DQ 12345678
Temperature DQ 5 DUP(0)
DT Define Ten Bytes

EXTRN External : It tells the assembler


that names or labels following the directive are
in some other assembly module.
Examples:
EXTERN Temperature : word
EXTERN Temperature : far
PUBLIC : It informs the assembler that the
defined name or label can be accessed from other
program modules.
Examples:
PUBLIC Temperature1, Temperature2

ENDS : It informs the assembler the end of the


segment.
Syntax: segment name ENDS
ENDP : It indicate the end of procedure.
Syntax: procedure name ENDP
END : It indicate the end of the program.
ASSUME : This tells the assembler the name of a
logical segment, which is to be used for a
specified segment.
Examples: ASSUME CS:code; DS:data
EQU : It assign name to some value.
Examples: Temp EQU 04H
ORG : It tells the assembler to assign addresses
to data items or instruction in a program.

You might also like