diff --git a/src/sys/boot/bootsec.asm b/src/sys/boot/bootsec.asm index c2bb571..2216680 100755 --- a/src/sys/boot/bootsec.asm +++ b/src/sys/boot/bootsec.asm @@ -43,14 +43,14 @@ out 0x60, al lgdt [gdtinfo] ;Load GDT mov ecx, CR0 ;Switch to protected mode - inc cx + or ecx, 1 ; set PE bit mov CR0, ecx mov ax, flat_data-gdt_table ; Selector for 4Gb data seg mov ds, ax ; {2} Extend limit for ds mov es, ax ; Extend limit for es mov fs, ax ; fs and... mov gs, ax ; gs - dec cx ; switch back to real mode + dec ecx ; switch back to real mode mov CR0, ecx sti xor ax, ax @@ -99,8 +99,8 @@ mov cx,[0x600+2ch] sectionloop: - dec cx ; Next section - push cx ; Save cx on the stack while we load + dec ecx ; Next section + push ecx ; Save cx on the stack while we load ; the section into memory mov bx, 0x600 ; access image location @@ -151,8 +151,8 @@ ;call zero_memblock ; Zero the rest of the section nextsect: - pop cx ; Restore our section count - or cx,cx ; Was this the last one ? + pop ecx ; Restore our section count + or ecx,ecx ; Was this the last one ? jnz sectionloop