Machine code: Difference between revisions
Content added Content deleted
Line 238: | Line 238: | ||
This example perform these: At Datamem(1) put 500, eax=5100, eax add Datamem(1), eax add 5, store eax to Datamem(0). We have an option to clear eax, or use it to return value as error code. |
This example perform these: At Datamem(1) put 500, eax=5100, eax add Datamem(1), eax add 5, store eax to Datamem(0). We have an option to clear eax, or use it to return value as error code. |
||
We have to leave all other registers, and stack as we found it. |
We have to leave all other registers, and stack as we found it. |
||
Both running in Wine (Linux 64bit) too |
|||
Line 308: | Line 309: | ||
EmbByte(0x31, 0xC0) ' xor eax, eax |
EmbByte(0x31, 0xC0) ' xor eax, eax |
||
Ret() ' Return |
Ret() ' Return |
||
=lambda ExecMem, DataMem (a as double, b as double)-> { |
|||
Return DataMem, 0:=a, 1:=b |
Return DataMem, 0:=a, 1:=b |
||
Try ok { |
Try ok { |
||
Line 319: | Line 320: | ||
} |
} |
||
} |
} |
||
=Z |
|||
Sub Ret() |
Sub Ret() |
||
Return ExecMem, Address:=0xC3 |
Return ExecMem, Address:=0xC3 |