The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: 00100b on December 19, 2004, 03:14:17 PM

Title: Barebones Minimum for Assembler
Post by: 00100b on December 19, 2004, 03:14:17 PM
Question: What does one need at an absolute minimum to develop an application using Assembler?

It's very nice that many people have put in a lot of effort in developing tool-sets (like MASM32, HLA, RadASM, GoASM, etc, etc) to make it easier for people to develop applications using Assembler.

The approach that I would like to take to learning as much as I can is to, for the time being, not to take advantage of all of your guys' hard work and start with the absolute minimum foundation and work my way up.  This is not to say that I won't take advantage of all of your guys' hard work and ask a bunch of silly questions ;).

Now, I'm assuming that one needs at least:

What would be a more complete list (or modifications to my assumed list) of what is required?

I hope that I am being able to deliver this question in the correct context.  If you need further clarification concerning what I'm trying to get at, let me know.

Thank you.
Title: Re: Barebones Minimum for Assembler
Post by: drhowarddrfine on December 19, 2004, 03:16:56 PM
The win32.inc file and I think you'd be all set.
Title: Re: Barebones Minimum for Assembler
Post by: Jimg on December 19, 2004, 03:25:09 PM
Depends on what you call an application.   For just a program, drop to a command prompt and use debug ;)
Title: Re: Barebones Minimum for Assembler
Post by: donkey on December 19, 2004, 03:31:47 PM
The EXE's you mentioned also have supporting DLL's that are necessary for them to function. MASM requires a few DLLs, I can't remember them all right now. GoAsm requires only GoRC.EXE (if you are including resources), GoAsm.EXE and GoLink.EXE. The packages are self contained, no DLLs. Also because of the way GoLink works, there are no libs or PROTOs required to link the executable. Windows.inc is available for GoAsm but like MASM you can just define the constants in-program and bypass that file.
Title: Re: Barebones Minimum for Assembler
Post by: John on December 19, 2004, 04:14:21 PM
The bare minimum will depend on what Assembler you want to use and what type of code you are writing. The requirements to write 16bit code for MASM are pretty small, but for 32 bit code you will probably want to consider MASM32 as the bare minimum.

To start with, as mentioned, you could even use debug though you might pull all your hair out when you get to jumps.

Here is what I'd consider the bare minimum:
16 bit:
- MASM32
- Link 5.63 ( you can get it here:http://win32asm.cjb.net/) in the download section
- Notepad or THEGUN.EXE or QEDITOR.EXE

32 Bit:
- MASM32
- Notepad or THEGUN.EXE or QEDITOR.EXE

These are obviously for MASM. If you use it, you will need to download and install it just to get the required ml.exe and supporting files so you might as well do it that way and ignore the parts you don't need or delete them entirely.
Title: Re: Barebones Minimum for Assembler
Post by: pbrennick on December 19, 2004, 04:24:53 PM
Let's not forget RC.EXE and its support files.

Paul
Title: Re: Barebones Minimum for Assembler
Post by: johnfound on December 19, 2004, 07:08:06 PM
Only FASMW.exe or Fresh.exe and you will be able to create applications for: DOS, Windows, Linux, MenuetOS or even your own OS. ;)

Of course, if you want to easy your life, you will need some .inc files and some help files, but they are really optional.

Regards.
Title: A little more clarification
Post by: 00100b on December 19, 2004, 07:18:05 PM
For a little clarification...

I already have both MASM32 and HLA installed and I'm able to create programs using both of those.

RC.EXE isn't one that I previously listed and for resource files, I would definitely add that to the list.

The DLL's that donkey was referring to (MSDIS100.DLL, MSPDB50.DLL, RCDLL.DLL) already exist in the install location that ML and the others are.


The types of applications would be 32-bit apps.  Starting out, just very simplistic ones that will allow me to break down topics of self-study to the lowest level to truly get a feel (and understanding) for not only building applications with assembler (their structure) but to say, "Okay, this library or this include file defines something for me so that I don't have to, but for my education purposes, I want to define it for myself."

The exclusion of any predefined .LIB or .INC files is kinda what I was getting at.  Hard-coding as much as I can to start with until I can get to a level of proficiency that would allow me to really appreciate the work that everyone else put into generating those types of files.


What I would like to do is to learn how to be born, before I learn to walk, before I learn to run, before I learn to have Geeves drive me around in the limo.


Does that provide a little more clarification?
Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 19, 2004, 07:28:24 PM
Quote from: johnfound on December 19, 2004, 07:08:06 PM
Only FASMW.exe or Fresh.exe and you will be able to create applications for: DOS, Windows, Linux, MenuetOS or even your own OS. ;)

Of course, if you want to easy your life, you will need some .inc files and some help files, but they are really optional.

Regards.
Thanks johnfound, the easy life is exactly what I'm trying to avoid at this point.  Call me sick but at this point I want to do things the hard-way.  I just think I'll learn and understand more.

I'll add FASM to my toolbox that already contains MASM32, HLA, RadASM, and QEditor; and will eventually contain GoASM (and probably others) as well.  Right now, I'm limiting the contents of my toolbox until I know how to use a hammer and nail first.
Title: Re: Barebones Minimum for Assembler
Post by: Vortex on December 19, 2004, 08:55:16 PM
Hi Forby,

Instead of MS link, you can consider using Pelle's high performance linker polink as it creates smaller executables.
Hutch's masm32 package comes with this tool.
Title: Re: Barebones Minimum for Assembler
Post by: daydreamer on December 19, 2004, 09:10:27 PM
no possible making a .com file with masm?
Title: Re: Barebones Minimum for Assembler
Post by: MichaelW on December 19, 2004, 09:56:54 PM
Yes, it is possible with the 16-bit linker from the link in John's post above.

    .model tiny
    .486
    .stack

    WAITKEY MACRO
      mov   ah,0
      int   16h
    ENDM

.data
    msg db "Hello World from COM file!",13,10,"$"
.code
    .startup
    mov   dx,offset msg
    mov   ah,9
    int   21h
    WAITKEY
    .exit
end


ml /c comfile.asm
link16 /tiny comfile.obj;

Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 20, 2004, 07:21:43 AM
Quote from: Vortex on December 19, 2004, 08:55:16 PM
Hi Forby,

Instead of MS link, you can consider using Pelle's high performance linker polink as it creates smaller executables.
Hutch's masm32 package comes with this tool.
Thanks Vortex.  I'll take a look at it.

I think I'm getting to where I want to be.  I was hoping to get to the level below using Win32 API calls.  I'm currently reading the Intel docs trying to figure out how to do some basic I/O at the command-prompt.

I'll get there.  Just be patient with me ;)

Thanks all for your responses.  Lovin' to learn and learnin' to love. :D

Now back to the books.
Title: Re: Barebones Minimum for Assembler
Post by: hutch-- on December 20, 2004, 07:23:28 AM
Forby,

Many have gone down this road but the bottom line is you cannot interact with the OS without using API functions, data input, output, file IO etc ... are all done through the OS so you are stuck with at least some API code.
Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 20, 2004, 07:27:40 AM
Quote from: daydreamer on December 19, 2004, 09:10:27 PM
no possible making a .com file with masm?

When I downloaded and installed Hutch's MASM32, there was a COM directory that had some examples.  You may want to take a look at.  One of the links while browsing for research materials had a couple of COM examples/tutorials.  For the life of me right now, I can't remember where.  When you hear a loud popping sound echoing throughout the universe, check back here.  That would be me pulling my head out of my rear  lol.  In other words, when I find it again, I'll post the link.
Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 20, 2004, 07:31:06 AM
Quote from: hutch-- on December 20, 2004, 07:23:28 AM
Forby,

Many have gone down this road but the bottom line is you cannot interact with the OS without using API functions, data input, output, file IO etc ... are all done through the OS so you are stuck with at least some API code.
Well... I was hoping to get "under the hood".  Oh well, I'll just learn down to the level that is allowed to me then.  Better something, than nothing.

Thanks Hutch.
Title: Re: Barebones Minimum for Assembler
Post by: hutch-- on December 20, 2004, 07:35:48 AM
Forby,

Its actually a blessing in disguise, you use API calls to do the hack OS stuff and mnemonics to do the fast rock 'n roll type stuff where you need it.
Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 20, 2004, 07:41:00 AM
Oooo.  A "Blessing in Disguise" for a "Martian in Disguise". :P
Title: Re: Barebones Minimum for Assembler
Post by: pbrennick on December 20, 2004, 01:30:03 PM
00100b,
Remember that there is COM and there is .COM.  They are not the same and the COM in the masm32 package is not a .com file specification.  And believe me, that directory is only for the stout hearted!

Paul
Title: Re: Barebones Minimum for Assembler
Post by: John on December 20, 2004, 02:46:22 PM
4b,
If you want to see what you can do with just ML and Link and RC then check this out:
http://www.grc.com/files/sib.zip

It is a small example windows app with a custom windows.inc and everything. It might help you to go "lower" or give you a better understanding of what goes on behind the scenes better.
Title: Re: Barebones Minimum for Assembler
Post by: 00100b on December 21, 2004, 12:46:52 AM
Thanks John,  I'll check it out.