0% found this document useful (0 votes)
75 views

CMP3011 - Lab 1 - Setup

The document provides instructions for setting up DOSBOX and the DEBUG utility to learn assembly language programming. It outlines objectives for becoming familiar with memory segmentation, the computer's language, the ASCII table, and basic assembly statements. Students will set up DOSBOX, install DEBUG, and use DEBUG commands like Display, Register, Fill, Assemble, Trace, and Run to step through a sample assembly program. Understanding DEBUG is a first step toward systems programming.

Uploaded by

Study Bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

CMP3011 - Lab 1 - Setup

The document provides instructions for setting up DOSBOX and the DEBUG utility to learn assembly language programming. It outlines objectives for becoming familiar with memory segmentation, the computer's language, the ASCII table, and basic assembly statements. Students will set up DOSBOX, install DEBUG, and use DEBUG commands like Display, Register, Fill, Assemble, Trace, and Run to step through a sample assembly program. Understanding DEBUG is a first step toward systems programming.

Uploaded by

Study Bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

School of Computing & Information Technology

Computer Organization & Assembly – CMP3011


Lab 1
Objectives:
• Set up DOSBOX
• Install DEBUG
• Become familiar with the debugger commands
o Appreciate how memory is segmented
o Recognize the language of the computer
o Associate the ASCII table and data stored in memory
o Appreciate the syntax for simple Assembly language statements
o Single step through a series of Assembly Language statements
o Run an executable program
The DEBUG is a MS-DOS utility that is useful for looking at portions of your computer and
writing assembly code to perform certain tasks on your computer. The DEBUG commands
allow you to enter machine language for creating programs or testing the computer
peripherals. In circumstances where only DOS is installed, it can be used for editing binary
files. It can also be used to edit disk sectors, which is one method of removing boot-sector
viruses, test ports, clear CMOS, test joystick, erase all hard drive information, discharge old
laptop batteries, reboot your computer, create sleep files, check BIOS date and video card
type and run printer test. DEBUG is also able to allow you to create and rum .COM files from
files stored with a .scr extension. Understanding DEBUG could be your first step towards
system programming.
NOTE: Newer versions of Windows (later than XP) no longer include the DEBUG
command.
HAZARD WARNING: It is highly recommended that you DO NOT EXPERIMENT with
commands as there is the potential of permanently damaging your device.

DOS BOX & DEBUG Set up


DEBUG
✓ Click https://sites.google.com/site/pcdosretro/enhdebug
✓ Scroll to bottom left until see Download DEBUG 1.32b
✓ Click to download
✓ Extract zip folder,
✓ After folder downloads copy all content into C: drive (or a created a folder)

DOSBOX
✓ Click link - https://www.dosbox.com/download.php?main=1
✓ Click Download Now
✓ Install download file DOSBox0.74-3-win32-installer. After install shortcut will
appear on desktop with the name DOSBOX 0.74-3

Prepared by: Karlene M. Black 1


✓ Double click icon. This will open with Z:\>

✓ Type the commands below:


• mount C C:\ [Enter] ➔ Drive C: will be mounted (You may get a warning;
ignore it).
• C: [Enter] If you downloaded to a folder, specify path.
• debug [Enter] ; all you should see is a dash (-). Await further instructions.

Note: If you get “ILLEGAL COMMAND” it could be that the DEBUG files are not in your
C: root folder. You need to either change to the appropriate folder using the CD (Change
directory) command

Further help:
DosBox Video Link - https://www.youtube.com/watch?v=wSvE3Uo6_DU

Prepared by: Karlene M. Black 2


Executing DEBUG Commands
• Help (?)
• Exit (Q)
• Display the memory contents (D)
• Display the register contents (R)
• Fill portions of memory a byte sequence (F)
• Creates machine executable code in memory (A)
• Trace through CPU instructions one at a time (T)
• Run a program (G)
Start with the A command and type the bolded statements:
xxxx:0100 jmp 126
xxxx:0102 db 0d,0a,'This is my first DEBUG program!'
xxxx:0123 db 0d,0a,'$'
xxxx:0126 xor ax,ax
xxxx:0128 mov ah,9
xxxx:012A mov dx,102
xxxx:012D int 21
xxxx:012F mov ax,4c
xxxx:0132 int 21
xxxx:0134

Note: Alert your tutor of errors.

References:
• https://montcs.bloomu.edu/Information/LowLevel/DOS-Debug.html
• https://thestarman.pcministry.com/asm/debug/debug.htm

Prepared by: Karlene M. Black 3

You might also like