From b88eec64404c0fea615229e97bb18ec6ee7b492b Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 28 Dec 2020 22:42:06 +0900 Subject: [PATCH] Allocate data area --- planck.xxd | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/planck.xxd b/planck.xxd index 1ac4168..7a7aa56 100644 --- a/planck.xxd +++ b/planck.xxd @@ -1,12 +1,20 @@ 00000000: 7f45 4c46 0101 0100 # planckforth - 00000008: 0000 0000 0000 0000 # Copyright (C) 2020 nineties 00000010: 0200 0300 0100 0000 ET_EXEC,EM_386,EV_CURRENT -00000018: 5480 0408 3400 0000 e_entry=0x08048054,e_phoff= +00000018: 7080 0408 3400 0000 e_entry=0x08048070,e_phoff= 00000020: 0000 0000 0000 0000 e_shoff,e_flags 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 6000 0000 p_paddr,p_filesz +00000040: 0000 0000 7c00 0000 p_paddr,p_filesz 00000048: 0000 0008 0700 0000 p_memsz(128MB),PF_X|PF_W|PF_R -00000050: 0010 0000 bb00 0000 p_align, (54: mov ebx, 0) -00000058: 00b8 0100 0000 cd80 (59: mov eax, 1) (5e: int 0x80) +00000050: 0010 0000 0000 0000 p_align, (54: here) +00000058: 0000 0000 0000 0000 (58: latest) (5c: key) +00000060: 0000 0000 0000 0000 (60: find) (64: execute) +00000068: 0000 0000 f0ff ffff (68: jump) (6c: -16) +00000070: bb00 0000 00b8 0100 (70: mov ebx,0) (75: mov eax,SYS_EXIT) +00000078: 0000 cd80 (7a: int 0x80) + +Note: +For simplicity, I place all data and programs in a single memory area +from address 0x08048000.