问题描述
我很好奇,如果创建新对象会删除所有附加的侦听器。 这是简单的代码:
org 0x7c00
bits 16
mov ax,HELLO_MSG ;Print a simple hello message :D
call _printString
xor ax,ax
;Here,we'll load the kernel into RAM
call LoadKernel
;Enter protected mode
call EnterProtMode
EnterProtMode:
cli ;disable interrupts
lgdt [gdt_pointer] ;Load the GDT register with the start address of the GDT
mov eax,cr0
or al,1 ;Set PE (protection enable) bit in CR0
mov cr0,eax
jmp 08h:Stage2 ;Jump to stage 2
LoadKernel:
mov bx,KERNEL_OFFSET ;Load the kernel offset into bx
mov dh,16 ;Load 16 sectors
mov dl,[BOOT_DRIVE] ;The disk to read from
call diskload ;Load the kernel
ret
bits 32
KERNEL_OFFSET equ 0x1000
BOOT_DRIVE: db 0
Stage2:
mov ax,DATA_SEG
mov ds,ax
mov es,ax
mov fs,ax
mov gs,ax
mov ss,ax
mov ebp,0x90000
mov esp,ebp
;Kernel entry here
jmp KERNEL_OFFSET ;Call the kernel finally
%include 'boot/printUtils.asm'
%include 'boot/gdt.asm'
%include 'boot/diskload.asm'
HELLO_MSG: db "Booted successfully,loading kernel.",0
times 510 - ($ - $$) db 0
dw 0xaa55
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)