Professional Documents
Culture Documents
TurboAssembler Debugger
TurboAssembler Debugger
TurboAssembler Debugger
Programming Process
program.asm
Assembler
program.o
Linker
program.exe
Page 12
mov ax,@data
mov ds,ax
lea dx,msg
mov ah,09h ;print string
int 21h
mov ax,4c00h ;exit to the operating system with no error
int 21h
end start
Page 13
Directives
Lines that start with a "." are used to provide the assembler with
information. The word(s) behind it say what kind of info.
.model small In this case it just tells the assembler the program is small
and doesn't need a lot of memory.
.stack This one tells the assembler that the "stack" segment starts
here. The stack is used to store temporary data. It isn't used in the
program, but it must be there, because we make an .EXE file and these
files MUST have a stack.
.data indicates that the data segment starts here and that the stack
segment ends there.
.code indicates that the code segment starts there and the data
segment ends there.
end start tells the assembler that the program is finished. It also tells
the assembler where to start the program.
Page 14
Page 15
Assembler Errors
.model small
.stack 200h
.data
msg db "Hello world!$"
.code
start:
mov ax,@data
mov ds,ax
lea dx,msg
mov es,1234
mov ah,09h
int 21h
mov ax,4c00h
int 21h
end start
Page 16
Page 17
Page 18
Page 19
You can write data directly into memory from the Dump window
Page 20
Page 21
Using Breakpoints
Page 22
Page 23
Function
Page 24
Shortcut
Alt + Enter
Run
F9
Trace into
F7
Step over
F8
Place a breakpoint
Alt + F2
Remove a breakpoint
F2