![]() |
|
[Assembly] FASM - Flat assembler (compile ASM to .exe) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Assembly] FASM - Flat assembler (compile ASM to .exe) (/showthread.php?tid=6273373) |
FASM - Flat assembler (compile ASM to .exe) - Hackers - Jun 15, 2024 FASM is a useful tool because it allows you to compile assembly to exe, using .asm source files. It's essentially standalone, but you do need to download the correct version first ( https://flatassembler.net/download.php ) FASM is interesting because you can put it on a USB or package it into another program, to compile new assembly from it - as long as the OS version matches up, you can compile on the fly without any setup needed. To show you an example, I will create Hello World, in assembly - compiling with FASM: Code format PE consoleJust compile like so: Code fasm hello.asmIf you don't have fasm in your PATH variable you can do it like this: Code C:\Path\To\fasm\fasm.exe C:\Path\To\hello-world.asmThis will create hello-world.exe, a 2KB file. I hope this helped you! RE: FASM - Flat assembler (compile ASM to .exe) - happygonutty - Jun 15, 2024 Great share and good start for those who would like to try out FASM in this community. RE: FASM - Flat assembler (compile ASM to .exe) - Hackers - Jun 15, 2024 (Jun 15, 2024 05:37 PM)happygonutty Wrote: Great share and good start for those who would like to try out FASM in this community. yeah, hope it helps someone! I went a little further, going on to turn the hello world PE into bytes to include in another asm file, but I stopped before completing and cut that out of this thread for now - if I finish, I'll post in another thread (Assembly builder + scheduled process / runPE loader) RE: FASM - Flat assembler (compile ASM to .exe) - happygonutty - Jun 15, 2024 (Jun 15, 2024 06:51 PM)nodes Wrote: yeah, hope it helps someone! It will especially those who do not have an idea how assembly language works and how to compile. Using assembly language is quite tedious but FASM made it very easy and everything in the documentation is already sufficient. 🙃 Actually FASM and MASM are the only assembly languages that were very easy to use and comprehensive to read than any other. 🙃 RE: FASM - Flat assembler (compile ASM to .exe) - Hackers - Jun 15, 2024 (Jun 15, 2024 07:16 PM)happygonutty Wrote: It will especially those who do not have an idea how assembly language works and how to compile. Using assembly language is quite tedious but FASM made it very easy and everything in the documentation is already sufficient. 🙃 Yeah I do think it is easier on Visual Studio - doing it this way with FASM here manually is not ideal. I should bring this over to VS & get the build instructions and includes sorted for easier development. RE: FASM - Flat assembler (compile ASM to .exe) - HFDone - Jun 16, 2024 if you think vs is better then fasm you probably didnt work with it from the first time i find it its the only compiler im using for 32x64 asm the things you can do with fasm is endless the setup syntex macros debug etc been using it for years so i know what im talking about also been trying masm and nasm which had also few good things for asm needs RE: FASM - Flat assembler (compile ASM to .exe) - happygonutty - Jun 16, 2024 (Jun 15, 2024 07:45 PM)nodes Wrote: Yeah I do think it is easier on Visual Studio - doing it this way with FASM here manually is not ideal. I should bring this over to VS & get the build instructions and includes sorted for easier development. You can integrate FASM in VS? 🤯 I never knew that. I just plainly use the default FASM IDE. 🙃 RE: FASM - Flat assembler (compile ASM to .exe) - Hackers - Jun 16, 2024 (Jun 16, 2024 05:49 AM)happygonutty Wrote: You can integrate FASM in VS? 🤯 I never knew that. I just plainly use the default FASM IDE. 🙃 Sorry, what I mean is that I should just go to Visual Studio, use MASM over there for ASM rather than doing this, but that's mostly because I do find it easier to get things done in VS. However, portable compilers are always useful I think so I wanted to share this thread here. I will check out the FASM IDE as I did this with command line calling my fasm path manually from my downloads folder lol. I probably should give it a better look so I can truly compare it to other solutions. RE: FASM - Flat assembler (compile ASM to .exe) - happygonutty - Jun 16, 2024 (Jun 16, 2024 07:14 AM)nodes Wrote: Sorry, what I mean is that I should just go to Visual Studio, use MASM over there for ASM rather than doing this, but that's mostly because I do find it easier to get things done in VS. However, portable compilers are always useful I think so I wanted to share this thread here. I will check out the FASM IDE as I did this with command line calling my fasm path manually from my downloads folder lol. I probably should give it a better look so I can truly compare it to other solutions. Oh okay then. I was guessing that you maybe had a typo or something and was actually pertaining to MASM. Anyways, I prefer to do everything in one IDE or Editor rather than switching from time to time but I have this irritability that I have to use what the documentation said so or what the instruction is using kind of habit. 😆 OCD perhaps? 🤣 RE: FASM - Flat assembler (compile ASM to .exe) - Hackers - Jun 16, 2024 (Jun 16, 2024 04:47 PM)happygonutty Wrote: Oh okay then. I was guessing that you maybe had a typo or something and was actually pertaining to MASM. Anyways, I prefer to do everything in one IDE or Editor rather than switching from time to time but I have this irritability that I have to use what the documentation said so or what the instruction is using kind of habit. 😆 OCD perhaps? 🤣 definitely depends on what you're doing, sometimes for certain setups it's better to just use whatever their documentation recommends even if you can do it another way. At least on a first run install, best to use whatever project tools & compiler makes the most sense. I don't really know enough about masm vs fasm to be honest |