News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Barebones Minimum for Assembler

Started by 00100b, December 19, 2004, 03:14:17 PM

Previous topic - Next topic

00100b

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:

  • ML.EXE
  • LIB.EXE
  • LINK.EXE
  • <favorite text editor>

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.

drhowarddrfine


Jimg

Depends on what you call an application.   For just a program, drop to a command prompt and use debug ;)

donkey

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.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

John

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.

pbrennick

Let's not forget RC.EXE and its support files.

Paul

johnfound

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.

00100b

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?

00100b

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.

Vortex

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.

daydreamer

no possible making a .com file with masm?

MichaelW

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;

eschew obfuscation

00100b

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.

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

00100b

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.