Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 0x7C00
- startboot:
- cli
- xor ax,ax
- mov ds,ax
- mov es,ax
- mov ss,ax
- mov sp,0x7C00
- sti
- jmp 0x7E00
- ;-------------------------------------------------
- finish: times 0x1FE-finish+startboot db 0
- db 0x55,0xAA
- ;-------------------------------------------------
- ;+++++++++++++++++++++++++++++++++++++++++++++++++
- ;-------------------------------------------------
- org 0x7E00
- jmp start_system
- ;-------------------------------------------------
- GDT dd 0x7E10
- dw 31;32? ..16
- ; 24 9 L ype
- GDT0 dq 0;adr_31GDXU_p_1PDPS_t_A_adres_23...0...........predel_15...0...
- GDT1 dq 0000000011001111000111000000000000000000000000001111111111111111b ;kod
- GDT2 dq 0000000011001111000101000000000000000000000000001111111111111111b ;dan
- GDT3 dq 0000000011000000000101000000000010110011100110011011011110011001b ;stk
- ;-------------------------------------------------
- start_system:
- mov ax,0x4F02
- mov bx,0x4118
- int 0x10
- cli
- lgdt [GDT]
- mov eax,cr0
- or al,1
- mov cr0,eax
- jmp 0x8:con
- con:
- vs:
- jmp vs
- ;-------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment