News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Answer some Simple Questions, thanks!!

Started by dottywine, October 26, 2008, 11:16:00 PM

Previous topic - Next topic

FORTRANS

#15
Hi,

Quotedo you know of some rules I can use to know the limit of the registers?

   Well an eight bit register can hold unsigned values from zero to 2^8 - 1
(two to the eighth power minus 1) or 255 decimal,  A 16 bit register holds
0 to 2^16 - 1 which is 65535.  And 32 bit is left as an exercise.

   As to a label, if you think of memory as a sequence of numbered bytes, 0,
1, 2, 3, ... N, and you pretend they are pages in a book, then I can tell you
to go to page 20, you can do it.  But now I "label" some of the pages, I
can now tell you to go to chapter two.  Labels are a convenience to us
humans so we don't have to count bytes.

HTH,

Steve N.

xfpl

Quote from: PauloH on October 27, 2008, 11:20:17 AM
Why don't you learn C first ? It would make your steps a little smooth.
I can see that you have trouble understanding the compiler itself and I recommend you study it with more attention. By the way, study any subject always and just not the day before your test (this applies for any student in the world). Masm is not so difficult like that and X86 assembler is easier than you think.

I agree,too. I think you could learn C first.After you exactly know the ABCs of program and programming,to learn Assembly languages will be more easier,I think.


Regards,

David Feng

MichaelW

Quote from: dottywine on October 27, 2008, 04:24:37 PM
I'm not exactly sure where to find some basics. It looks like there is information on how to make it look nice and documented, but if you know of some more links with the basics, then I would appreciate it.

The information in the manuals is the basics, just not in a condensed form.

QuoteWhat are some ways to "process" an array?

See Defining and Using Complex Data Types here.

QuoteWhat is DUP(?)?

See the above link, under Declaring and Referencing Arrays, The DUP Operator.

QuoteWhat does it mean if there is a question mark? ex: var1 WORD ?

See Defining and Using Simple Data Types here, under Data Initialization.

QuoteWhat is the OFFSET operator?

See Using Addresses and Pointers here, under Immediate Operands.

QuoteWhat is the LABEL operator?

LABEL is a directive. See Directives here.

QuoteWhen is the overflow flag set?

See Understanding Global Concepts here, under Flags Register.

QuoteHow do you make a code with multiple procedures?

See Controlling Program Flow here, under Procedures.

QuoteWhy make multiple procedures when you can just have different labels that you can jump to?

See the above link, and consider the many features that procedures provide, that would need to be coded manually with a label.
eschew obfuscation

dottywine


jj2007

Quote from: dottywine on October 27, 2008, 04:24:37 PM
Hey, I apologize if I am coming off as ill-mannered.

My apologies. Absolutely no idea how I got that totally wrong impression.
Quote
These questions are last minute things that I may have forgotten to ask in class. I thought this forum is supposed to help those without judging them.

We are very helpful in general. The problem is some of us old folks here start from the assumption that you first read the manuals, then come to ask specific questions :wink

Welcome on board - we expect many good questions from you.

Mark Jones

Also Dotty, if you have already downloaded the MASM32 package and installed it, then study the \masm32\help\ASMINTRO.CHM file and others. These provide key information for starting this journey. BTW, congratulations on taking an assembly language programming course. :bg

Over the years, quite a few students have asked questions stemming from Kip's book. However, just so you know, most of the answers are from people whom have never read that book -- so our answers are going to lean more towards the MASM32 package, or assembly language in general. (I know that Kip uses some libraries and stuff in his book which we obviously do not have, and will not be able to help you with. But general questions are fine.)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

RuiLoureiro

Quote from: dottywine on October 27, 2008, 04:08:06 AM
I didn't understand the LABEL thing still but someone who took computer science tried to figure it out with me. He said it is like a dummy variable and you can access the real variable with it or something... :/
Hi dottywine,
                     dummy variable ? variable ? Hummmm

                     See this code:

Quote
             cmp    eax, 5               means ->  compare    EAX   with   5
             jne    _notequal              "      ->  jump to the  LABEL   _notequal if not equal

                mov    eax, 10

_notequal:
                So, the label means an address to where we want to jump if eax is
                not equal to 5. I wrote «_notequal» but it can be one name we choose.

                In the Data Section, we can use the name LABEL to mark an address
                where we reserve some bytes. For instance:

Quote
.data
_space20       label byte               here is the initial address _space20
                    db 20 dup (?)         here we reserve 20 bytes

               Sorry if it doesnt help you
Rui

six_L

Hi dottywine,
QuoteSecond of all, I am definitely not over 20.
I'm getting confused that you'd hided your age. it's girly enough.
today learnning Assembler is luck. more help documents,editors, Compilers, OS, debugers,high performance computer,and more examples are there.
Hutch-- and his copartners let it's more easily. likes C language.
when i learned Assembler, pen and paper was the editor. books and Instruction tables was Compiler. computer was a piece of integrate circuit. Monitor was LED. no OS. I had to translate a bit coders into binary and input integrate circuit with hands for running.
regards

dottywine

I don't know if jj is being sarcastic or not, but I hope I don't have to block someone so soon on a forum.

Thankyou everyone for the more information!

six_L, hi, you are like my dad. He told me coding now is so easy. It makes me feel dumb. I hid my age for no particular reason. I usually don't hide my age. I'm too lazy to go and change that. I'm surprised my age is hidden. Maybe I didn't want to be discriminated against or anything... the last time I joined a forum with older members, I got picked on a lot by older women because I was younger than them.

PauloH

Ms. dottywine ,

You don't need to be ashamed for your age. You are welcome, no matter if you're 10 or 20 etc. I'm not a professional programmer and I can tell you that any task in our life is very difficult... But once we study  (and practice) it as a continuous process the shadows become thin and our vision better. The understanding of programming you want is a matter of time. Don't give up and go on with baby steps.
Visit some links like these:
The fasm forum http://board.flatassembler.net/index.php
The goasm assembler: http://www.jorgon.freeserve.co.uk/

Please, note that the syntax is different from one compiler to another.
When I told you to learn C I was talking seriously! I learned C just one year ago and loved it. Give it another try.  :U

Kind regards,

Paulo H.

GregL

dottywine,

Welcome. Here is a link to the MASM Programmer's Guide in a help file format.