]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/bs16.S
Remove 'BASETOOLS_DIR' variable. We assume basetools are in the PATH
[mirror_edk2.git] / DuetPkg / BootSector / bs16.S
index b2ade2c734c176afa14d7ac3c1ac714f613b6861..57e7904129aa768fd82b850cae9e73bbebc98e0e 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, 0x036315244    # "DR16"\r
 .equ                      LOADER_FILENAME_PART3, 0x020202036    # "6___"\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\r
 LBAOffsetForBootSector: \r
   .long     0x0\r
 \r
@@ -281,7 +283,7 @@ LBAOffsetForBootSector:
 # Sector Signature\r
 # ****************************************************************************\r
 \r
-  # .org 0x01fe # Comment it for pass build. Should optimise code size. \r
+  .org 0x01fe\r
 SectorSignature: \r
   .word     0xaa55      # Boot Sector Signature\r
 \r