flat assembler
Message board for the users of flat assembler.
Index
> Windows > Starting programming assembly in windows |
Author |
|
revolution 06 Apr 2017, 18:15
fasm doesn't need to be installed, just copy the executable file to your path and run it.
fasm can be used without a linker. fasm can also be used with a linker if you wish to. The download page is linked at the bottom of this page that you are reading now. |
|||
06 Apr 2017, 18:15 |
|
Lengua_Maquinista 06 Apr 2017, 21:47
I guess there are bugs or something in the code im trying to run.......because when I copy this into the assembler and tell it to run i get an error:
Code: ; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« ; Build this with the "Project" menu using ; "Console Assemble and Link" ; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« .486 ; create 32 bit code .model flat, stdcall ; 32 bit memory model option casemap :none ; case sensitive include \masm32\include\windows.inc ; always first include \masm32\macros\macros.asm ; MASM support macros ; ----------------------------------------------------------------- ; include files that have MASM format prototypes for function calls ; ----------------------------------------------------------------- include \masm32\include\masm32.inc include \masm32\include\gdi32.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc ; ------------------------------------------------ ; Library files that have definitions for function ; exports and tested reliable prebuilt code. ; ------------------------------------------------ includelib \masm32\lib\masm32.lib includelib \masm32\lib\gdi32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib .code ; Tell MASM where the code starts ; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« start: ; The CODE entry point to the program print chr$("Hey, this actually works.",13,10) exit ; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« end start ; Tell MASM where the program ends actually, it seems like the libraries just aren't installed properly for this code to be able to run it because it highlights the "include" line....looks like i need to run a simpler program Edit by revolution: Added code tags |
|||
06 Apr 2017, 21:47 |
|
Trinitek 06 Apr 2017, 22:15
If you want to build MASM code, use MASM. FASM has its own set of macros and syntax.
|
|||
06 Apr 2017, 22:15 |
|
Lengua_Maquinista 06 Apr 2017, 22:46
Okay, I'll just read the documentation for FASM what I should have done in the first place, thanks
edit: Now that i did that, i ran the "Beer" program and omfg that was hilarious! |
|||
06 Apr 2017, 22:46 |
|
catafest 07 May 2017, 18:25
Read the https://flatassembler.net/docs.php and use internet to find tutorials and docs.
If don't want to use FASM editor you can use the SAMS editor - https://dman95.github.io/SASM/english.html : Come with example projects: Code: format ELF64 section '.data' writeable msg db 'Hello, world!', 0 formatStr db "%s", 0 section '.text' executable public main extrn printf main: mov ebp, esp; for correct debugging mov rbp, rsp; for correct debugging sub rsp, 32 and rsp, -16 mov rcx, formatStr mov rdx, msg call printf mov rsp, rbp xor eax, eax ret |
|||
07 May 2017, 18:25 |
|
rugxulo 08 May 2017, 13:57
Trinitek wrote: If you want to build MASM code, use MASM. FASM has its own set of macros and syntax. True, MASM and FASM are not really compatible, so old code will need rewriting. Although, for "MASM"-style, I would say use JWasm (or HJWasm??) instead and read Art of Assembly if you want some kind of (MASM syntax) tutorial. Or (untested) buy Ray Seyfarth's (cheap) 64-bit assembly book(s), which are apparently quite good (and use YASM and his GDB frontend/IDE called EBE). |
|||
08 May 2017, 13:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.