From: Martin K. <mar...@gm...> - 2007-07-26 06:05:46
|
hi i just came across some very strange behaviour of the nasm compiler take a look at this piece of code: BITS 16 ;some 16-Bit code cli lgdt [gdt_desc] mov eax, cr0 ;Enable or eax, 1 ;protected mov cr0, eax ;mode jmp 20h:enter_32 ;where 20h is selector for this very segment BITS 32 enter_32: hlt if i execute this, the screen completely blanks upon the jump to enter_32 now if i leave out the line "BITS 32" (i.e. if i compile for 16 BITS), the screen stays as it is! is there a sensible explanation for this?? |