Browse Source

Revert "Move stack to below 0x7c00; leaving it at the default location"

This reverts commit 03ca71c38d.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
00473f0952
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      src/arch/i386/prefix/dskprefix.S

+ 3
- 5
src/arch/i386/prefix/dskprefix.S View File

31
 
31
 
32
 	jmp	$BOOTSEG, $go		/* reload cs:ip to match relocation addr */
32
 	jmp	$BOOTSEG, $go		/* reload cs:ip to match relocation addr */
33
 go: 
33
 go: 
34
-	xorw	%ax,%ax			/* put stack at 0000:7c00 */
35
-	movw	%ax,%ss
36
-	movw	$0x7c00,%sp
37
-
38
 	movw	$0x2000-12, %di		/* 0x2000 is arbitrary value >= length */
34
 	movw	$0x2000-12, %di		/* 0x2000 is arbitrary value >= length */
39
 					/* of bootsect + room for stack + 12 for */
35
 					/* of bootsect + room for stack + 12 for */
40
 					/* saved disk parm block */
36
 					/* saved disk parm block */
42
 	movw	$BOOTSEG, %ax
38
 	movw	$BOOTSEG, %ax
43
 	movw	%ax,%ds
39
 	movw	%ax,%ds
44
 	movw	%ax,%es
40
 	movw	%ax,%es
41
+	movw	%ax,%ss			/* put stack at BOOTSEG:0x4000-12. */
42
+	movw	%di,%sp
45
 
43
 
46
 /* Many BIOS's default disk parameter tables will not recognize multi-sector
44
 /* Many BIOS's default disk parameter tables will not recognize multi-sector
47
  * reads beyond the maximum sector number specified in the default diskette
45
  * reads beyond the maximum sector number specified in the default diskette
52
  * will set the maximum sector count to 36 - the most we will encounter on an
50
  * will set the maximum sector count to 36 - the most we will encounter on an
53
  * ED 2.88.  High doesn't hurt.	Low does.
51
  * ED 2.88.  High doesn't hurt.	Low does.
54
  *
52
  *
55
- * Segments are as follows: ds=es=cs - BOOTSEG
53
+ * Segments are as follows: ds=es=ss=cs - BOOTSEG
56
  */
54
  */
57
 
55
 
58
 	xorw	%cx,%cx
56
 	xorw	%cx,%cx

Loading…
Cancel
Save