summaryrefslogtreecommitdiff
path: root/DuetPkg/BootSector/start.S
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-20 08:22:04 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-20 08:22:04 +0000
commitccec4c39691f3e2bc3108ef82f744b278b59fda3 (patch)
tree1821798327a6f14124568495857ed96ff3e2721c /DuetPkg/BootSector/start.S
parent01f1138afeda57f67d783c0e29aafeb7ce6edda6 (diff)
downloadedk2-platforms-ccec4c39691f3e2bc3108ef82f744b278b59fda3.tar.xz
Port Intel .asm to GAS S
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7557 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/BootSector/start.S')
-rw-r--r--DuetPkg/BootSector/start.S12
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