From e9b3edaed09157db1cb8b02db489acb713c1779d Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Tue, 29 Dec 2020 16:17:00 +0900 Subject: [PATCH] Add "r" and "R" --- README.md | 2 ++ planck.xxd | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ab91aa..53fcefb 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,5 @@ $ cat helloworld.fs | ./plank | $ | cstore | ( c addr -- ) | Store byte to addr | | d | dfetch | ( -- addr ) | Get data stack pointer | | D | dstore | ( addr -- ) | Set data stack pointer | +| r | rfetch | ( -- addr ) | Get return stack pointer | +| R | rstore | ( addr -- ) | Set return stack pointer | diff --git a/planck.xxd b/planck.xxd index 406ed88..bf3e105 100644 --- a/planck.xxd +++ b/planck.xxd @@ -6,10 +6,10 @@ 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 9002 0000 p_paddr,p_filesz +00000040: 0000 0000 b002 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: 7882 0408 4881 0408 , (5c: key) +00000058: a082 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) @@ -84,3 +84,9 @@ 00000278: 6082 0408 0144 0000 D: dstore 00000280: 8482 0408 5889 c4ad popl %eax; movl %eax,%esp; next; 00000288: ff20 0000 0000 0000 + +00000290: 7882 0408 0172 0000 r: rfetch +00000298: 9c82 0408 55ad ff20 pushl %ebp; next; + +000002a0: 9082 0408 0152 0000 R: rstore +000002a8: ac82 0408 5dad ff20 popl %ebp; next;