flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Calculate auto size data.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
Code:
RctSlctGUIp1 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2

RctSlctGUIp2 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2

RctSlctGUIp3 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2
    


In macro Set i use num 2*40 (this offset to RctSlctGUIp3)
If i write in data new RctSlctGUIp0 i get another addres.
How auto calc number for macro in this case ?

Code:
RctSlctGUIp0 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2

RctSlctGUIp1 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2

RctSlctGUIp2 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2

RctSlctGUIp3 dq ProcSelectGUIRect3,0
                     dd 102,81,215,RslctYsz
                     dq pDopRctColors2
    

Now i must write in macro Set num 3


Last edited by Roman on 30 Mar 2020, 10:46; edited 1 time in total
Post 30 Mar 2020, 09:22
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I write NumOffset EQU (RctSlctGUIp3+40-RctSlctGUIp0)/40
Post 30 Mar 2020, 10:36
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
Strange. Fasm 1.73.04
My file include 'macro.txt' get me NumOffset = 0 ?!

mov byte [GUIdat2+sizeof.GUIdt*NumOffset+GUIdt.szTxt],dl

Work fine if i write mov byte [GUIdat2+sizeof.GUIdt*3+GUIdt.szTxt],dl
Post 30 Mar 2020, 11:11
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.