The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Shooter on November 29, 2010, 06:01:53 PM

Title: In need of a Beginner's Guide
Post by: Shooter on November 29, 2010, 06:01:53 PM
Hello,
I am making that ultimate leap of programming from way back when (nearly 20 years ago) from the DOS 6.22 days of assembly language programming (does anyone remember Interrupt 13??) to something more current, say like Windows XP and such. I grew tired of trying to teach myself OOP as I just couldn't seem to get past all the nuances and such, plus it seems most 'tutorials' just get you through the basics of OOP, but I've not found much that explained HOW they worked.

The problem is, things have progressed so much that I'm basically having to start over.

Is there anyone that can either point me in the right direction or have a handy-dandy guide I could peruse that could help me make that monumental leap? Back in my day we just had a command line text editor, a compiler, and DEBUG as our rudimentary set of tools, but it lacked a GUI.

I want to be able to put together apps such as rich-text editors, music apps such as a customized MP3 player (complete with a comprehensive 1/3 octave EQ, if possible), and perhaps create some wild and crazy graphics that move to the beat of the music.

Is there an editing / compiling program out there that would have a robust set of macros and subroutines, and perhaps a debugger, that exists in a Windows XP GUI format specifically built for assembly language?

Any guidance or help would be greatly appreciated.
Title: Re: Beginner's Guide
Post by: madhur_ahuja on November 29, 2010, 06:12:26 PM
Is there a reason you are directly making a leap to assembly language ? :)

You may want to start with Iczelion tutorials:
http://win32assembly.online.fr/tutorials.html

Note that times have changed. Earlier the target was real mode, now you will be programming for 32 bit protected mode Windows.
Title: Re: Beginner's Guide
Post by: dedndave on November 29, 2010, 06:20:53 PM
i made a similar transition a while back
first step is to download and install the masm32 package
there are many examples, help files, and tutorials included, as well as libraries and macros
intel manuals are recommended for new instructions
Iczelions is also a good step to get you started with GUI apps
all the links are in the upper right corner of the page - just poke around a little
Title: Re: Beginner's Guide
Post by: Shooter on November 29, 2010, 06:31:30 PM
madhur_ahuja,
I always felt more comfortable using assembly, but when Windows 95 came out it just made programming via assembly useless at the time. I have fiddled with C and C++, as well as the MS Visual Studio since, but can't seem to make any headway because they're OOP based, and I can't seem to wrap my head around it without asking a ton of questions to someone standing over my shoulders.

I'll check out that link now.

Thanks,
Shooter

dedndave,
Are the Intel manuals free to download? They include examples and explanations of the instruction set still, right?
Title: Re: Beginner's Guide
Post by: madhur_ahuja on November 29, 2010, 06:35:03 PM
Yes, they are always available to download:
http://www.intel.com/products/processor/manuals/
Title: Re: Beginner's Guide
Post by: Shooter on November 29, 2010, 07:07:18 PM
Wow! I forgot some of the simpler things like which register does what. It HAS been a while. Time for some serious review!

Thanks for the links. I'm sure I'll be asking some more questions later.
Title: Re: Beginner's Guide
Post by: GregL on November 29, 2010, 07:27:09 PM
Shooter,

I made the transition back to assembly language about 6 years ago.   I used MASM to write 16-bit DOS programs back in the late 80's and early 90's, when 32-bit Windows came along they told us it was way too hard to write 32-bit Windows programs with Assembly Language, so I didn't use MASM for many years.  When I found MASM32 I was really surprised how easy it was.  Like dedndave said, download the MASM32 package and take a look at the example programs in \masm32\examples.  Then take a look at the help files in \masm32\help.  Start with console mode programs then move on to GUI programs later.  Welcome to the forum.

Here is a "Hello World" console mode program.

INCLUDE \masm32\include\masm32rt.inc

WaitKeyExit PROTO

.DATA

    szHello  BYTE "Hello World from MASM!",13,10,0

.CODE

  start:
 
    INVOKE StdOut, ADDR szHello
   
    INVOKE WaitKeyExit
   
    xor eax, eax
    INVOKE ExitProcess, eax
   
;------------------------------------
WaitKeyExit PROC
    .DATA
        szPrompt BYTE 13,10,"Press any key to exit ... ",0
        szCrLf   BYTE 13,10,0
    .CODE
        INVOKE StdOut, ADDR szPrompt
        INVOKE crt__getch
        .IF (eax == 0) || (eax == 0E0h)
            INVOKE crt__getch
        .ENDIF
        INVOKE StdOut, ADDR szCrLf
        xor eax, eax
        ret
WaitKeyExit ENDP
;------------------------------------   
END start
Title: Re: Beginner's Guide
Post by: Shooter on November 29, 2010, 08:11:08 PM
Thank you, GregL. I'm not quite to a point where I will compile anything today, but I'll keep the code handy. I'm still trying to get the softwares situated and get myself acquainted. Speaking of which...

