flat assembler
Message board for the users of flat assembler.

Index > Main > virtual at. How get sizeof virtual element ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1618
Roman 29 Jun 2022, 16:08
fasmw 1.73
Code:
virtual at UserNameDrop+4000
        GDT_limit dw ?
        GDT_address dd ?
        GDT_proc dq 0
    end virtual 
mov eax,[GDT_address]
mov eax,[GDT_address+sizeof.nxtElement] ;how get size virtual at UserNameDrop+4000 ?
    

I know the virtual at UserNameDrop+4000 size 10 bytes.
but how get this size from virtual at UserNameDrop+4000 ?

I found this variant.
Code:
virtual at UserNameDrop+4000
    @@:  GDT_limit dw ?
         GDT_address dd ?
         GDT_proc dq 0
         sizeVrt = $ - @b
    end virtual
    mov [GDT_address],11
    mov [GDT_address+sizeVrt],11 
    


Last edited by Roman on 29 Jun 2022, 16:36; edited 1 time in total
Post 29 Jun 2022, 16:08
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1618
Roman 29 Jun 2022, 16:28
Code:
virtual at 0 as 'log' ;not understood  as 'log'. Why this needed ?
        Log::
    end virtual

    virtual Log
        db 'Hello!',13,10 ;how virtual and whear is store text 'Hello!' ?
    end virtual

    
Post 29 Jun 2022, 16:28
View user's profile Send private message 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.