flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > equ names and buffer.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1969
Roman 15 Jun 2025, 06:55
fasmw 1.73
Code:
@tofst = 0
macro tmpVal [n,v] {
        n equ  @tmpBufr+@tofst
        movss [@tmpBufr+@tofst],v
        @tofst = @tofst+4
}   

@tmpBufr dd 16 dup (0)

;in code
tmpVal det,xmm5,det2,xmm5,det3,xmm2
    movss xmm2,[det2] ;Ida pro show address  @tmpBufr+0x0C
                      ;I expected address @tmpBufr+0x04
    

how fix this ?
Post 15 Jun 2025, 06:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20689
Location: In your JS exploiting you and your system
revolution 15 Jun 2025, 07:03
This line "n equ @tmpBufr+@tofst" is the same each time.

Try with "label n at @tmpBufr+@tofst".
Post 15 Jun 2025, 07:03
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1969
Roman 15 Jun 2025, 07:37
I do this variant. Work fine.
Code:
@tofst equ 0
macro tmpVal [n,v] {
        n equ  @tmpBufr+@tofst
        movss [@tmpBufr+@tofst],v
        @tofst equ @tofst+4
}   

@tmpBufr dd 16 dup (0)

;in code
tmpVal det,xmm5,det2,xmm5,det3,xmm2
    movss xmm2,[det2] ;Ida pro show address  @tmpBufr+0x04
                    
        
Post 15 Jun 2025, 07:37
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.