flat assembler
Message board for the users of flat assembler.

Index > Main > Generate specific string under macro

Author
Thread Post new topic Reply to topic
Fulgurance



Joined: 27 Nov 2017
Posts: 271
Fulgurance
Hello, today I want to do something, I want under repeat block to generate all numbers from 0 to 1000, and use the % symbol. How I can ask to FASM to generate their strings ?

Code:
Numbers:
repeat 1000
    du '%'
end repeat    


I want the ' symbol, after the number, and after the ' symbol again

The final file will be something like this:
0
1
2
...
100
...101
...to 1000
Post 10 Jan 2021, 00:14
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18469
Location: In your JS exploiting you and your system
revolution
Code:
Numbers: rept 1001 x:0 { db "'",`x,"'" }    
Post 10 Jan 2021, 02:11
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
Quote:

Numbers: rept 1001 x:0 { db "'",`x,"'" }

How unroll this to text data ?
Save in text file and include in project ?
Post 10 Jan 2021, 08:02
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18469
Location: In your JS exploiting you and your system
revolution
At the command prompt:
Code:
fasm numbers.asm numbers.txt    
Post 10 Jan 2021, 08:32
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
I thinked about this:
Code:
format text as 'txt'
Numbers: rept 1001 x:0 { db "'",`x,"'" }
    


Last edited by Roman on 10 Jan 2021, 08:41; edited 1 time in total
Post 10 Jan 2021, 08:40
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18469
Location: In your JS exploiting you and your system
revolution
Maybe
Code:
format binary as 'txt'    
There is no "text" format.
Post 10 Jan 2021, 08:41
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
fasm numbers.asm numbers.txt
Its write in bat file ?
Post 10 Jan 2021, 08:44
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18469
Location: In your JS exploiting you and your system
revolution
If you want to make a .bat file then:
Code:
fasm numbers.asm numbers.bat    
Make it any file you want.
Code:
fasm numbers.asm numbers.mp4    
Post 10 Jan 2021, 08:55
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
revolution
You did not understand me.
I asking whear is write this ?
Code:
fasm numbers.asm numbers.txt
    

I try write this in fasm and compile and get error.
Illegal instruction.
For this reason i asked about bat file.
I mean compile from bat file.

Because i not understand how use this and where is write this code:
Code:
fasm numbers.asm numbers.txt
    
Post 11 Jan 2021, 09:31
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18469
Location: In your JS exploiting you and your system
revolution
You type that at the command prompt. fasm is the executable filename followed by the two parameters for the input source and the output destination.
Code:
C:\> fasm filein.asm fileout.ext    
Post 11 Jan 2021, 09:52
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 271
Fulgurance
Thanks you !
Post 12 Jan 2021, 12:05
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.