unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Programming > Assembly

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2007, 03:08 PM
t10101 t10101 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 21
Default Learning MASM - A Roadmap

Learning MASM - A Roadmap by Max_Power 8-25-2004

Table of Contents:

1. Introduction
2. Links Galore
3. Tools of the Trade
4. Recommendations




1. Introduction



Learning assembly can be a bit overwhelming, throughout the
entire process just remember that every assembly programmer was once in your
shoes, they are living proof that it can be done with enough willpower and
dedication. There are several flavors of assembler, further abbreviated asm,
which one is best is relative. There are several choices including GOASM, HLA,
MASM, NASM, TASM, and so on and so fourth. For the average person interested in
learning asm the way to go is MASM if for no other reason then it is the
easiest to find documentation for, hence the reason this tutorial is meant to
act as a roadmap to learning MASM. In the end asm is asm, but the different
flavors all bring something different to the table. I recommend picking one and
sticking with it until you feel comfortable with it then trying out other
flavors.



2. Links Galore



All of these links were living as of this writing, but if
you are reading this days, weeks, or even months down the road I make no
guarantees as to their status. If the description has a * next to it the link
has something necessary to programming in MASM.



*This link takes you to what amounts to the official MASM32
programming package website. Download and install the package and you will have
everything you need to program in MASM32, anything else from here on out just
makes it easier.http://www.masm32.com/



This is an integrated development environment for several
flavors of asm including MASM, it makes making graphical programs worlds
easier; not to say it doesn’t make programming in asm easier in general, which
is does.
http://radasm.visualassembler.com/



The following link is a link to a great tutorial that will
introduce you to the RadASM development environment.
http://members.a1.net/ranmasaotome/main.html



You will want to take a look at this next site no matter
what. Not only does it have some outstanding asm and MASM related tutorials,
but also it has an excellent forum where you can receive help. If you go to the
tutorials section and read the first 13 tutorials of the 35 tutorial series (it
should be obvious which one is the 35 tutorial series) you will have a very
good understanding of both MASM and asm. I recommend reading those first 13
then bouncing around the rest as you see fit.
http://win32asm.cjb.net/



Learn MASM in a Day. The following tutorial should probably be the first one you
read after this one, it won’t make you an expert at MASM or anything, but it is
a very fast read and a good introduction which should help other tutorials on
MASM and asm in general make more sense.
http://gokmen.selcuk.edu.tr/tutor/progdil/masm/



I suggest that at some time in your learning you read this.
It is meant for NASM, but it has a lot to do with interfacing asm with C\C++ so
it is helpful.
http://www.drpaulcarter.com/pcasm/



3. Tools of the Trade



Assembler – the assembler takes your source code and
converts it to machine code and produces your object files. The MASM assembler
is ML.exe located in the BIN directory of the MASM package linked above.</p>
Linker – the linker links your object files into an
executable file. The MASM linker is LINK.exe also located in the bin directory.



Resource Compiler – the resource compiler is used to compile you resource
scripts (.rc files) into binary resource files (.res) so that they can be
linked with your exe. The resource compiler that comes with the MASM package
linked above is called RC.exe and is again in the bin directory.



You can of course do all of this compiling stuff manually
using the command prompt, but that is usually slow and gory. Here are some ways
to avoid having the punch out several commands along with countless parameters:



1. Use the BLDALL.bat located in the bin directory of the
MASM package. Just copy it into your source file directory and assuming your
resource script (should be named rscr.rc) and your main asm file are all in the
same directory just bring up the command prompt, cd to your source directory,
then issue the command BLDALL &lt;main asm file name&gt;. For example if my
main asm file name was called hook.asm I would issue the command “BLDALL hook”
without quotes and it would do what is needed to produce my exe or dll.



2. Use RadASM or QETB.EXE (comes with the MASM package) they
will do all the gory stuff for you with just the press of a button.



4. Recommendations



1. Don’t get ahead of your skill level, if you think showing
a messagebox is a bit tricky still don’t even think about moving onto a program
that analyzes a PE header. Getting ahead of your skill level is a good way to
become frustrated.



2. Don’t try to learn asm as your first language. Although
it can be done you will just be torturing yourself in doing so. I recommend C++
or Visual Basic as a first programming language.



3. Read all of the tutorials and documentation you can find,
the more you read the easier programming in MASM becomes.



4. When you really really can’t figure something out stop
and ask someone who knows; if you can’t find the answer to something that is
bothering you and you try to move on without fully understanding whatever is
confusing you, you could be doing yourself more harm then good. Programming in
asm is not something to take lightly; you can’t treat it like learning to write
a batch file.



5. Using something like RadASM may seem like cheating, but
don’t make programming in asm harder then it has to be. Use the tools provided,
they are meant to make your life easier.



6. Don’t use source code written by someone else unless you
know what it does. If you are using source code written by other people without
knowing how it works you are only cheating yourself. Don’t become a copy\paste
coder, that is the worst thing you can do.



7. Google is your friend; there is a lot of information out
there. I didn’t even come close to linking you to all of the MASM related links
I know, fen for yourself from here on out.



8. I recommend you take these steps once you are ready to start:


1. Download the MASM package (linked above).
2. Read Learning MASM in a Day (linked above).
3. Read the 13 tutorials I recommended reading above.
4. Download, install, and learn how to use RadASM (linked above along with tutorial).
5. Go from there.
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
learning, masm, roadmap

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



All times are GMT. The time now is 05:54 AM.