Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
Known issues/2.0.16
(section)
From Turing Complete
Views
Read
Edit
Edit source
View history
associated-pages
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Wrong assembly instructions === These are fixed in Eryk's patch mentioned above. The assembly instructions for various levels is incorrect, some instructions that are bugged include, but are not limited to: * Store and load instructions (including pload and pstore) * Move, neg, and not instructions * Push and pop instructions * Call and return instructions Several of these have the wrong Mode, wrong OPcode, are simply outdated, or the description contains an error . Below shows the correct instructions for these functions. You can either change them in game or in the meta.txt file associated with the level.<syntaxhighlight lang="text"> load8 %dest(register), %address(register) 01100000 dddd0000 0000aaaa 00000000 Loads %address from RAM and stores it to %dest store8 %address(register), %value(register) 01100001 0000vvvv 0000aaaa 00000000 Store %value to %address in RAM load_8 %dest(register), [%address(immediate)] 01110000 dddd0000 aaaaaaaa aaaaaaaa Loads %address from RAM and stores it to %dest store_8 [%address(immediate)], %value(register) 01110001 0000vvvv aaaaaaaa aaaaaaaa Store %value to %address in RAM load16 %dest(register), %address(register) 01100010 dddd0000 0000aaaa 00000000 Loads %address from RAM and stores it to %dest store16 %address(register), %value(register) 01100011 0000vvvv 0000aaaa 00000000 Store %value to %address in RAM load_16 %dest(register), [%address(immediate)] 01110010 dddd0000 aaaaaaaa aaaaaaaa Loads %address from RAM and stores it to %dest store_16 [%address(immediate)], %value(register) 01110011 0000vvvv aaaaaaaa aaaaaaaa Store %value to %address in RAM pload8 %dest(register), %address(register) 01100100 dddd0000 0000aaaa 00000000 Loads %address from SSD and stores it to %dest pstore8 %address(register), %value(register) 01100101 0000vvvv 0000aaaa 00000000 Store %value to %address in SSD pload_8 %dest(register), [%address(immediate)] 01110100 dddd0000 aaaaaaaa aaaaaaaa Loads %address from SSD and stores it to %dest pstore_8 [%address(immediate)], %value(register) 01110101 0000vvvv aaaaaaaa aaaaaaaa Store %value to %address in SSD pload16 %dest(register), %address(register) 01100110 dddd0000 0000aaaa 00000000 Loads %address from SSD and stores it to %dest pstore16 %address(register), %value(register) 01100111 0000vvvv 0000aaaa 00000000 Store %value to %address in SSD pload_16 %dest(register), [%address(immediate)] 01110110 dddd0000 aaaaaaaa aaaaaaaa Loads %address from SSD and stores it to %dest pstore_16 [%address(immediate)], %value(register) 01110111 0000vvvv aaaaaaaa aaaaaaaa Store %value to %address in SSD cmp %a(register), %b(register) 00101001 1111aaaa 0000bbbb 00000000 Compares %a and %b and store the resulting flags in r15. cmp %a(register), %b(immediate) 00111001 1111aaaa bbbbbbbb bbbbbbbb Compares %a and %b and store the resulting flags in r15. mov %a(register), %b(register) 00100100 aaaabbbb 00000000 00000000 Copies from register %b to register %a mov %a(register), %b(immediate) 00110100 aaaa0000 bbbbbbbb bbbbbbbb Copies immediate %b to register %a neg %a(register), %b(register) 00100101 aaaa0000 0000bbbb 00000000 Negate register %b and store the result in %a not %a(register), %b(register) 00110110 aaaabbbb 11111111 11111111 Bitwise NOT each bit in register %b and store the result in %a push %a(register) 00110101 11101110 00000000 00000010 01100011 0000aaaa 00001110 00000000 Pushes %a on to the stack. This instruction is a synonym for: sub sp, sp, 2 store_16 [sp], %a pop %a(register) 01100010 aaaa0000 00001110 00000000 00110100 11101110 00000000 00000010 Pops %a off the stack. This instruction is a synonym for: load_16 %a, [sp] add sp, sp, 2 call %a(label) 00001000 11110000 00000000 00000000 00110100 11111111 00000000 00010100 00110101 11101110 00000000 00000010 01100011 00001111 00001110 00000000 01011000 00001111 aaaaaaaa aaaaaaaa Calls %a. Overwrites the flag register. This instruction is a synonym for: counter flags add flags, flags, 20 sub sp, sp, 2 store_16 [sp], flags jmp %a ret 01100010 11110000 00001110 00000000 00110100 11101110 00000000 00000010 01001000 00001111 00001111 00000000 Returns from the last function call. Overwrites the flag register. This instruction is a synonym for: load_16 flags, [sp] add sp, sp, 2 jmp flags </syntaxhighlight>
Summary:
Please note that all contributions to Turing Complete are considered to be released under the Creative Commons Attribution-ShareAlike (see
TuringComplete:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)