Questions tagged [fasm]

The Flat ASseMbler (FASM) is a fast and efficient self-assembling x86 assembler for DOS, Windows and Linux operating systems.

Flat assembler is a fast assembly language compiler for the x86 architecture processors, which does multiple passes to optimize the size of generated machine code. It is self-compilable and uses intel syntax.

There are versions for Windows, DOS, Linux and other Unix-like operating systems. The DOS and Windows versions also include an editor with integrated syntax-highlighting to edit, compile and execute programs from one place.

This tag should also be used for posts that do not relate directly to FASM, but make extensive use of language features and FASM-specific macros.

Related tags:

  • The more general for posts in assembly language, including
    • for 16-bit programming
    • for 32-bit programming
    • for 64-bit programming

Further links:

350 questions
0
votes
1 answer

Pushing contents of struct type onto the stack in x86

Lets say I have declared a struct like so: struct VEC x dd ? y dd ? ends Then I declare some data as struct: section '.data' data readable writeable vec1 VEC 5,4 vec2 VEC 3,2 Now, I wish to push the…
user1720897
  • 1,216
  • 3
  • 12
  • 27
0
votes
0 answers

Hello world does work in PE but not in PE64

I'm trying to kind of write my own x64 Hello world program in FASM on Windows I tried to rewrite this version: How to write to the console in fasm?, to a x64 program like this: format PE64 entry start include 'win64a.inc' section '.code' code…
S.Klumpers
  • 410
  • 3
  • 14
0
votes
2 answers

embed assembly produced code into C program using FASM

I am trying to link assembly-compiled with c-compiled code, and I get undefined reference error during linking phase. This is how i do it: [niko@dev1 test]$ cat ssefuncs.asm format ELF64 EQUAL_ANY = 0000b RANGES = 0100b EQUAL_EACH …
Nulik
  • 6,748
  • 10
  • 60
  • 129
0
votes
2 answers

GetVersionEx function for Windows 8.1 and upper (fasm)

I am writting application in fasm and have problem with determinating Windows version 8.1 and upper. Functions GetVersionEx and Version Helper give me Windows 8. As MSDN says, I must target my application via changing manifest file in Visual Studio,…
Binary Mind
  • 309
  • 3
  • 13
0
votes
4 answers

FASM gives me 'error: illegal instruction.' during assembly

I just started coding in assembly. I have downloaded the flat assembler and copied code from the internet. When I run this code, however, it says something like: section .text error: illegal instruction. My question is: what is wrong with this…
0
votes
0 answers

Using register for memory addressing in assembly using fasm assembler?

Ok, so here is my query. Say, when i write the following instruction mov ax,[myvar] ; this basically means to move the value stored at memory address of myvar and moving the value in ax register. Now, i found this article which had the following…
Missy Zewdie
  • 231
  • 2
  • 9
  • 17
0
votes
3 answers

Creating a procedure and calling it in Flat assembler?

I was going through these tutorials -https://www.youtube.com/watch?v=0dLkvasLSlo&list=PLPedo-T7QiNsIji329HyTzbKBuCAHwNFC&index=33 and i wanted to create a procedure in flat assembler. This is what i tried and when i try to emulate it gives me the…
Melissa
  • 41
  • 9
0
votes
2 answers

How do i Print out a number using fasm assembler?

I am really new to assembly programming and i am learning to experiment with the few things i am learning by myself and class. So, my goal is to display a number stored in a register. When i run the program, it displays the character value of the…
Melissa
  • 41
  • 9
0
votes
3 answers

Write a program that gets the character 'C' from memory then prints it on screen using Flat Assembler?

I am really new to Assembly programming. Its been 2 weeks since our lecturer starting teaching assembly programming using FASM. He gave us the above question to solve using memory addressing and I am really stuck. He only taught us the mov…
Melissa
  • 41
  • 9
0
votes
1 answer

Convert FASM Binary to Decimal

Ok, if anyone has heard of FASM and is not on Mac, I need your help. So, I need to compile FASM on Mac, but I need to download a patch from the forums, and for that I have to register. But for registration, they have an extreme captcha. It gives me…
Facekapow
  • 21
  • 1
  • 6
0
votes
0 answers

FASM IRC Bot Prefix

I've been trying to learn how to create an IRC bot in assembler from some old sources. Everything is going fine with my learning except for a prefix problem. The prefix for the bot is: CommandPrefix equ "^^" And the length of the prefix is added…
JesseR
  • 1
  • 1
0
votes
2 answers

fasm, searching a word in dos environment

The exercise is to take a word from keyboard, search the DOS environment and if that word is there, display the line with this word from DOS environment. Here is my code: format binary org 100h start: mov es,[ds:02ch] xor…
user4132350
0
votes
1 answer

Insert NOPs at odd offsets in FASM

In older assemblers, there existed a preprocessor instruction ".even" or "even", which insert a NOP, if the current offset is odd, so that the offset of the next instruction/variable will be even. Does a similar instruction exist in FASM? Isn't it…
Van Uitkon
  • 356
  • 1
  • 6
0
votes
1 answer

parity flag getting mixed results with "one and zero"

Check this code out include 'win32ax.inc' ;.data .code start: mov al,00000001b add al,00000001b ;even =2 pf = 0 add al,00000001b ;odd =3 pf = 1 add al,00000001b ;even =4 pf = 0 sub al,00000001b ;odd =3 pf = 1 sub…
noob
  • 51
  • 6
0
votes
1 answer

RDTSC on Intel Celeron 64-bit Assembly program

I wrote a small random digit program that makes use of RDTSC to give me the randomness. I wrote it on Linux Mint 17 using FASM. The problem is, it works perfectly on AMD FX 64bit PC but the exact piece of code fail (or hangs) on Intel Celeron…
royalfinest
  • 155
  • 1
  • 8