Change 6809 EMAGIC to 7E (JMP extended)
authorTormod Volden <debian.tormod@gmail.com>
Fri, 27 Mar 2015 23:15:38 +0000 (00:15 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 28 Mar 2015 12:47:31 +0000 (12:47 +0000)
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 <debian.tormod@gmail.com>
Kernel/cpu-6809/cpu.h
Kernel/lowlevel-6809.s
Kernel/platform-dragon/p6809.s
Kernel/syscall_exec16.c

index de48ea1..7cb6f89 100644 (file)
@@ -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)
index da05b72..3b6ca0d 100644 (file)
@@ -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
index 3fe993a..1774662 100644 (file)
@@ -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
index f39d20f..7792113 100644 (file)
@@ -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