]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/bootsect.S
Remove exit from batch file
[mirror_edk2.git] / DuetPkg / BootSector / bootsect.S
index edf941bcb36175e6d0af0047ea1b1c3191d48411..62f50aca4945f0cc5a80505db20768a13d569531 100644 (file)
@@ -18,7 +18,7 @@
         #.MODEL small\r
         .stack: \r
         .486p: \r
-        .code\r
+        .code16\r
 \r
 .equ                      FAT_DIRECTORY_ENTRY_SIZE, 0x020\r
 .equ                      FAT_DIRECTORY_ENTRY_SHIFT, 5\r
@@ -30,7 +30,9 @@
 .equ                      LOADER_FILENAME_PART2, 0x020205244    # "DR__"\r
 .equ                      LOADER_FILENAME_PART3, 0x020202020    # "____"\r
 \r
-        .org 0x0\r
+        .org 0x0
+.global _start
+_start:\r
 Ia32Jump: \r
   jmp   BootSectorEntryPoint  # JMP inst                  - 3 bytes\r
   nop\r
@@ -63,7 +65,7 @@ BootSectorEntryPoint:
 # ****************************************************************************\r
 # Start Print\r
 # ****************************************************************************\r
-  leaw %cs:StartString, %si\r
+  movw $StartString, %si\r
   call PrintString\r
 \r
 # ****************************************************************************\r
@@ -259,7 +261,7 @@ NotFoundAll:
   jne  FoundEFILDR\r
 BadBootSector: \r
 DiskError: \r
-  leaw %cs:ErrorString, %si\r
+  movw $ErrorString, %si\r
   call PrintString\r
 Halt: \r
   jmp   Halt\r
@@ -273,7 +275,7 @@ ErrorString:
 # LBA Offset for BootSector, need patched by tool for HD boot.\r
 # ****************************************************************************\r
 \r
-  .org 0x01fa   # Comment it for pass build. Should optimise code size. \r
+  .org 0x01fa   # Comment it for pass build. Should optimise code size. \r
 LBAOffsetForBootSector: \r
   .long     0x0\r
 \r
@@ -281,7 +283,7 @@ LBAOffsetForBootSector:
 # Sector Signature\r
 # ****************************************************************************\r
 \r
-  .org 0x01fe    # Comment it for pass build.\r
+  .org 0x01fe    # Comment it for pass build.\r
 SectorSignature: \r
   .word     0xaa55      # Boot Sector Signature\r
 \r