I thought is was (FASM):
mydata dd 1
mov eax, mydata ; eax = 101106h (address)
mov eax, ; eax = 1 (data)

;this isn't possible with x86 instructions!
_______________________; eax = what is at 01h
Posted on 2001-09-11 22:40:00 by bitRAKE
how come in fasm when I type "mov eax, mydata" do I get "mov eax, dword ptr "
Posted on 2001-09-12 13:40:41 by Kenny
Hey guys! It's really simple:

mydata dd 1 ; defines data containing dword 1 and a mydata
; label. mydata is a value of address to this data

mov eax,mydata ; so it stores address of this data in eax
; eax:=101106h

mov eax, ; it moves data pointed by address mydata
; to eax
; eax:=[101106h]=1

There are NO other possibilities.

In fasm every symbol IS a label, because label is just an value of address, and in fasm every symbol is a number value. Of course
you can define "MyData equ ", but this is preprocessor's thing, and you do it for your own responsibility.
With fasm you can always be sure, what code will be generated. When you put symbol without brackets (and none of preprocessor stuff is used), it will be immediate value in output code, when you put symbol (always number!!!) in brackets, it will
be the contents of memory at this address. Nothing more!

I hope this will help you.
Posted on 2001-09-18 09:50:08 by Tomasz Grysztar
In my example it doesn't go by those rules.. I can post the source if you choose to try and figure it out :)
Posted on 2001-09-18 12:24:54 by Kenny
Why I love FAsm. I spent my first two weeks learning 8086 Assembler with only debug.exe on a 486. FAsm really does make a lot of sense. Especially since it doesn't require that assume bull shit for 16b code!
Posted on 2001-09-18 22:27:07 by eet_1024
Kenny: please send me this source. I'll look at your problem.
Posted on 2001-09-19 03:42:41 by Tomasz Grysztar
Well, here it is:

Lemme give you a quick background on it:
I had a MASM source that I was going to be making into a game engine, and converting to FASM. The convert to FASM didn't go very well because, well it didn't like me. So, I've moved on to SpAsm (because I despise MASM (mainly because it toon 10 minutes to compile one of my sources)), but I still cannot figure out the FASM syntax. I outline my problem best in the beginning of this topic, but see for yourself, it simply doesn't work :)
Posted on 2001-09-19 12:46:02 by Kenny
Here is a version with my corrections, it seems to work. Really important changes are only in InitD3D.inc
Posted on 2001-09-20 02:16:16 by Tomasz Grysztar