flat assembler
Message board for the users of flat assembler.
Index
> Main > OS-independant execution output? |
Author |
|
vid 10 Sep 2006, 21:22
sorry, i don't understand you, please try to rewrite it (with shorter sentences )...
|
|||
10 Sep 2006, 21:22 |
|
f0dder 10 Sep 2006, 22:47
There's no OS-independant way to do this. Writing to memory doesn't automatically write to disk. And under some operating systems you cannot even write to your exeuctable file while the program is running (windows*, to name one).
If you only want read-access to the data when the program is running, you can use another program to write the data there. But you still need OS-dependant way of reading the data. Pretty moot argument anyway, since executable files are os-dependant. *) yes, it's possible to write to running-exe, but it's hacky. Even the cleanest way to do it (copy exe to temp, launch with special args, etc.)is cumbersome. |
|||
10 Sep 2006, 22:47 |
|
DrenThales 11 Sep 2006, 16:24
I'm pretty sure I could write data during preprocessor and assembly time (but that would only let me document preprocessor and assembly passes, likewise), but, that too is OS dependant, because the compile is run via that particular OS version of FASM.
It would seem I was being somewhat naive when I originally posted the thread. In any case though, I'll just use my current OS for output, for the time being. And because my current OS happens to be Linux, I can just use a redirect ( > ) or pipe ( | ) to store and/or process it ( good ol' UNIX pipes). Thanks for helping to alieve my temporary lapse into naivety, as it were. |
|||
11 Sep 2006, 16:24 |
|
LocoDelAssembly 11 Sep 2006, 16:53
Quote:
Remember you can do that on Windows too |
|||
11 Sep 2006, 16:53 |
|
DrenThales 11 Sep 2006, 21:24
You can?, I wasn't aware. Course, I never really used DOS-type commands and such much, besides for running a few compilers for certain programming languages. Which would probably explain me not having encountered it (seeing as most MS Windows apps have GUIs, recently).
|
|||
11 Sep 2006, 21:24 |
|
LocoDelAssembly 11 Sep 2006, 21:55
try "echo gmail.com | nslookup" and "echo gmail.com | nslookup > out.txt" or just "nslookup gmail.com > out.txt" (the last two produces different output each other)
[edit] Another example can be creating a file named hosts.txt like this: Code: gmail.com hotmail.com microsoft.com And then using it like "type hosts.txt | nslookup" or "nslookup < hosts.txt" (since Windows supports stdin redirection too). Sumarizing, in Windows you can redirect stdin, stdout and stderr and you can use pipes as well[/edit] |
|||
11 Sep 2006, 21:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.