From cad0c8f9e2ed7b4852786529a4a00b5f8503b491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Rivi=C3=A8re?= Date: Mon, 22 Oct 2012 18:38:33 +0000 Subject: [PATCH] Converted jump to the OS into C. --- BaS_GNU/sources/BaS.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BaS_GNU/sources/BaS.c b/BaS_GNU/sources/BaS.c index db87f0d..6f08dea 100644 --- a/BaS_GNU/sources/BaS.c +++ b/BaS_GNU/sources/BaS.c @@ -171,5 +171,13 @@ void BaS(void) * and all the supervisor instructions are emulated. */ __asm__ __volatile__("move.w #0x0700,sr \n\t" : : : "memory"); } - __asm__ __volatile__("jmp 0xe00030 \n\t" : : : "memory"); + + /* Jump into the OS */ + typedef void void_func(void); + typedef struct { + void *initial_sp; + void_func *initial_pc; + } ROM_HEADER; + ROM_HEADER* os_header = (ROM_HEADER*)tos_base; + os_header->initial_pc(); }