--- Added
You seem to think that "machine language" is something other than what it is. Here we go:
An Intel 8080 machine code to clear registers:
3e 00 11 00 00 21 00 00
(I just did that off the top of my head). Here is the same thing in Assembler:
mvi a,0
lxi b,0
lxi h,0
See? Not the same damn thing at all! (except that there is a one to one correspondence). Here is another example:
11 00 0a cd e3 ff
In assembler:
lxi b,(0 shl 8) + (10) ; row/column
call cursor
Or even
setcursor macro row,column
lxi b,(row shl 8) + (column)
call cursor
endm
setcursor 0,10
See how we are ATTEMPTING to approach a higher level? In C, we would use:
setcursor(0, 10);
Now, the Microsoft Assembler for x86 (MASM) supports PROC for procedure, MACRO, and a bunch of other stuff. It is actually *more* complicated than C!!!
And yet, it won't reorder or optimize for you. All of that legwork is left to you. As an example, I was optimizing some code (JBIG2 bi-level compression) for a client, and I wrote an "optimized" core loop in assembler. Optimized by manually scheduling and re-ordering instructions for a Pentium II processor. This process took me 3 days (for around 400 instructions).
I compiled a C implementation of the same routine using Microsoft MSVC 7, which took under a minutes. I was certain my assembler would be faster -- but I was wrong. The compiler generated ALMOST the same code, but ordered it differently, and was a few percent FASTER!
Like I said, the computer does bookkeeping better than humans.
--- Original Post
xxx1101xxxx
Writing in Machine Language is HARD. But, if you insist: sandpile.org documents the processors. The Windows SDK documents the API, and you will need documentation on the COFF (common object format) as well. I also recommend making up coding forms with address/instruction/detail on them. Write the code, and then generate the binary. There are around 1100 binary instruction formats, so I would recommend using an "assembler", but, heck, why not go straight to machine code? I wrote a FORTRAN compiler that way; consider it a right of passage.
If you really want to, MASM is available from Microsoft, as a free download (get the Microsoft C/C++ kit, and extract it from there). It comes with a "linker", so its probably getting too fancy, already. No, I recommend you do what I did -- grid up your address space, and manually allocate every byte. Since I was able to keep track of every byte in a 64k address space, I assume you can too (just use that 1/4" gridded paper, and stick a WHOLE bunch of them together -- crap, that's what I had to do). I mean "LINK.EXE" actually knows what a Windows format executable should look like! But, it's only bytes, and you CAN generate it by hand.
Seriously: for $DEITY sake! The computer is far better than humans at keeping track of such trivia. If you WANT to learn "low-level" programming, learn C. Entire OSs (drivers included) are written in it! And, by the way, "human generated" machine code is NOT (necessarily) the fastest! Instructions interact. For example:
mov eax,memory
add eax,ebx
mov memory,eax
is NOT the best ordering of instructions. It causes a delay while the "add" is completing, stalling the store back into memory. If you want the fastest codes, let a compiler take care of re-ordering the instructions for you.
Indeed, go up even higher level. Why compile, when you can use a Scheme interpreter (or Python, or Perl, or Ruby?). If you want speed AND convenience, use something like Gambit-C Scheme!
Back in the 70's up to the early 80's, I was FORCED to code in machine language and/or assembler. It was HELL. If you don't believe me, go and try it...
As to the "tools" you will need: basically, ANYTHING that will get bytes into a file will do. Why not use Microsoft Word, and write a quick macro that will open a file and deposit binary into it? That is more than we had when starting with a new machine. We had to generate the binary, transfer it into a ROM burner and make a ROM, *or* the machines had toggle switches for initial program entry. (Altair 8800). From there, you can write whatever software you want.
WTF are you doing torturing yourself? You do know that there is a very good reason that machines DON'T have toggle switch program entry anymore, right?