Thread: Asm
View Single Post
 
Reply
Posted 2004-09-01, 07: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