]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/start.S
Port Intel .asm to GAS S
[mirror_edk2.git] / DuetPkg / BootSector / start.S
index 9d066541081fc15ce620acb4a7605f1ba1676645..d558652a9ad9d7ff0608525acc0e9d1fb7ec8279 100644 (file)
 #*\r
 #------------------------------------------------------------------------------\r
 \r
+\r
+\r
+\r
+\r
                \r
 .equ                        FAT_DIRECTORY_ENTRY_SIZE, 0x020\r
 .equ                        FAT_DIRECTORY_ENTRY_SHIFT, 5\r
@@ -149,9 +153,9 @@ FatChainLoop:
         shrw    %ax                                 # FatOffset = ClusterNumber*3 / 2\r
         pushw   %si                                 # Save si\r
         movw    %ax, %si                            # si = FatOffset\r
-        shrw    %ax                                 # ax = FatOffset >> BLOCK_SHIFT\r
+        shrw    $BLOCK_SHIFT, %ax                   # ax = FatOffset >> BLOCK_SHIFT\r
         addw    ReservedSectors(%bp), %ax           # ax = FatSectorNumber = ReservedSectors + (FatOffset >> BLOCK_OFFSET)\r
-        andw    BLOCK_MASK,%si                      # si = FatOffset & BLOCK_MASK\r
+        andw    $BLOCK_MASK,%si                     # si = FatOffset & BLOCK_MASK\r
         cmpw    %dx, %ax                            # Compare FatSectorNumber to CachedFatSectorNumber\r
         je      SkipFatRead\r
         movw    $2, %bx\r
@@ -279,7 +283,7 @@ NotCrossing64KBoundry:
 DiskError: \r
         pushw %cs\r
         popw %ds\r
-        leaw %cs:ErrorString, %si\r
+        leaw ErrorString, %si\r
         movw $7, %cx\r
         jmp  PrintStringAndHalt\r
 \r
@@ -295,7 +299,7 @@ Halt:
 ErrorString: \r
         .byte 'S', 0x0c, 'E', 0x0c, 'r', 0x0c, 'r', 0x0c, 'o', 0x0c, 'r', 0x0c, '!',0x0c\r
 \r
-        #.org     0x0242 # For Code size overflow, Modified this just for pass build\r
+        .org     0x0241 # For Code size overflow, Modified this just for pass build\r
 LBAOffsetForBootSector: \r
         .long   0x0\r
 \r