Coal Questions
Coal Questions
Coal Questions
Describe the commands for Debugger in DOS Box and explain it shortly.
Assemble: A
Creates machine executable code in memory beginning at CS:0100 (or the specified
address) from the 8086/8088 (and 8087) Assembly Language instructions which are
entered.
Unassemble: U
Disassembles machine instructions into 8086 Assembly code. Without the optional
[range], it uses Offset 100 as its starting point, disassembles about 32 bytes and then
remembers the next byte it should start with if the command is used again.
Load: L
This command will load the selected number of sectors from any disk's Logical Drive
under the control of MS-DOS or Windows into Memory.
Move: M
It actually copies all the bytes from within the specified range to a new address.
Name: N
This command can be used to load files into debug's Memory after you have started
the program, but its main function is to create a new file under control of the Operating
System which debug can write data to.
Register: R
Entering ' r ' all by itself will display all of the 8086 register's contents and the next
instruction which the IP register points to in both machine code and an unassembled
(Assembly Language) form.
Trace: T
The T command is used to trace CPU instructions one at a time.
Fill: F
This command can also be used to clear large areas of Memory as well
as filling smaller areas with a continuously repeating phrase or single byte.
Write: W
The write command is often used to save a program to your hard disk from within
debug.
Enter: E
Used to enter data or instructions (as machine code) directly into Memory locations.
Go: G
Go is used to run a program and set breakpoints in the program's code.
Quit: Q
Immediately quits (exits) the Debug program.
Hex: H
It is a very simple (add and subtract only) Hex calculator.
Search: S
Searches within a range of addresses for a pattern of one or more-byte values given in
a list.
Compare: C
Compares two blocks of memory. If there are no differences, then debug simply
displays another prompt.
Question # 3:
Describe the steps for execution of program. And describe them shortly.
Mount:
A command inside DOSBox that can connect physical folders and drives
to virtual drives inside DOSBox. The mounted drive does not automatically
refresh files changed out side of DOSBox.
Mount c c:\MP
Edit:
A command inside DOSBox that is used to go away from debug screen after
typing filename and further writing Assembly Language program.
Edit file.asm
Masm:
MASM - is the Microsoft Macro Assembler. It is an assembler. It takes your code pre-
processes it and converts it to binary. The links it to runnable executable or an Object
file.
MASM file.asm;
Link:
It links the file and makes it into an object file.
LINK file.asm;
filename.exe:
After the object file is converted in the machine, it is finally ready to be executed.
It is an executable file that has a specific program and can be run on computer device.
TABLE SHOWING THE DATA AND CODE SIZE IN THE MODEL TYPE