I have tested your code and get a reboot on all my pc's with your code, but by adding the code line "mov ds,ax" it works on all my pc,does it fix it on your's ?.
[code]
org 0x7C00 ; Expecting to be loaded at 7C00 by BIOS
bits 16
real:
cli
xor ax, ax
mov ds, ax ;<--- IT WORK WITH THIS IN
mov ss, ax
mov sp, 0x7C00 ; Temp stack just under myself
call real_open_A20 ; For 32 bit address space
call real_init_gdt ; Load GDTR
mov eax, cr0
or al, 0x1 ; cr0 |= PE
mov cr0, eax
; If I place 'jmp $' here all computers stop here normally
jmp 0x10: protected
real_open_A20:
.l1: in al, 0x64
test al, 0x2
jnz .l1
mov al, 0xD1
out 0x64, al
.l2: in al, 0x64
test al, 0x2
jnz .l2
mov al, 0xDF
out 0x60, al
ret
real_init_gdt:
lgdt [.gdtr]
ret
.gdt0 dw 0x0000, 0x0000, 0x0000, 0x0000
.data dw 0xFFFF, 0x0000, 0x9200, 0x00CF
.code dw 0xFFFF, 0x0000, 0x9800, 0x00CF
.gdtr dw $ - .gdt0 - 1
dd .gdt0
bits 32
protected:
; Wherever I place 'jmp $' after the 'protected' label,
; on some computers I get reboot to hell.
; (In that case CS:IP is never points to 'jmp $'
; - something happens before)
mov ax, 0x8
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 0x7C00
mov byte [gs:0xB8000],'T' ; <-- added this to test pmode
jmp $
times 512 - 2 - ($ - $$) db 0 ; Fill the rest of sector
dw 0xAA55 ; Bootable sector sign
times 1474560 - ($ - $$) db 0 ; Fill the rest of floppy
[/code]
Hope this help's
ASHLEY4.