flat assembler
Message board for the users of flat assembler.
Index
> DOS > A binary executable which can be executed backward |
Author |
|
revolution 27 Jan 2021, 05:24
Nice. That is a palindrome.
I think you can add any arbitrary number of "EB01C3 ... C301EB" bytes at each end to fill out the full 64k. |
|||
27 Jan 2021, 05:24 |
|
FlierMate 27 Jan 2021, 06:02
revolution wrote: Nice. That is a palindrome. Your idea is good, never thought of that. |
|||
27 Jan 2021, 06:02 |
|
bitRAKE 27 Jan 2021, 18:37
Technically, RETN is palindromic - from there we might ask which lengths of executables can be palindromic? 1,(34+6n ; n>=0) have been presented so far.
Just to be pedantic we should state they must be valid for the OS and return (halt). |
|||
27 Jan 2021, 18:37 |
|
revolution 28 Jan 2021, 14:11
If all, or most, of the code must be executed then the problem is harder.
Otherwise we can have any valid arbitrary code as the first half, and simply place the reversed bytes at the end. |
|||
28 Jan 2021, 14:11 |
|
bitRAKE 29 Jan 2021, 08:36
That's a good point. For example,
{C3,...}{...,C3} for even lengths {C3,...}XX{...,C3} for odd. The length should be truncated at the point execution is returned to the OS. So, all the above would have an actual length of one. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
29 Jan 2021, 08:36 |
|
revolution 29 Jan 2021, 08:57
Even simpler:
Odd: {anything}C3{reversed anything} Even: {anything...C3}{C3...reversed anything} Where"anything" is any valid code. Hex editor, game, etc. |
|||
29 Jan 2021, 08:57 |
|
FlierMate 29 Jan 2021, 12:40
The rules of the contest was:
Quote:
The mirrored side of the code has to be executed to qualify... |
|||
29 Jan 2021, 12:40 |
|
FlierMate 29 Jan 2021, 12:45
|
|||
29 Jan 2021, 12:45 |
|
Tomasz Grysztar 29 Jan 2021, 12:59
FlierMate wrote: The rules of the contest was: Code: ; arbitrary code A, ending with: jmp filler ; reversed code B (never executed) filler: ; a whole lot of NOPs, or other similarly trivially palindromic code ; arbitrary code B (should end with program termination) ; reverse of "jmp filler", and: ; reversed code A (never executed) And even if you were not allowed, for example, to put NOP sequences in your code, you could replace it with some other instructions that would be trivially palindromic, like a 24 24 ("and al,24h") or 1C 1C ("sbb al,1Ch"), any of the single-byte opcodes that has no disruptive effect on your program (like CLC, STC, AAA), etc. etc. You could even mix and match them to make a randomly-looking filler. I would say it is actually a serious challenge to write good rules for such contest, as I found out myself when writing rules for my 512-byte coding contest last year. In the end organizers may need to rely on human assessment, at least to some extent. |
|||
29 Jan 2021, 12:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.