Go Back   Gaming Gutter > Non-Gaming > Programming > Tutorials


Tutorials - Looking for programming tutorials to increase your knowledge? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Ruzzykinz.
Today 06:14 PM
Last post by Ruzzeh
Today 06:47 PM
44 Replies, 67 Views
Go to first new post Heroes-Series
11-18-2008 01:29 PM
Last post by scromlette
Today 06:46 PM
16 Replies, 93 Views
Go to first new post S> 40 month main w/Lab,...
Today 02:56 PM
Last post by Mal3vol3nt
Today 06:46 PM
1 Replies, 12 Views
Go to first new post Selling 18 million pure...
11-28-2008 10:06 PM
by Sticky
Last post by Horde
Today 06:40 PM
6 Replies, 83 Views
Go to first new post Its my Birthday tomorrow.
12-02-2008 07:23 AM
by Zombies
Last post by Bex
Today 06:38 PM
59 Replies, 300 Views
Reply
 
LinkBack Thread Tools Display Modes

 [ASM] Assembly, you, and opcodes
Old 08-15-2008, 06:57 PM   #1 (permalink)
Junior Member

spawnfestis is offline
 
spawnfestis's Avatar
 
Join Date: Aug 2008
Posts: 10
GPoints: 27
iTrader: 0 / 0%
spawnfestis Is gaining popularity
Rep Power: 0
Smile [ASM] Assembly, you, and opcodes

This is one of the official MMOVision tutorials.

We will lead you through some beginner-level stuff in ASM(Assembly) but first I would like you to read through the below quote from wikipedia

Quote:
Originally Posted by wikipedia
An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language is thus specific to a certain physical or virtual computer architecture (as opposed to most high-level languages, which are portable).
Okay, so now you know what Assembly is, no need to question that, right?


Opcodes, what are they?

I'm not going to bring up every single opcode, but this is basically the most important ones. (at least in hacking)

MOV = Move
Move something from one point to another, it's self-explainable but let me show you.
Code:
mov brain, cells
This will move "cells" to the "brain", it's a humortastical example, but you get it.

CMP = Compare
Simple as it is, it compares the affected stuff.
(compares two registers or a register + a value)
Code:
cmp [address], 20
Would compare what is stored at address with the value

JMP = Jump (conditional)
This is a very simple instruction, as I usually call them.
Code:
Jmp 00400000
This would make the it jump to the address 0x00400000(0x is an indicator that it is HEX and not DECIMAL, however it is not necessary to write out in ASM.)

As the following is pretty much the same type of memory altering as above, we will just take up what they mean and you will be able to figure it out without any examples really, you'll see why after reading them.

  • JE(JZ) = Jump to if equal

The reason why JZ is there, is because it does the same thing as JE but with ONE exception, and that is - it will only jump if the Zero Flag is applicated at the destination.
  • JNE = Jump to if not equal
    JG = Jump to if greater than
    JL = Jump to if less than
    JNG = Jump to if not greater than
    JNL = Jump to if not less than
    JGE = Jump to if greater than or equal to
    JLE = Jump to if less than or equal to

Okay, so now you know all the basic jumps, off to some other..

INC = Increment
Let's think (hypothetically of course) that the value at EAX is equal to 1.
And now we "INC" that, it would be something like this.
Code:
INC eax
The value stored in EAX is now increased to 2.

A little more advanced example:
Code:
inc dword ptr [00400000]
This would mean that the value at 00400000 will be increased by 1.

DEC = Decrement
Same as above, but the other way.
EAX = 1
Code:
DEC eax
EAX = 0

A little more advanced example:
Code:
dec dword ptr [00400000]
This would mean that the value at 004000 will be decreased by 1.

PUSH = pushes a value, point in memory, or register onto the stack.
(Push puts a value ON THE TOP OF THE STACK AND INCREASES THE SIZE OF THE STACK BY 1)
Code:
PUSH eax
The syntax for this would be PUSH then either value/register or any memory reference.
More about stacks at wikipedia, click here.

POP = pops a value off the stack into a point in memory or register.
This is the opposite of PUSH (by this I mean that it takes from the stack instead of adding up), and it is usually likely to work with PUSH, since often if a registry is preserved with PUSH EBX you can find POP EBX later in the memory.

Example of the POP syntax:
Code:
POP eax
(Remember: Pop takes the value ON THE TOP OF THE STACK.)
See here that the syntax of POP is the same as PUSH?
Good!

We've decided to not bring these things up more than this, as it would probably not profit you anyways, but we will bring up what they are.
ALLOC = Reserves space for you to use in the memory
Registersymbol = Makes a symbol you can use for reading / editing values by adding it as a address in your cheat table.
Dealloc = Releases space you reserved.
Unregistersymbol = Reversed of Registersymbol.
Label - Hmm, this is just a label

