flat assembler
Message board for the users of flat assembler.
Index
> Main > error: value out of range. |
Author |
|
LocoDelAssembly 23 Mar 2013, 22:27
fasm is trying to "cast" the string as int and then use it as pointer, but the string transforms into a very large int and you get the error (but even if it succeeded it wouldn't get you what you want). You need to declare your string somewhere else:
Code: your_code: mov eax, string . . . your_data_area: string db "abcdlol$" |
|||
23 Mar 2013, 22:27 |
|
Bob++ 24 Mar 2013, 00:43
Thanks for your answer,LocoDelAssembly.I know thtat it's possible with db,but I wanted to do this by "directly". For example,in C language the following code hold the address's of string at memory.
Code: int *p = "abc"; Some assemblies support it too,I thought that the fasm could too. |
|||
24 Mar 2013, 00:43 |
|
revolution 24 Mar 2013, 00:56
If you use the 'win32ax.inc' include then you can do this with invoke.
Code: invoke Something,'Hello World!' Code: call next_instruction db 'Hello World!',0 next_instruction: call [Something] |
|||
24 Mar 2013, 00:56 |
|
HaHaAnonymous 24 Mar 2013, 01:04
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 21:21; edited 1 time in total |
|||
24 Mar 2013, 01:04 |
|
revolution 24 Mar 2013, 01:19
HaHaAnonymous: It was just an example of how to place text strings. Of course you can use it anywhere that you need strings if you wish to. The reason I posted that example is because it is something that is already in the fasm download and the reader can examine it and modify it as needed for their situation.
|
|||
24 Mar 2013, 01:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.