aboutsummaryrefslogtreecommitdiffstats
path: root/core/bootsect.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/bootsect.inc')
-rw-r--r--core/bootsect.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/bootsect.inc b/core/bootsect.inc
index 515f1f5e..67080907 100644
--- a/core/bootsect.inc
+++ b/core/bootsect.inc
@@ -156,6 +156,7 @@ replace_bootstrap:
mov ebx,trackbuf
imul di,ax,12
add di,bx ; DI <- end of list
+ push di
; Terminating entry...
lea eax,[di+12]
@@ -169,16 +170,20 @@ replace_bootstrap:
mov cx,replace_stub.len >> 2
rep movsd
+ xor eax,eax
+ pop cx ; ECX <- length of list
+
pop word [di+replace_stub.ss]
pop word [di+replace_stub.esp]
pop dword [di+replace_stub.csip]
- movzx edx,di ; "Safe area"
-
cli
mov ss,[di+replace_stub.ss]
mov esp,[di+replace_stub.esp]
+ mov edi,trackbuf
+ mov esi,edi
+
jmp shuffle_and_boot_raw
; This stub gets run after the shuffle, but not in-place.