Thread: Asm
View Single Post
 
Reply
Posted 2004-09-01, 09:56 PM in reply to Shining Knights's post starting "It matters not whether you win or lose;..."
Shinto, I just want to throw in my own two cents on assembly. I'm not an assembly master by any means, in fact I'm just learning, much like yourself, so don't take my word as absolute truth.

First off, to answer your original question, you have to know about the segment registers, which hold the location to the start of a segment (I believe). WW has already explained how to find the location in memory using in segmented-mode. Usually how it works is you have something in the following format:

segmentAddressffset

The segmentAddress holds the address of the beginning of a segment and the offset holds how much to count into the segment. For instance, lets say you wanted to point to a certain instruction in memory. You would use the code segment (CS) register to hold the address of the segment and the instruction pointer (IP) register to hold the offset. It would look something like this

CS : IP

So lets say you wanted to point to something that is at the twentyth location in memory or something, you could use either:

0001:0004

or

0000:0014

Hopefully I didn't confuse you. If you need me to expand I can. I think that information is accurate for most part, but I'm not absolutely positive.

Now, when I started learning assembly, I read the beginnings of many tutorials, and learned the same introduction to computer science every time. That got irritating. If you get the book I suggested, and you know the basics of the computer, and number systems, then skip chapters 1, 2, 3 and 5. The other chapters should hopefully cover what you are looking for. It gives a really thorough introduction to computer science, though, as you don't see any real assembly code till about page 200 or so.

Another thing, if you get the chance, get Linux. It's easier to program in there, as it is protected mode flat model, instead of the segmented model I think you would be using under dos.

Again, if someone could confirm everything I said above, or correct it, it would be appreciated. I think it's alright though.

A good online link:
http://www.drpaulcarter.com/pcasm/
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes