diff options
Diffstat (limited to 'DuetPkg/BootSector/start.S')
-rw-r--r-- | DuetPkg/BootSector/start.S | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/DuetPkg/BootSector/start.S b/DuetPkg/BootSector/start.S index 9d06654108..d558652a9a 100644 --- a/DuetPkg/BootSector/start.S +++ b/DuetPkg/BootSector/start.S @@ -15,6 +15,10 @@ #*
#------------------------------------------------------------------------------
+
+
+
+
.equ FAT_DIRECTORY_ENTRY_SIZE, 0x020
.equ FAT_DIRECTORY_ENTRY_SHIFT, 5
@@ -149,9 +153,9 @@ FatChainLoop: shrw %ax # FatOffset = ClusterNumber*3 / 2
pushw %si # Save si
movw %ax, %si # si = FatOffset
- shrw %ax # ax = FatOffset >> BLOCK_SHIFT
+ shrw $BLOCK_SHIFT, %ax # ax = FatOffset >> BLOCK_SHIFT
addw ReservedSectors(%bp), %ax # ax = FatSectorNumber = ReservedSectors + (FatOffset >> BLOCK_OFFSET)
- andw BLOCK_MASK,%si # si = FatOffset & BLOCK_MASK
+ andw $BLOCK_MASK,%si # si = FatOffset & BLOCK_MASK
cmpw %dx, %ax # Compare FatSectorNumber to CachedFatSectorNumber
je SkipFatRead
movw $2, %bx
@@ -279,7 +283,7 @@ NotCrossing64KBoundry: DiskError:
pushw %cs
popw %ds
- leaw %cs:ErrorString, %si
+ leaw ErrorString, %si
movw $7, %cx
jmp PrintStringAndHalt
@@ -295,7 +299,7 @@ Halt: ErrorString:
.byte 'S', 0x0c, 'E', 0x0c, 'r', 0x0c, 'r', 0x0c, 'o', 0x0c, 'r', 0x0c, '!',0x0c
- #.org 0x0242 # For Code size overflow, Modified this just for pass build
+ .org 0x0241 # For Code size overflow, Modified this just for pass build
LBAOffsetForBootSector:
.long 0x0
|