Skip to content

Instantly share code, notes, and snippets.

@letoh
Created May 12, 2012 07:23
Show Gist options
  • Save letoh/2664940 to your computer and use it in GitHub Desktop.
Save letoh/2664940 to your computer and use it in GitHub Desktop.
void vm_exec_xt(vm_t *vm, xt_t *xt)
{
...
CODE(PLUS):
/* ( n1|u1 n2|u2 -- n3|u3 ) */
ds->cells[ds->pos-2] += ds->cells[--ds->pos];
ENDCODE;
...
BOOT:
dict_addword(vm->dict, "+", 0, (xt_t)&&CODE(PLUS));
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment