?? pm1.bak
字號(hào):
.386P
descr struc
limit dw 0
base_l dw 0
base_m db 0
attr_l db 0
attr_2 db 0
base_h db 0
descr ends
data segment
gdt_null descr <0,0,0,0,0,0>
gdt_data descr <data_size-1,0,0,92h>
gdt_code descr <code_size-1,,,98h>
gdt_stack descr <255,0,0,92h>
gdt_screen descr <4095,8000h,0Bh,92h,0,0>
gdt_size=$-gdt_null
pdescr dq 0
sym db 1
attr db 1Eh
mes db 27,'[31;42m Back To Real Mode! ',27,'[0m$'
data_size=$-gdt_null
data ends
text segment 'code' use16
assume cs:text,ds:data
main proc
xor eax,eax
mov ax,data
mov ds,ax
shl eax,4
mov ebp,eax
lea bx,gdt_data; mov bx,offset gdt_data
mov [bx].base_l,ax
rol eax,16
mov [bx].base_m,al
xor eax,eax
mov ax,cs
shl eax,4
lea bx,gdt_code ;mov bx,offset gdt_code
mov [bx].base_l,ax
rol eax,16
mov [bx].base_m,al
xor eax,eax
mov ax,ss
shl eax,4
lea bx,gdt_stack ;mov bx,offset gdt_stack
mov [bx].base_l,ax
rol eax,16
mov [bx].base_m,al
mov dword ptr pdescr+2,ebp
mov word ptr pdescr,gdt_size-1
lgdt pdescr
cli
mov al,80h
out 70h,al
mov eax,cr0
or eax,1
mov cr0,eax
db 0EAh
dw offset continue
dw 16
continue: mov ax,8
mov ds,ax
mov ax,24
mov ss,ax
mov ax,32
mov es,ax
mov bx,800
mov cx,640
mov ax,word ptr sym
screen: mov es:[bx],ax
add bx,2
inc ax
loop screen
mov gdt_data.limit,0FFFFh
mov gdt_code.limit,0FFFFh
mov gdt_stack.limit,0FFFFh
mov gdt_screen.limit,0FFFFh
mov ax,8
mov ds,ax
mov ax,24
mov ss,ax
mov ax,32
mov es,ax
db 0EAh
dw offset go
dw 16
go: mov eax,cr0
and eax,0FFFFFFFEh
mov cr0,eax
db 0EAh
dw offset return
dw text
return: mov ax,data
mov ds,ax
mov ax,stk
mov ss,ax
sti
mov al,0
out 70h,al
mov ah,09h
lea dx,mes
int 21h
mov ax,4c00h
int 21h
main endp
code_size=$-main
text ends
stk segment stack 'stack'
db 256 dup ('^')
stk ends
end main
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -