flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > assigning areas in memory

Author
Thread Post new topic Reply to topic
Azagaros



Joined: 18 Jan 2013
Posts: 14

assigning areas in memory

NASM has a keyword called "Absolute." The idea is to alias a piece of memory with a identifier.


Code:

absolute 0400h  
serialbase resw 4




Does fasm have something similar? I was not finding it in docs.
Post 15 Jul 2017, 17:48
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6686
Location: Kraków, Poland

You can use either ORG or VIRTUAL for this purpose. ORG simply changes the assumed address for assembled code or data:

Code:
org 0400h
serialbase rw 4

And VIRTUAL does a similar thing for an enclosed block of instructions/definitions, but the difference is that any data generated this way does not go into output:

Code:
virtual at 0400h
    serialbase rw 4
end virtual

Post 15 Jul 2017, 18:02
View user's profile Send private message Visit poster's website Reply with quote
Azagaros



Joined: 18 Jan 2013
Posts: 14

Cool thank you.
Post 15 Jul 2017, 18:04
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.