If you would like to look further into Jumps, I would recommend googling up the following jumps, some which are described above, but anyways.
JMP, JE, JZ, JNE, JNZ, JA, JG, JNA, JNG, JB, JL, JNB, JNL, JAE, JGE, JNAE, JNGE

And incase you did'nt know [] acts like a pointer. Here is a example assumming eax is 0x00400000.
Code:
[eax] is saying whatever is stored at 0x400000
A tutorial by spawnfestis and edited / cleaned up byLosplagos.
additional thanks to the mmovision community for making it of any worth to write up.
  Reply With Quote

 
Old 08-15-2008, 06:59 PM   #2 (permalink)

Male Connor is offline
 
Connor's Avatar
 
Join Date: Dec 2006
Location: Preston
Age: 15
Posts: 2,726
GPoints: 1,393
iTrader: 0 / 0%
Connor Is Recognizable
Rep Power: 9
Very nice tutorial.
I was thinking about writing one like it then you mentioned it on MSN and I remembered
__________________
Formerly Connor
  Reply With Quote

 
Old 08-31-2008, 07:44 PM   #3 (permalink)
Full Member

Male kaenjie2 is offline
 
kaenjie2's Avatar
 
Join Date: Aug 2007
Posts: 80
GPoints: 84
iTrader: 0 / 0%
kaenjie2 Is Recognizable
Rep Power: 4
Nice one. This reminds me the day I first learnt assembly language in my school lab, using some kind of machine, I programed some lights to blink in the way I wanted and stuffs. Those were the days. This is the lowest level of programming. It would be much easier to program using high-level language such as C++ and VB. But if you really master this, you can really call yourself a computer hacker.
  Reply With Quote

 
Old 08-31-2008, 09:09 PM   #4 (permalink)

Male Connor is offline
 
Connor's Avatar
 
Join Date: Dec 2006
Location: Preston
Age: 15
Posts: 2,726
GPoints: 1,393
iTrader: 0 / 0%
Connor Is Recognizable
Rep Power: 9
Quote:
Originally Posted by kaenjie2 View Post
Nice one. This reminds me the day I first learnt assembly language in my school lab, using some kind of machine, I programed some lights to blink in the way I wanted and stuffs. Those were the days. This is the lowest level of programming. It would be much easier to program using high-level language such as C++ and VB. But if you really master this, you can really call yourself a computer hacker.
What?
VB isn't a high level language at all.
ASM also isn't the lowest level of programming, this is merely opcodes.
__________________
Formerly Connor
  Reply With Quote

 
Old 09-01-2008, 02:04 AM   #5 (permalink)
Full Member

Male kaenjie2 is offline
 
kaenjie2's Avatar
 
Join Date: Aug 2007
Posts: 80
GPoints: 84
iTrader: 0 / 0%
kaenjie2 Is Recognizable
Rep Power: 4
urm... VB is a high-level language. But I won't argue with this because you might have your own term about 'high-level language that differs from the official one. I must agree that assembly language isn't the lowest level. I instinctively say assembly is the lowest because I was trying to refer to the lowest-level human-readable method for programming a particular computer. You also might have your own term about whats the lowest level there is, but to me the lowest level is programing using the machine code itself.
  Reply With Quote

 
Old 09-01-2008, 06:03 AM   #6 (permalink)

Male Connor is offline
 
Connor's Avatar
 
Join Date: Dec 2006
Location: Preston
Age: 15
Posts: 2,726
GPoints: 1,393
iTrader: 0 / 0%
Connor Is Recognizable
Rep Power: 9
Quote:
Originally Posted by kaenjie2 View Post
urm... VB is a high-level language. But I won't argue with this because you might have your own term about 'high-level language that differs from the official one. I must agree that assembly language isn't the lowest level. I instinctively say assembly is the lowest because I was trying to refer to the lowest-level human-readable method for programming a particular computer. You also might have your own term about whats the lowest level there is, but to me the lowest level is programing using the machine code itself.
Dude VB is not hard at all. C++ is the hardest language I know but it's a high level language. VB Is not high level at all.
__________________
Formerly Connor
  Reply With Quote

 
Old 09-01-2008, 07:55 AM   #7 (permalink)
Full Member

Male kaenjie2 is offline
 
kaenjie2's Avatar
 
Join Date: Aug 2007
Posts: 80
GPoints: 84
iTrader: 0 / 0%
kaenjie2 Is Recognizable
Rep Power: 4
Quote:
Originally Posted by Connor View Post
Dude VB is not hard at all. C++ is the hardest language I know but it's a high level language. VB Is not high level at all.
Oh, *blush* hehe... I see what you mean, our perception are totally different lol. yeah you're right, I agree that VB is easy. The simplest and coolest programming language to me.
  Reply With Quote
Reply

Bookmarks



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

Posting 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
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 06:49 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.14730692 seconds (100.00% PHP - 0% MySQL) with 19 queries