Conversation
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…ons/checkout-3
…ons/upload-artifact-3
aengelke
left a comment
There was a problem hiding this comment.
Did you, like, you know, test these commands? 😅
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG | PARAM_DECIMAL}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "mov rax, [rip + {0}]" |
There was a problem hiding this comment.
Not going to work with a register (also on other occasions).
| .usedParameters = 2, | ||
| .allowedParamTypes = {PARAM_REG, PARAM_REG | PARAM_DECIMAL}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "mov [rip + {0}], {1}" |
There was a problem hiding this comment.
Same here. You might want to make .text rwx, too..
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG64 | PARAM_REG32 | PARAM_REG16}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "rdrand {0}\n\tjmp {0}" |
There was a problem hiding this comment.
jmp r/m only supports 16/64 bit opsize, and 16-bit opsize is useless as Linux by default refuses to map to the lowest 64 kiB.
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG64 | PARAM_REG32 | PARAM_REG16}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "mov ecx, {0}\nmultiverse:\nadd ecx, ecx\nsub ecx, 2\ncmp ecx, 0\njnz multiverse\ninc ecx\ndec ecx\nmov {0}, ecx\npushad\npopad\nmov eax, 2\ndiv eax" |
There was a problem hiding this comment.
pushad/popad don't exist in 64-bit mode.
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG64 | PARAM_REG32 | PARAM_REG16}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "mov eax, {0}\nsuffer:\ncmp eax, 666\nje end_suffer\nadd eax, 1\njmp suffer\nend_suffer:\npush eax\npop eax\nxor eax, eax\ninc eax\nadd eax, 2\ndec eax\ndec eax\nmov {0}, eax" |
There was a problem hiding this comment.
push r32 doesn't exist in 64-bit mode...
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG64 | PARAM_REG32 | PARAM_REG16}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "mov eax, 0\nmov ebx, 0\nmov ecx, 0\ncook:\ninc eax\ninc ebx\ninc ecx\nmov edx, eax\ncmp edx, {0}\njne cook\n" |
| .usedParameters = 1, | ||
| .allowedParamTypes = {PARAM_REG | PARAM_DECIMAL}, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "int {0}" |
There was a problem hiding this comment.
Only works with integer between 0 and 255.
| .pattern = "deja vu", | ||
| .usedParameters = 0, | ||
| .analysisFunction = NULL, | ||
| .translationPattern = "jmp main" |
There was a problem hiding this comment.
FYI: MemeASM only requires a main-function when you create an executable. When you create an assembly file (-S) or an object file (-O), using this command would result in the generated code having a potentially undefined reference (Since you could link it with something that defines start, but not main)
|
First of all, thank you for your contribution! Regarding the proposed commands, here are my initial thoughts:
TL;DR: This is not something I'd merge right away. I'll leave it open and have a think about what makes sense and what doesn't. Right now, I would adapt (i.e. merge with a few modifications) 5, 8, 9 and maybe 10. @xarantolus what are your thoughts on this? |
I also like that mnemonic, but I think setting all registers to 0 is almost a bit too useful for this project. What about sending a random signal to the parent process or maybe the process itself (that would of course only work on POSIX adjacent OSes, I'm not sure if execution on windows is supported?)?
I actually think that access to |
Well, it should revolve about the program becoming unstable. This would work with zeroing all registers, since it also zeroes the Stack Pointer (however, this is also achieved with
Well, you can theoretically run it on Windows, but everything involving Signals until now (i.e. Martyrdom) is not supported
I think you're talking about Martyrdom, where the MemeASM program sends SIGKILL to the parent process when it receives SIGINT
That's a good idea! |
I see, that makes sense. Maybe I'm a bit obsessed with signals atm, because all my ideas seem to be based on them, but here I go anyways ^^: What about the system as a whole becoming unstable with the use of that command? Sending a random signal to a random (user) process might be an option. Could kill the x server, file manager deamon, or similar, or do almost nothing ^^. But on second thought, that is a bit detached from the meme itself. |
Pull Request Changelog
Alright, let's take a quick squiz at what I've done in this pull request.
"knock knock, who's there? {p}"- This function is asking the universe for a value at a certain memory location. It moves the value at the address pointed to by{p}intorax."why don't you come on in, {p}"- This function moves the value fromraxinto the memory location pointed to by{p}."big brain time {p} {p}"- This moves the value of the second parameter{1}into the memory location pointed to by the first parameter{0}."execute order 66 {p}"- This function moves the number 66 intorax, and then movesraxinto the memory location pointed to by{p}."I don't feel so good"- This function sets all registers to zero."just a little switcheroo {p} {p}"- This one swaps the contents of the two registers{0}and{1}using only logical operators."deja vu"- This function jumps back to the start."why are we still here, just to suffer"- This function generates a divide-by-zero error and crash the program."you're in the wrong neighbourhood {p}"- Generates a random number and jumps to that address."stop, you violated the law"- This function stops the program execution."into the multiverse {p}"- This function takes an integer as an input and then performs a series of operations that essentially multiply the input by 2, subtract 2, and then check if the result is 0. If it's not zero, it goes back to the start and repeats the process. This is like entering multiple universes where the same actions keep happening."you're invited to suffer {p}"- This function takes an integer as an input and compares it with the number 666 in a loop. If it's not 666, it increments the input and repeats the process. This creates a cycle of suffering until the input becomes 666."hollup, let him cook {p}"- It initialiseseax,ebx, andecxto 0 and enters a "cook" loop where it incrementseax,ebx, andecxby one. It then moves the value ofeaxintoedxand comparesedxto{p}, if they are not equal it jumps back to "cook"."I'm feeling lucky {p}"- It triggers the interrupt associated with{p}.Enjoy lol