Re: Tutorial for beginners

From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 03/03/04


Date: Wed, 3 Mar 2004 07:41:30 +0000 (UTC)

I did one of my first assembly programs in DOS. It was DOS
4.01.

Here it is:
Start Debug.exe
-n Hello.com
-rcx
500

-a 100
mov ah, 09
mov dx, 300
int 21
int 20

-db 300
'Hello$'

You'll see some other things. The - represents the DEBUG
prompt. DEBUG is a program used to look at small .com files.
It'll work with .exe files as well, but I've not made it quite that
far yet to qaulify myself. When you're typing in some of the
things above, you'll need to hit the ENTER key at the end of
the typing. Basically assembly is moving data into registers...
the registers consist of AX, BX, CX, DX. These registers are
all 16-bit registers. They are also called EAX, EBX, ECX and
EDX. The AX register can be broken down into AH and AL.
EAX can be broken down into two things I think, but I haven't
got that far. I might be wrong on some things. I'm looking for
help and support... I think I'm typing things in the correct way.
<g> I'm just now starting to get back into it and I really need
some crash course lessons, so I figure that someone will fix
what I'm messing up! <G> I hope!

The n command in DEBUG is the NAME command. Oh...
you need to type the Q command after everything above to
get out of DEBUG.

The Interrupt 21 is the DOS display string command. I'm sure
there's some fancier name for it but what it does, is it displays
a $ terminated string that's pointed to by the DX register.

You can get some help with the other DEBUG commands by
typing ? at the dash -.

I hope that helps to get you started.

There are a thousand DOS Interrupt 21 commands. They all
do something different. The different functions are specified by
what's put into the AH register. In the case above, it's called
Function 9h. As you'll notice, DEBUG works in hex.

Cheers to you.

-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"Sathyaish" <VisualBasicLearner@yahoo.com> wrote in message
news:7b662036.0403020054.308ef27d@posting.google.com...
Thanks a tonne, Randy.
I have been programming VB and Win32 API (SDK) for the last six and a
half years now. While I've worked extensively on Win32, I am only
familiar with C, C++ and MFC. I have no knowledge of assembly though.
Thank you so much once more.
Regards,
Sathyaish Chakravarthy
"Randall Hyde" <randyhyde@earthlink.net> wrote in message
news:<CZS0c.17145$aT1.9279@newsread1.news.pas.earthlink.net>...
> http://webster.cs.ucr.edu
> The Art of Assembly Language Programming.
> Though it does assume some familiarity with high-level languages.
> Check out Jeff Duntemann's book "Assembly Step-By-Step" if
> you're attempting to learn assembly language as your first language.
> Cheers,
> Randy Hyde
>
> "Sathyaish" <VisualBasicLearner@yahoo.com> wrote in message
> news:7b662036.0403010236.53fd1c00@posting.google.com...
> > Sorry for sounding dumb. Where can I find a web tutorial on the
> > assembly language for absolute beginners?
> >


Relevant Pages

  • Writing to Serial Port Problem Loosing data
    ... I have been programming the serial port. ... I send an initial command that will cause the device to wait ... firing more than once before the data is finished being sent and ... I am basically trying to convert the old dos program ...
    (comp.lang.basic.realbasic)
  • Re: assembly language and reverse engineering
    ... in Windows assembly programming what you can't learn when doing ... Windows API but about assembly programming). ... And you have far less to learn to get your first working DOS program than ... but, real mode is real mode, and pmode is pmode. ...
    (alt.lang.asm)
  • Re: Trivia Question
    ... >> Make all the excuses for your ignorance that you like, but, yes, ... I thought that this was the point of *all* programming languages ... registers are pushed on the stack for PUSHA/PUSHAD? ... And if you don't study the instruction set ...
    (alt.lang.asm)
  • Re: which book to start with...?
    ... Want to learn the DOS API. ... i dont really mind about the system but right now im stuck with Ubuntu. ... programming per se, but they are often the objective for many people to ... 32 bit assembler is even ...
    (alt.lang.asm)
  • Ive seen the future...and it works! (was: my view on this assembler is blah)
    ... > though the registers are few. ... And the 64 bit CPU designers ... what my Borland _C++ compiler_ does when you ask for assembly output...it ... out programming with something like BASIC or Pascal, ...
    (alt.lang.asm)