flat assembler
Message board for the users of flat assembler.

Index > Main > In Memory - Self Assembly

Author
Thread Post new topic Reply to topic
masonswanson



Joined: 17 Aug 2010
Posts: 51
masonswanson
I Have downloaded fasm16925, as well as the fasm dll, asmedit dll, and all of the examples i could find on this board, and a few projects that use fasm, including raw xml library, and the fasm tcc barebones tutorial on wiki.osdev.org, i also have the tcc source, and the source for tccboot. i have laid it all out in a single root directory "BrainStorm", where the source code for fasm and tcc are in "/source/", the fasm examples are in "/examples/" and the includes for fasm and tcc are in "/include/". the downloadable docs for fasm, and the wiki.osdev.org archive are stored under "/docs/". I have gone through and made a .bat file for each component and every example under "/BrainStorm", which are located in the folder with the source for that specific component, and in the root directory there is a file "buildall.bat" the changes directory to each component's directory and executes the build.bat located therein which creates the executable in "/BrainStorm/bin/" if it is a component, or "/BrainStorm/bin/examples/", If it is an example. Now What I Want To Know Is How Would I Go About Making All Of The Source Code Of Fasm be embedded into the executable, so i can, without the source code, reassemble it, or maybe if anybody could help out with using the dll. basically i want to say:

fasm selfassemble.asm fasm.tmp
sudo rm ./fasm
cp ./fasm.tmp ./fasm


where the contents of selfassemble.asm is something like:

call assemble, [internal_src]
move [start],[newlycompiledsrc]


where the memory location names are obvious in there usage and are part of the assembler itself,
and not necessarily present in selfassemble.asm
Post 03 Nov 2010, 19:07
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
masonswanson,

Wow, that's quite an accomplishment. What did you want to say?
Post 03 Nov 2010, 19:13
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
That would require extensive modifications to Fasm's source. Fasm's build system works off of a complex directory structure included with the include directive. If you were to try to assemble the main file embedded as a resource inside the executable, Fasm would read the include directive and would look for a file that doesn't necessarily exist.
Post 04 Nov 2010, 00:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
You can always manually 'include' all the necessary sources into one large flat source code file.
Post 04 Nov 2010, 00:28
View user's profile Send private message Visit poster's website Reply with quote
masonswanson



Joined: 17 Aug 2010
Posts: 51
masonswanson
here is the FASM core and front-end in one file, it is based on the windows version, i copied each file that was included's contents in place of the include statement


Description:
Download
Filename: FASM.ASM
Filesize: 555.1 KB
Downloaded: 200 Time(s)

Post 04 Nov 2010, 15:41
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger Reply with quote
masonswanson



Joined: 17 Aug 2010
Posts: 51
masonswanson
I Have Gone Through The Source And Reformatted It To Use Tabs Instead Of Spaces and each label (That I Could Find) Is the first thing on the line(There Is Nothing Before The Name Of The Label) and there Is A Blank Line Before It
For Example:

lol:
some code,here
some code,here
and some,here

lol2: ; Notice The Line Above Is Blank, It Makes For Slightly Easier Reading
some code,here
some code,here
and some,here


Then At The End Of The File I Added This:

build_self:
mysourcecode file "FASM.ASM"


but now i just need to figure out how to have The contents of fasm.asm be assembled and replace the original code section, is anybody on this board familiar with genetic programming?
Post 04 Nov 2010, 20:54
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger Reply with quote
rocketsoft



Joined: 26 Jan 2010
Posts: 189
rocketsoft
ive heard of genetic programming but i dont believe its more powerfull than my truly geniusetic mind Smile
Post 12 Nov 2010, 22:33
View user's profile Send private message Visit poster's website Reply with quote
masonswanson



Joined: 17 Aug 2010
Posts: 51
masonswanson
the whole purpose would be to expand your metaknowledge or wisdom of yourself, self perception, and use that knowledge to be closer to the singularity
Post 13 Nov 2010, 16:45
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger 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.