The world's smallest self-replicating program
61–65 of 65 posts
Re: The world's smallest self-replicating program
#62 mov 0,1
is the smallest self-replicating programRe: The world's smallest self-replicating program
#63I just uploaded it to https://github.com/mct/assembly-toys/tree/master/imp
Re: The world's smallest self-replicating program
#64Earlier quoted context omitted.
No, without a shebang it is interpreted as a shell script.
Correct. A file will only be considered a binary executable if it has a proper header (ELF, Mach-O, etc) The default if no header and no shebang is to treat it like a shell script. In fact, an empty executable file has been used to implement /bin/true on some old systems. Why take the added cost of a disk seek when just the information in the inode will do?
Re: The world's smallest self-replicating program
#65Earlier quoted context omitted.
Correct. A file will only be considered a binary executable if it has a proper header (ELF, Mach-O, etc) The default if no header and no shebang is to treat it like a shell script. In fact, an empty executable file has been used to implement /bin/true on some old systems. Why take the added cost of a disk seek when just the information in the inode will do?
>In fact, an empty executable file has been used to implement /bin/true on some old systems. Why take the added cost of a disk seek when just the information in the inode will do? why is this only on old systems? it seems very efficient.