From: Tormod Volden Date: Fri, 27 Mar 2015 23:15:38 +0000 (+0100) Subject: Change 6809 EMAGIC to 7E (JMP extended) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e351ceb496e8a597652dc06f0ced22253d603f9d;p=FUZIX.git Change 6809 EMAGIC to 7E (JMP extended) 0E is JMP direct page, so 7E is easier to use. Also change it in the not-finished zero trap. Signed-off-by: Tormod Volden --- diff --git a/Kernel/cpu-6809/cpu.h b/Kernel/cpu-6809/cpu.h index de48ea16..7cb6f89b 100644 --- a/Kernel/cpu-6809/cpu.h +++ b/Kernel/cpu-6809/cpu.h @@ -18,7 +18,7 @@ extern void ei(void); extern irqflags_t di(void); extern void irqrestore(irqflags_t f); -#define EMAGIC 0x0E /* Header of executable (JMP) */ +#define EMAGIC 0x7E /* Header of executable (JMP) */ #define EMAGIC_2 0x20 /* BRA */ /* Allow a minimum of 512 bytes gap between stack and top of allocations */ #define brk_limit() (udata.u_syscall_sp - 512) diff --git a/Kernel/lowlevel-6809.s b/Kernel/lowlevel-6809.s index da05b725..3b6ca0d0 100644 --- a/Kernel/lowlevel-6809.s +++ b/Kernel/lowlevel-6809.s @@ -265,10 +265,10 @@ interrupt_handler: bne in_kernel ; we're not in kernel mode, check for signals and fault - cmpa #0x0E ; JMP at 0 + cmpa #0x7E ; JMP at 0 beq nofault jsr map_process_always ; map the process - lda #0x0E ; put it back + lda #0x7E ; put it back sta 0 ; write jsr map_kernel ; restore the map ldx #11 ; SIGSEGV diff --git a/Kernel/platform-dragon/p6809.s b/Kernel/platform-dragon/p6809.s index 3fe993ad..1774662d 100644 --- a/Kernel/platform-dragon/p6809.s +++ b/Kernel/platform-dragon/p6809.s @@ -114,7 +114,7 @@ init_hardware: _program_vectors: pshs cc orcc #0x10 - lda #0x0E + lda #0x7E sta 0 ; NULL pointer trap ; FIXME: add a target address for NULL execution ldd #0xFFD5 diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index f39d20fa..77921130 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -66,7 +66,7 @@ char *envp[]; 0xC3 xx xx - Z80 with 0x100 entry 0x4C xx xx - 6502 - 0x0E xx xx - 6809 + 0x7E xx xx - 6809 followed by a base page for the executable