flat assembler
Message board for the users of flat assembler.

flat assembler > Compiler Internals > Change the output file name by use of a formatter directive.

Author
Thread Post new topic Reply to topic
MHajduk



Joined: 30 Mar 2006
Posts: 5983
Location: Poland
We know that there is a possibility to change generated output file extension by use of 'format' directive as follows:
Code:
format binary as '<extension>'    

I'd like to ask the following question: is there any analogous possibility to change / modify the generated output file name not only extension from inside the source code, i.e. by use of formatter directives?
Post 25 Sep 2018, 16:44
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1118
Location: Russian Federation
It would be a security risk - compiling a source file could result in malicious writes to arbitrary files on disk.
Post 01 Oct 2018, 04:02
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5983
Location: Poland
comrade wrote:
It would be a security risk - compiling a source file could result in malicious writes to arbitrary files on disk.
Thanks for your answer. Smile I supposed that lack of any answer to such a question may be caused by the interpretation you have described above. It was not my intention though. In some old file systems that were used in old machines in 80's information about binary files containing machine code was stored in a special sector of a disk, not in the file itself. Consequently, there was a possibility to build a fully functional relocatable code that could be loaded into an arbitrary place in computer memory just through change of the information about starting address stored in a specific record of the special sector of the disk. The information about starting address could be added to a resulting output file name and properly interpreted by a special disk manager creating images of floppy disks for that "ancient computer". Special format of the imported file name gives an information about type of the file (binary, text, BASIC source code etc.) and, in the case of binary file, in the auxiliary number, defines the starting address.

I hope that it explained the intention of such a specific question. Smile
Post 02 Oct 2018, 11:01
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6968
Location: Kraków, Poland
You could generate something like uncompressed ZIP or TAR with the generated file inside, then having complete control over the names of the files inside.
Post 02 Oct 2018, 11:18
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5983
Location: Poland
Tomasz Grysztar wrote:
You could generate something like uncompressed ZIP or TAR with the generated file inside, then having complete control over the names of the files inside.
Thank you, that may be a solution I am looking for. Smile
Post 02 Oct 2018, 11:21
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-2018, Tomasz Grysztar.

Powered by rwasa.