1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-10 01:40:09 +00:00

VM: added OP_DECPTR, minor refactoring of laikaB_unlock

This commit is contained in:
2022-04-30 16:21:29 -05:00
parent c16cdf3644
commit c63bfe00af
3 changed files with 23 additions and 12 deletions

View File

@@ -18,13 +18,13 @@ int main(int argv, char **argc) {
};
struct sLaikaB_box box = {
{0}, /* reserved */
{ /* stack layout:
.unlockedData = {0}, /* reserved */
.code = { /* stack layout:
[0] - unlockedData (ptr)
[1] - data (ptr)
[2] - key (uint8_t)
[3] - working data (uint8_t)
*/
*/
LAIKA_MAKE_VM_IAB(OP_LOADCONST, 0, 0),
LAIKA_MAKE_VM_IAB(OP_LOADCONST, 1, 1),
LAIKA_MAKE_VM_IAB(OP_PUSHLIT, 2, 0xDE),