flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Using load inside virtual

Author
Thread Post new topic Reply to topic
rCX



Joined: 29 Jul 2007
Posts: 175
Location: Maryland, USA
rCX 16 Aug 2026, 22:30
I'm trying to use load inside a virtual block in Fasm 1 but I get an "error: value out of range". How can I get it to work? For example the following doesn't work

Code:
struc myStruc x
{
    .x  dw x
    virtual
        load myX word from .x
    end virtual
}

s myStruc 4
    


It only works if the virtual block is removed
Code:
struc myStruc x
{
    .x  dw x
    load myX word from .x
}

s myStruc 4
    
Post 16 Aug 2026, 22:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 21049
Location: In your JS exploiting you and your system
revolution 17 Aug 2026, 00:21
Virtual starts a new addressing space. Since the new space is empty then nothing can be loaded.
Code:
virtual
 dd 0x12345 ; this virtual address space is now 4 bytes long
 load x dword from $$
end virtual    
Post 17 Aug 2026, 00:21
View user's profile Send private message Visit poster's website 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


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.