![]() |
Asm
It matters not whether you win or lose; what matters is whether I win or lose.
|
Okay, in the old-style pointers, that is those using a 16-bit segment and a 16-bit address, you multiply the segment by 16 then add the address part to get the absolute address. This allows for the OS to locate the memory for a program anywhere in memory with a 16 byte granularity. In 286 mode, there are no checks for whether the proccess has permissions to use a given segment, so if you're accessing an absolute location in memory, it makes no difference if you access it with segment a+1 and address b or segment a and address b+16. When operating in 386 protected mode, however, the rules change.
|
It matters not whether you win or lose; what matters is whether I win or lose.
|
Get a book called Assembly Language Step-by-step by Jeff Dunteman. It's a little slow, but it's an awesome book.
|
I was telling the truth. I have no prior experience in hacking a datastream between a game and its server.
Personally, I just read my TASM manuals cover-to-cover, and I was good to go. The biggest hurdle is understanding how the computer works; if you don't have enough prior programming experience to have a pretty good idea of the way things are done, you may get lost when they are explained to you. The x86 architecture provides 3 interfaces to the hardware:
You can also write your own interrupt handlers. Mostly, this is only usefull if you want to bypass the system routines to work with a piece of hardware, or there are no system routines for that piece of hardware, however, there appear to be a few setup by the system for you to override, such as the system tick interrupt, which occurs at a fixed interval. You may have problems with DOS assembly if you have Windows XP. Since XP runs on the NT kernal, much of the legacy support has been removed, such as allowing programs to directly access the port bus. |
It matters not whether you win or lose; what matters is whether I 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: segmentAddress:offset 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/ |
It matters not whether you win or lose; what matters is whether I win or lose.
|
Not too long. :p
|
It matters not whether you win or lose; what matters is whether I win or lose.
|
I started doing Assembly the summer of '98. I havn't done x86 assembly, however, for quite some time.
|
All times are GMT -6. The time now is 09:32 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.