From: Tormod Volden Date: Thu, 19 May 2016 21:19:16 +0000 (+0200) Subject: dragon-nx32: Move some crt0 parts to discard X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=26d3d7e58412d55ed4b18ab1530506ec85d3e792;p=FUZIX.git dragon-nx32: Move some crt0 parts to discard Also move init_early() and init_hardware() to discard Signed-off-by: Tormod Volden --- diff --git a/Kernel/platform-dragon-nx32/crt0.s b/Kernel/platform-dragon-nx32/crt0.s index 1ee3eca9..0186b31a 100644 --- a/Kernel/platform-dragon-nx32/crt0.s +++ b/Kernel/platform-dragon-nx32/crt0.s @@ -12,17 +12,16 @@ .area .start start: + orcc #0x10 ; interrupts definitely off + lds #kstack_top ; note we'll wipe the stack later ldb $80FD ; save from ROM space - ; text may be in memory bank 0 + ; text and discard may be in memory bank 0 jsr map_kernel - jmp main - - .area .text + jmp premain -main: orcc #0x10 ; interrupts definitely off - lds #kstack_top + .area .discard - clra +premain: clra ldx #__sectionbase_.udata__ udata_wipe: sta ,x+ cmpx #__sectionbase_.udata__+__sectionlen_.udata__ @@ -47,6 +46,10 @@ identified: sta _system_id ; what sort of a box are we ? jsr init_early jsr init_hardware - jsr _fuzix_main - orcc #0x10 + jmp main + + .area .text + +main jsr _fuzix_main + orcc #0x10 ; we should never get here stop: bra stop diff --git a/Kernel/platform-dragon-nx32/dragon.s b/Kernel/platform-dragon-nx32/dragon.s index 7fba7cce..f4dc9f51 100644 --- a/Kernel/platform-dragon-nx32/dragon.s +++ b/Kernel/platform-dragon-nx32/dragon.s @@ -61,8 +61,6 @@ _bufpool: _discard_size: .db __sectionlen_.discard__/BUFSIZE - .area .text - init_early: ldx #null_handler stx 1