zx128: Fix stacking of arguments on switchin/switchout
authorAlan Cox <alan@linux.intel.com>
Sun, 8 Mar 2015 19:27:24 +0000 (19:27 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 8 Mar 2015 19:27:24 +0000 (19:27 +0000)
With this fixed we can get to the point of trying to load init properly

Kernel/platform-zx128/tricks.s

index 92ba343..d08f1ad 100644 (file)
@@ -72,9 +72,10 @@ _switchout:
         ; find another process to run (may select this one again)
        push af
         call _getproc
-       pop af
+       pop af          ; tidy this stack stuff up ex (sp), hl ??
 
         push hl
+       push af
         call _switchin
 
         ; we should never get here
@@ -140,6 +141,7 @@ _switchin:
        ;       Is our low data in 0x8000 already or do we need to flip
        ;       it with bank 6
 
+       inc hl                  ; get our low bank (2nd entry)
        ld a, (low_bank)
        cp (hl)
        call nz, fliplow
@@ -360,6 +362,7 @@ bankfork_1:
 ;      have the IM2 vectors
 ;
 fliplow:
+       ret                     ; FIXME
        exx
        ld hl, #0x8000
        ld de, #0xc000