Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Asm
Reply
Posted 2004-08-31, 04:04 PM
It matters not whether you win or lose; what matters is whether I win or lose.
Old
Profile PM WWW Search
Shining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzShining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Shining Knights
 



 
Reply
Posted 2004-09-01, 12:00 AM in reply to Shining Knights's post "Asm"
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.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2004-09-01, 01:33 AM in reply to WetWired's post starting "Okay, in the old-style pointers, that..."
It matters not whether you win or lose; what matters is whether I win or lose.

Last edited by Shinto Katana; 2004-09-01 at 01:46 AM.
Old
Profile PM WWW Search
Shining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzShining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Shining Knights
 



 
Reply
Posted 2004-09-01, 05:50 AM in reply to Shining Knights's post starting "It matters not whether you 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.

Last edited by Demosthenes; 2004-09-01 at 05:52 AM.
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
 



 
Reply
Posted 2004-09-01, 08:04 AM in reply to Shining Knights's post starting "It matters not whether you win or lose;..."
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:
  • The data bus -- this connects the proccessor to RAM and ROM. ROM is mapped from 640k to 1M, and contains the low level drivers for interfacing for most of the hardware in your computer (at least it used to...).
  • The "port" bus -- this is another data bus, but instead of interfacing with memory, it is connected to control and information registers within various pieces of hardware in your computer
  • The interrupt lines -- when a piece of hardware needs attention from the system, it asserts an interrupt, and the processor automatically branches to the routine assigned to that interrupt. Interrupts can also be triggered manually with the interrupt instruction.
When you're using assembly, you likely won't have a large library of routines already written for you to do basic things such as write stuff to the screen like you would if you were writing in a high level language. Instead, you will need to use interrupts to invoke system calls. The BIOS and DOS provide many system calls through the use of interrupts that don't have any physical interrupt hardware -- these interrupts can only be invoked with the interrupt instruction. The processor already knows where these routines are because the BIOS and DOS installed them in the interrupt table when they were starting up. This is way, the writers of the BIOS and DOS can allow the location of the various routines to be dynamiclly decided by the linker without needing a complicated process for the application programmer to find out where they are. These calls are used pretty much like any other function call except that instead of using the call instruction, you use the int instruction.
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.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2004-09-01, 01:30 PM in reply to WetWired's post starting "I was telling the truth. I have no..."
It matters not whether you win or lose; what matters is whether I win or lose.
Old
Profile PM WWW Search
Shining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzShining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Shining Knights
 



 
Reply
Posted 2004-09-01, 10: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
 



 
Reply
Posted 2004-09-01, 11:32 PM in reply to Demosthenes's post starting "Shinto, I just want to throw in my own..."
It matters not whether you win or lose; what matters is whether I win or lose.
Old
Profile PM WWW Search
Shining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzShining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Shining Knights
 



 
Reply
Posted 2004-09-01, 11:33 PM in reply to Shining Knights's post starting "It matters not whether you win or lose;..."
Not too long.
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
 



 
Reply
Posted 2004-09-01, 11:38 PM in reply to Demosthenes's post starting "Not too long. :p"
It matters not whether you win or lose; what matters is whether I win or lose.
Old
Profile PM WWW Search
Shining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzShining Knights enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Shining Knights
 



 
Reply
Posted 2004-09-02, 07:37 AM in reply to Shining Knights's post starting "It matters not whether you win or lose;..."
I started doing Assembly the summer of '98. I havn't done x86 assembly, however, for quite some time.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 07:07 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.