Question... Before I found this forum, I found several different versions of MASM32 packages, with 10r2 being the latest. I noticed that Iczelions only goes to version 7, and another website said version 8. Are these all the same packages with updated libs, incs, and such, or are they completely different versions/programs dealing with MASM32??

MANY thanks,
-Shooter
Title: Re: Beginner's Guide
Post by: madhur_ahuja on November 29, 2010, 08:29:29 PM
Yes 10 is the latest. 7 and 8 were earlier versions and are obsolete now.
Title: Re: Beginner's Guide
Post by: brethren on November 29, 2010, 08:34:47 PM
QuoteI want to be able to put together apps such as rich-text editors, music apps such as a customized MP3 player (complete with a comprehensive 1/3 octave EQ, if possible), and perhaps create some wild and crazy graphics that move to the beat of the music.

sounds like you may find easy code useful. heres tutorials
http://www.easycode.cat/English/Tutorial/Chapter1.html

and heres the easycode\goasm download
http://www.masm32.com/board/index.php?topic=6761.msg50301#msg50301

and heres easycode\masm download
http://www.masm32.com/board/index.php?topic=2792.msg21798#msg21798
Title: Re: Beginner's Guide
Post by: Shooter on November 29, 2010, 08:37:18 PM
Whew! Thank you, madhur_ahuja. I was beginning to get worried that the various versions were for different OS's or something.

Another Beginner's Guide question...

Does this forum help or aid in the development of custom API's, OCX's, DLL's, and advanced materials like that? Are there any reference materials that can be found on these areas when dealing with Windows?

It will take me a while to get up to that level considering I'm basically starting all over from scratch, but it would be nice to know where to steer my knowledge curve before I get up this mountain, so to speak.

brethren, Thank you for the links. I'll definitely be checking those out. Knowledge is power, and knowing how and where to find things is the most powerful thing a person can know, in my humble opinion.
Title: Re: Beginner's Guide
Post by: jj2007 on November 29, 2010, 08:55:01 PM
Hi Shooter,

First of all: Welcome to the forum :U

Don't confuse Masm with Masm32: Masm is Microsoft's Macro Assembler, Masm32 is a library package maintained by hutch with occasional help from forum members. Masm32 contains version 6.14 of Masm, but for advanced work (e.g. with the new SSE instructions) you will need at least Masm 6.15 or JWasm (http://www.japheth.de/JWasm.html).

Members here are extremely helpful but are divided on the use of macros :green2

Some personal tips, tricks and traps are found here (http://www.webalice.it/jj2006/Masm32_Tips_Tricks_and_Traps.htm).
Title: Re: Beginner's Guide
Post by: madhur_ahuja on November 29, 2010, 09:00:22 PM
Just amazes me the number of assemblers out there after MASM - > GoASM, JWAsm, NASM .... and much more.

Is it that easy to write an assembler ?  :bg

Title: Re: Beginner's Guide
Post by: Shooter on November 29, 2010, 09:21:02 PM
I don't know, madhur_ahuja, but right off the bat while attempting to use EasyCode I received an error, "COMMCTRL.INC - Was not found in any of the following folders:" and it lists four folders.

I've searched all of my drives and the original Zip files but alas, it's not anywhere to be found. I googled it and only found mention to it in three locations, all dealing with a tweak  to the file.

Thank you, jj2007 for the clarification and the advice. I was beginning to wonder.
Title: Re: Beginner's Guide
Post by: GregL on November 29, 2010, 11:32:09 PM
Quote from: jj2007Masm32 contains version 6.14 of Masm, but for advanced work (e.g. with the new SSE instructions) you will need at least Masm 6.15 or JWasm.

MASM 6.14 supports SSE, MASM 6.15 supports SSE2.

Title: Re: Beginner's Guide
Post by: brethren on November 30, 2010, 12:29:01 AM
shooter, did you follow the instructions in Setup.txt

if you've followed all the set up instruction and you're still having problems then post here
http://www.masm32.com/board/index.php?board=28.0
and somebody will be along to help you, maybe even the author himself :wink

btw you were saying
QuoteI want to be able to put together apps such as rich-text editors, music apps such as a customized MP3 player
something like this :8)
(http://www.easycode.cat/Images/ObjCat.gif)
Title: Re: In need of a Beginner's Guide
Post by: Shooter on December 01, 2010, 06:07:42 PM
Quote from: brethren on November 30, 2010, 12:29:01 AM
shooter, did you follow the instructions in Setup.txt

Yes sir I did.

Quote from: brethren on November 30, 2010, 12:29:01 AM
if you've followed all the set up instruction and you're still having problems then post here
http://www.masm32.com/board/index.php?board=28.0
and somebody will be along to help you, maybe even the author himself :wink

I most certainly will. :wink

Quote from: brethren on November 30, 2010, 12:29:01 AM
btw you were saying something like this :8)

Absolutely. I like it. How can I program one like it? (By the way, what is your native language? Your image looks to be set in Spanish??)