From 8d3b0303955086635593117357d304b7222001a4 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 10 Feb 2019 01:34:57 +0000 Subject: [PATCH] 8080: Fix and workarounds to get crt0 up and working --- Kernel/platform-v8080/crt0.s | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Kernel/platform-v8080/crt0.s b/Kernel/platform-v8080/crt0.s index 39138596..2535a518 100644 --- a/Kernel/platform-v8080/crt0.s +++ b/Kernel/platform-v8080/crt0.s @@ -19,11 +19,12 @@ init: call init_early + lxi h,commonend lxi d,commonstart call calcsize - lxi h,datastart + lxi h,bssstart lxi d,commonstart nextbyte: @@ -36,14 +37,15 @@ nextbyte: ora c jnz nextbyte - lxi h,bssstart - lxi d,datastart +! lxi h,bssend ! We should really do this but bssend + ! isnt appearing at the end so plan b + lxi h,commonstart ! Wipe all the free space + lxi d,bssstart call calcsize - lxi h,datastart - xra a + lxi h,bssstart wipe: - mov m,a + mvi m,0 inx h dcx b mov a,b @@ -51,6 +53,10 @@ wipe: jnz wipe call init_hardware + + mvi a,'E' + out 1 + call _fuzix_main di stop: hlt -- 2.34.1