Thread: DEBUG-MS-DOS- In Assembly Languange

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    34

    DEBUG-MS-DOS- In Assembly Languange

    In this forum is there any section for assembly language programming? the one using CMD.. I need help on this language.. i still new on it

  2. #2
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    On a C forum? Not really.

    And "cmd" isn't MS-DOS any more and hasn't been for a LONG time. MS-DOS went out with Windows 98 (it was under the hood on Windows ME, but much better hidden). We still refer to "cmd" windows as "DOS boxes" but they aren't. And "debug" was an ancient DOS command that is no longer present in windows even though you used to be able to use it (badly) to help write and debug assembler code (and any other code that ran on DOS).

    Also, assembly language programming has little to do with cmd windows, or MS-DOS, it's just another language to write it (all of the software on grc.com is written in hand-coded assembler language, to my knowledge, but are proper Windows programs).

    So do you mean assembler programming, or something else?
    If so, do you mean targeting MS DOS, or Win32 (or something else)?
    If you mean DOS, do you mean you want to learn to program using debug? (I'd advise you not to waste your time).
    If you mean Win32, what do you mean by including "debug" in your post? The program (which isn't in Microsoft operating systems any more), or debugging (as a process)?

    Getting the right terminology helps you point you in the direction of what you are after. I suspect you just want to learn to write assembly language, which doesn't require DOS, "cmd" or "debug" at all.

    Signed,
    Someone who used to use DEBUG to write and edit MS-DOS programs back before Windows even existed.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    34
    Quote Originally Posted by ledow View Post
    On a C forum? Not really.

    And "cmd" isn't MS-DOS any more and hasn't been for a LONG time. MS-DOS went out with Windows 98 (it was under the hood on Windows ME, but much better hidden). We still refer to "cmd" windows as "DOS boxes" but they aren't. And "debug" was an ancient DOS command that is no longer present in windows even though you used to be able to use it (badly) to help write and debug assembler code (and any other code that ran on DOS).

    Also, assembly language programming has little to do with cmd windows, or MS-DOS, it's just another language to write it (all of the software on grc.com is written in hand-coded assembler language, to my knowledge, but are proper Windows programs).

    So do you mean assembler programming, or something else?
    If so, do you mean targeting MS DOS, or Win32 (or something else)?
    If you mean DOS, do you mean you want to learn to program using debug? (I'd advise you not to waste your time).
    If you mean Win32, what do you mean by including "debug" in your post? The program (which isn't in Microsoft operating systems any more), or debugging (as a process)?

    Getting the right terminology helps you point you in the direction of what you are after. I suspect you just want to learn to write assembly language, which doesn't require DOS, "cmd" or "debug" at all.

    Signed,
    Someone who used to use DEBUG to write and edit MS-DOS programs back before Windows even existed.
    uhm i not so sure.. i think its win32.. since i just followed the instruction in the task.. here the example


    1. Type the following simple assembly language program using two addresses to compute arithmetic expressions. Noted that, all arithmetic expressions involved are using hexadecimal. (Use the calculator from MS Windows to check and convert the hexadecimal).


    C:\debug <press enter>
    - a 0100 <press enter>
    mov ax, 1
    mov bx, 2
    mov cx, 3
    add ax, bx
    add ax, cx
    int 3
    <press enter to exit assembly mode>

    - u 0100 <to double check the coding is correct>

    - r <notice the value in the register AX, BX, CX>

    - g <to execute the assembly program>

    this assembly language that i mean.. i already searching around still cannt get it..

  4. #4
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    That's MS-DOS debug, alright. For which you won't find any up-to-date articles past about 1998. The program isn't even distributed by Microsoft any more.

    But the internal bit (the "mov ax, 1" up to "int 3") is just plain assembly language. Stick it in any assembler and it would understand it. NASM is a good assembler. Try just googling for "x86 assembly language tutorial" or maybe even "nasm assembly tutorial"

    You're learning x86 assembly language. The tool you're using is VASTLY outdated and obsolete (I doubt it does a lot of the modern processor instructions, etc.). Ditch MS-DOS and debug and get a better tool (e.g. NASM on any version of windows), and carry on learning x86 assembly language.

    Be warned - most of the things you will find about assembly language are likely to be out-of-date too, because it has it's history in things like MS-DOS. But there are modern tutorials if you look around, and there's nothing stopping you writing that kind of thing in a modern Windows IDE, say, Eclipse with the asmplugin (asmplugin | Free Development software downloads at SourceForge.net).

    But it's not related to C at all, really, so you'll have to go find yourself an assembly language forum. There's dozens of them. Use google. If you can't find them on Google, assembly language probably isn't for you...

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  5. #5
    Registered User
    Join Date
    Oct 2012
    Posts
    34
    Quote Originally Posted by ledow View Post
    That's MS-DOS debug, alright. For which you won't find any up-to-date articles past about 1998. The program isn't even distributed by Microsoft any more.

    But the internal bit (the "mov ax, 1" up to "int 3") is just plain assembly language. Stick it in any assembler and it would understand it. NASM is a good assembler. Try just googling for "x86 assembly language tutorial" or maybe even "nasm assembly tutorial"

    You're learning x86 assembly language. The tool you're using is VASTLY outdated and obsolete (I doubt it does a lot of the modern processor instructions, etc.). Ditch MS-DOS and debug and get a better tool (e.g. NASM on any version of windows), and carry on learning x86 assembly language.

    Be warned - most of the things you will find about assembly language are likely to be out-of-date too, because it has it's history in things like MS-DOS. But there are modern tutorials if you look around, and there's nothing stopping you writing that kind of thing in a modern Windows IDE, say, Eclipse with the asmplugin (asmplugin | Free Development software downloads at SourceForge.net).

    But it's not related to C at all, really, so you'll have to go find yourself an assembly language forum. There's dozens of them. Use google. If you can't find them on Google, assembly language probably isn't for you...
    which Eclipse i will prefer? theres alot type of eclipse.. i will trying to find it out the way to code the simple programming in assembly language

  6. #6
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    I suggest you find an ASM programming forum, where they are much more likely to have a useful answer. The last time I programmed assembler, Bill Gates was all-but unknown and computer users had started to worry about extended/expanded memory above 640kb.

    This is a C forum, primarily. Hell, googling as I advised you pops up an article on this very forum about forums dealing with assembler, a topic that was closed because it wasn't C related and had links that still work in it.

    And, I'll reiterate: If you can't Google this sort of stuff and come up with something in about 2 minutes, then the chances that you'll get far through a proper assembler tutorial are slim. And I happen to think that assembler is quite simple to learn up to a point.

    Honestly? Don't be a lazy computer user. Because it will make you an even lazier programmer. Go find what you're after, or find a relevant forum to ask. It LITERALLY takes less time than it took to write your previous post.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert assembly>machine code, machine code>assembly
    By wenxinleong in forum C Programming
    Replies: 12
    Last Post: 06-23-2011, 10:42 PM
  2. Microprocessors/Debug/Assembly
    By mcgeady in forum Tech Board
    Replies: 1
    Last Post: 11-07-2005, 05:50 AM
  3. Assembly
    By Invictus in forum C++ Programming
    Replies: 4
    Last Post: 02-20-2005, 08:48 PM
  4. debug and assembly programming
    By akhitesh in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 09-27-2003, 01:59 AM
  5. assembly
    By krappykoder in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 10-25-2002, 04:57 PM