From 5943622131b3cbaf2a909dd3acbf6fad4f3ca25d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 8 Mar 2015 21:16:32 +0000 Subject: [PATCH] zx128: Add syscall entry point This needs some further thought. If we are going to support relocatable binaries we will need some way to fix up the syscall entry point on them. --- Kernel/platform-zx128/zx128.s | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Kernel/platform-zx128/zx128.s b/Kernel/platform-zx128/zx128.s index d7297c48..6ea88fe5 100644 --- a/Kernel/platform-zx128/zx128.s +++ b/Kernel/platform-zx128/zx128.s @@ -10,6 +10,7 @@ .globl _program_vectors .globl platform_interrupt_all .globl interrupt_handler + .globl unix_syscall_entry .globl map_kernel .globl map_process @@ -159,9 +160,12 @@ setvectors: ld a, #0x18 ld (0xffff), a ; JR (plus ROM at 0 gives JR $FFF4) ld a, #0xC3 ; JP - ld (0xFFF4), a + ld (0xFFF4), a ; FFF4-6 are the interrupt vector + ld (0xFFF7), a ; FFF7-9 are syscall ld hl, #interrupt_handler ld (0xFFF5), hl ; to IRQ handler + ld hl, #unix_syscall_entry + ld (0xFFF8), hl ; system calls (can't use RST on this box) call map_restore ret -- 2.34.1