8080fixedbank: fix switching bugs
authorAlan Cox <alan@linux.intel.com>
Tue, 12 Feb 2019 21:02:11 +0000 (21:02 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 12 Feb 2019 21:02:11 +0000 (21:02 +0000)
Kernel/lib/8080fixedbank-core.s

index 549e1ff..94321ea 100644 (file)
@@ -30,6 +30,7 @@ _platform_switchout:
        push h
        lhld .areg
        push h
+       lxi h,0
        dad sp
        shld U_DATA__U_SP       ! Save the sp for a switch in
        call map_process_always_di
@@ -165,10 +166,10 @@ skip_copyback:
        !       probably we do need to save block1-block3 (12 bytes)
        !
        pop h
-       shld .areg
-       pop h
        mov l,a
-       sta .tmp1
+       sta .areg
+       pop h
+       shld .tmp1
        pop h
        shld .bcreg
        pop h