03-06-2004, 05:48 AM
Flat Assembler is a free open source assembler that uses Intel syntax, like MASM and DEBUG. It also supports mmx, sse, etc.
But unlike MASM, no red tape like ".code" is required. Try this:
test.asm:Then assemble it: The default output format is a plain dump of the machine code (like a .com file - this makes it a great replacement for DEBUG), but it can also assemble to DOS, Windows, and Linux executables.
The down side:
It doesn't seem to be able to create obj files, and although the syntax is Intel-ish there are some differences from MASM - it's actually a lot like Turbo Assembler's Ideal mode. It didn't take me long to get used to.
The documentation it comes with, "fasm.txt", is good, easy to understand, and includes examples. It's got a fairly active forum here, where people discuss fasm programming on dos, Windows, and Linux and using fasm to write your own OS.
I'm currently using it to write a toy operating system that boots up on a floppy. So far it switches to protected mode and responds to the keyboard.
You can see a working graphical operating system written entirely in FASM that fits on a floppy here
But unlike MASM, no red tape like ".code" is required. Try this:
test.asm:
Code:
mov ax, 0013h
int 10h
retn
Quote:fasm test.asm test.binThen you can load the file into a string or array and CALL ABSOLUTE it:
Code:
' Comment out for qbasic:
'$INCLUDE: 'qb.bi'
' Load the machine code:
OPEN "test.bin" FOR BINARY AS #1
buffer$ = INPUT$(1000, #1)
CLOSE #1
' Run it:
'DEF SEG = SSEG(buffer$) ' uncomment for QB 7.x and VBDOS far strings
CALL ABSOLUTE(SADD(buffer$))
The down side:
It doesn't seem to be able to create obj files, and although the syntax is Intel-ish there are some differences from MASM - it's actually a lot like Turbo Assembler's Ideal mode. It didn't take me long to get used to.
The documentation it comes with, "fasm.txt", is good, easy to understand, and includes examples. It's got a fairly active forum here, where people discuss fasm programming on dos, Windows, and Linux and using fasm to write your own OS.
I'm currently using it to write a toy operating system that boots up on a floppy. So far it switches to protected mode and responds to the keyboard.
You can see a working graphical operating system written entirely in FASM that fits on a floppy here