diff --git a/README.md b/README.md index 248a560..8a14ff6 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,5 @@ $ make | t | type | ( n -- ) Print character | | j | jump | ( -- ) Unconditional branch. | | J | 0jump | ( a -- ) Jump if a == 0. | -| f | find | ( c -- ) Find CFA of word 'c' | +| f | find | ( c -- xt ) Get execution token of c | +| x | execute | ( xt -- ... ) Run the execution token | diff --git a/planck.xxd b/planck.xxd index 5515e86..b703f58 100644 --- a/planck.xxd +++ b/planck.xxd @@ -6,12 +6,12 @@ 00000028: 3400 2000 0100 0000 e_ehsize,e_phentsize,e_phnum,e_shentsize 00000030: 0000 0000 0100 0000 e_shnum,e_shstrndx, PT_LOAD 00000038: 0000 0000 0080 0408 p_offset,p_vaddr=0x08048000 -00000040: 0000 0000 f001 0000 p_paddr,p_filesz +00000040: 0000 0000 0002 0000 p_paddr,p_filesz 00000048: 0000 0008 0700 0000 p_memsz(128MB),PF_X|PF_W|PF_R 00000050: 0010 0000 0200 0000 p_align, -00000058: c081 0408 4881 0408 , (5c: key) -00000060: c881 0408 8880 0408 (60: find) (64: quit) -00000068: 8880 0408 0000 0000 (68: 0) (6c: 0) +00000058: f081 0408 4881 0408 , (5c: key) +00000060: c881 0408 f881 0408 (60: find) (64: execute) +00000068: 9881 0408 f0ff ffff (68: jump) (6c: -16) 00000070: be5c 8004 08bd 0080 (70: movl $interpreter,%esi) (75: movl $0x10048000,%ebp) 00000078: 0410 adff 2000 0000 (7a: next) @@ -56,3 +56,6 @@ 000001d8: 5904 6639 c374 048b cmpw %ax,%bx;je 2f;movl (%ecx),%ecx 000001e0: 09eb f483 c108 890c jmp 1b(-12);<2>addl $8,%ecx;movl %ecx,(%esp) 000001e8: 24ad ff20 0000 0000 next; + +000001f0: c081 0408 0178 0000 "x" execute +000001f8: fc81 0408 58ff 2000 popl %eax; jmp *(%eax)