You are here:

Assembly Language/Assembly Language in debug mode

Advertisement


Question
Hello,
    I'm having a little trouble with assembly language and wondering if you can help.  I am learning how assembly language was back in the days before masm. For example.
This is in Command Prompt.

Debug
-nzero.com
a 100
mov dl, 30
inc dx
mov ah, 02
int 21h
int 20h

I created a program called zero.com  How do I save the program when i'm done?  For some reason when I put -q to quit I cant find my zero.com Program I dont think I properly exited.  How do I save the program after i'm done? also, Could you write me a program in debug mode to print out just my first name? Thank you for taking the time in reading my long help letter.

Johnny

Answer
1) You cannot save everything to the file. debug is not a patching utility, nor a programmer's IDE - it is a debugger.
Use any text editor and tasm (masm, any other asm) to compile the sources.
debug lets you save disk sectors. I don't think it is a good idea to try it on your fat32. :)
2)
-a 100
0A9B:0100 mov ah,9
0A9B:0102 mov dx,200
0A9B:0105 int 21
0A9B:0107 int 20
0A9B:0109
-e 200 4a 4f 4e 4e 59 24
-g

good luck

Assembly Language

All Answers


Ask Experts

Volunteer


daru

Expertise

Pascal inline assembler; pure assembler programs for DOS; interrupt handling; TSR building; debugging and reverse engineering.

Experience

About 5 years of programming and reverse engineering.

©2012 About.com, a part of The New York Times Company. All rights reserved.