Where to learn assembly
Moderator: Coders of Rage
- animangaman690
- Chaos Rift Cool Newbie
- Posts: 96
- Joined: Mon Feb 02, 2009 8:03 am
- Current Project: TDS
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++, C#
- Location: Alexander City, AL
- Contact:
Where to learn assembly
I'm wanting to learn assembly so I can decompile and edit a few programs of mine. I've looked for books but found none. So does any one know where on the web I could find some tutorials or if there is a book out there.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Where to learn assembly
I've said this many times, and I'll say it again. I think you can't go wrong with college textbooks. Yes, they're extremely expensive, but you get a lot of bang for your buck. Part of learning assembly isn't just knowing opcodes, it's knowing what exactly the effect of these opcodes executing has on the hardware.
Find some sort of literature on x86 assembly. I must warn you, though. Wanting to learn assembly to screw with disassemblers (a decompiler produces C/++ code) is a pretty bad idea. All program structure is lost. It really isn't very human friendly.
Legitimate reasons to want to learn assembly would be something like wanting to write your own assembly programs/routines, or to learn more about architecture.
Find some sort of literature on x86 assembly. I must warn you, though. Wanting to learn assembly to screw with disassemblers (a decompiler produces C/++ code) is a pretty bad idea. All program structure is lost. It really isn't very human friendly.
Legitimate reasons to want to learn assembly would be something like wanting to write your own assembly programs/routines, or to learn more about architecture.
- Joeyotrevor
- Chaos Rift Cool Newbie
- Posts: 62
- Joined: Thu Jan 22, 2009 6:24 pm
- Programming Language of Choice: C++
Re: Where to learn assembly
I recommend this book http://www.drpaulcarter.com/pcasm/ Direct link: http://www.drpaulcarter.com/pcasm/pcasm-book-pdf.zip.
Code: Select all
eb 0c 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 31 d2 8e c2 30 ff b3 0a bd 02 7c b9 0b 00 b8 00 13 cd 10 eb fe
- animangaman690
- Chaos Rift Cool Newbie
- Posts: 96
- Joined: Mon Feb 02, 2009 8:03 am
- Current Project: TDS
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++, C#
- Location: Alexander City, AL
- Contact:
Re: Where to learn assembly
The main reason I want to learn assemble is because Direct X encrypts output variables saved to files in assembly.I must warn you, though. Wanting to learn assembly to screw with disassemblers (a decompiler produces C/++ code) is a pretty bad idea. All program structure is lost. It really isn't very human friendly.
Thanks.Joeyotrevor wrote:I recommend this book http://www.drpaulcarter.com/pcasm/ Direct link: http://www.drpaulcarter.com/pcasm/pcasm-book-pdf.zip.
Re: Where to learn assembly
DirectX comes with a tool to tell you what it's thinking as it is running. Not really sure if it's what you need. Here is a professional's experience with it.animangaman690 wrote:The main reason I want to learn assemble is because Direct X encrypts output variables saved to files in assembly.
This is a link to the MSDN documentation of it.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Where to learn assembly
It does what? Can I see a link or something to what you're talking about?animangaman690 wrote:The main reason I want to learn assemble is because Direct X encrypts output variables saved to files in assembly.
- animangaman690
- Chaos Rift Cool Newbie
- Posts: 96
- Joined: Mon Feb 02, 2009 8:03 am
- Current Project: TDS
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++, C#
- Location: Alexander City, AL
- Contact:
Re: Where to learn assembly
My bad, I was half asleep and tired as hell when I wrote this. What I mean is that Direct X uses an assembly program to encrypt and save files. At least that's whatGyroVorbis wrote:It does what? Can I see a link or something to what you're talking about?animangaman690 wrote:The main reason I want to learn assemble is because Direct X encrypts output variables saved to files in assembly.
my Game Programing with Direct X book said. The program was in the content on the CD. I tried to decompile it and remove the encryption process, but it
failed and said "Cannot decompile this program. Prebuilt in lower level language. Error Code: 330482." That is where the decompiler came into place. But your right,
trying to mess with a disassembler could screw up the program.
I tried to make an ofstream, but ofstreams and DX don't mix well for me due to some of the settings for a DX project.
I'm probably going to find some other ways of saving my variables for my map files.
I would still like to learn assembly though. So I'll probably see if my dad has any of his old college programing text books.
Re: Where to learn assembly
It sounds like you might be trying to solve the wrong problem. Using an ofstream should be completely independent from DirectX.
What are you trying to do exactly?
What are you trying to do exactly?
- animangaman690
- Chaos Rift Cool Newbie
- Posts: 96
- Joined: Mon Feb 02, 2009 8:03 am
- Current Project: TDS
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++, C#
- Location: Alexander City, AL
- Contact:
Re: Where to learn assembly
Really, I'm trying to save my map files so that they can easily be read in something besides DX. That way I can move on to another API, because DX is very annoying to program in. It was a good start for game development back when it was first released, but now that it's tied in with Win32 it's a pain in the ass.
Re: Where to learn assembly
You want to do something like this:
It's from a project I never finished. It saves the map as a text file.
I think this was the last version before I stopped working on it: zero051209.zip
Feel free to do whatever you want with it.
Code: Select all
bool Map::saveMap(char *filename)
{
ofstream savefile(filename);
if (!savefile.is_open())
{
cout << "Error opening map file!\n";
return false;
}
savefile << map_w; // map width
savefile << " ";
savefile << map_h; // map height
savefile << " ";
savefile << n_layers; // number of layers
savefile << endl;
savefile << tile_w; // tile width
savefile << " ";
savefile << tile_h; // tile height
savefile << endl;
savefile << tilesetName; // tileset name
savefile << endl;
savefile << n_tiles; // number of tiles
savefile << endl;
for (int layer = 0; layer < n_layers; ++layer)
{
for (int y = 0; y < map_h; ++y)
{
for (int x = 0; x < map_w; ++x)
{
savefile << mapdata[layer * (map_w * map_h) + (y * map_w) + x] << " ";
}
savefile << endl;
}
savefile << endl;
}
savefile.close();
printf("Map saved\n");
return true;
}
I think this was the last version before I stopped working on it: zero051209.zip
Feel free to do whatever you want with it.
- animangaman690
- Chaos Rift Cool Newbie
- Posts: 96
- Joined: Mon Feb 02, 2009 8:03 am
- Current Project: TDS
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++, C#
- Location: Alexander City, AL
- Contact:
Re: Where to learn assembly
Thanks I will try something like that when I move on from DX