]> git.dujemihanovic.xyz Git - nameless-os.git/commitdiff
x86: mbr: Copy by dword during relocation
authorDuje Mihanović <duje.mihanovic@skole.hr>
Tue, 22 Aug 2023 21:23:19 +0000 (23:23 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Tue, 22 Aug 2023 21:23:19 +0000 (23:23 +0200)
boot/x86/mbr.s

index b5d01c94f6ea86ccffd0752714db580280b6abce..5319f4b54dfdd772ca503bf50cb0c4f111995073 100644 (file)
@@ -15,10 +15,10 @@ _start:
 
        ; perform self-relocation
        cld
-       mov si, 0x7c00
-       mov di, 0x600
-       mov cx, 0x100 ; 256 words = 512 bytes
-       rep movsw
+       mov esi, 0x7c00
+       mov edi, 0x600
+       mov ecx, 0x80 ; 128 dwords = 512 bytes
+       rep movsd
        ; some BIOSes may set CS to 0x7c0, work around that
        jmp 0:real_start
 real_start: