flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Macro equ for section '.bss'

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 15 Aug 2022, 06:03
I want in code do this from the macro
Code:
;section code.  This code work.  But all needed write hands. 
Rnam equ x rd 1
Mov eax, [x] 

Rnam equ y rd 1
Add [y], eax

Rnam equ z rd 1

Section '.bss' readable writeable
Rnam
Restore Rnam ;I don't write this,  I want
; writed macro auto calculated how much do restore Rnam
Rnam
Restore Rnam
Rnam
    

Idea do restore Rnam until Rnam undefined then break macro
Repeat or while


Last edited by Roman on 15 Aug 2022, 06:20; edited 1 time in total
Post 15 Aug 2022, 06:03
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 15 Aug 2022, 06:20
You probably want irpv.
Post 15 Aug 2022, 06:20
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 15 Aug 2022, 06:21
How exactly using irpv in my case?
Please show example.

I do this but get error
irpv 3, Rnam { restore Rnam }

O! I do this.
Code:
 
irpv 90000, Rnam {
Rnam
 restore Rnam }    
Post 15 Aug 2022, 06:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 15 Aug 2022, 12:34
Input
Code:
x equ '1'
x equ '2'
x equ '3'
irpv v,x { display v,13,10 }    
Output
Code:
1
2
3
1 passes, 0 bytes.    
Post 15 Aug 2022, 12:34
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.