AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 汇编语言

V86模式切换程序

51自学网 2015-09-08 http://www.51zixue.net
386以上计算机从实模式进入虚拟86模式

源码:
.model small
.386p
.data
base_memory dd ?
new_base dd 0
new_base1 dd 0
.code
mov cs:psp_seg,ds
mov ax,seg base_memory
mov ds,ax
mov es,ax
mov ds,ax
int 12h
movzx eax,ax
shl eax,0ah
add eax,0fffh
and ax,0f000h
mov base_memory,eax ;eax
mov ah,88h
int 15h
add ax,400h
movzx eax,ax
shl eax,0ah
and ax,0f000h
mov bx,cs:psp_seg
mov es,bx
mov si,2ch
cmp bx,es:[si]
jb ignore
mov bx,es:[si]
ignore:
movzx ebx,bx
shl ebx,4
add ebx,0fffh
and bx,0f000h
mov ecx,base_memory ;ecx
sub ecx,ebx
sub eax,ecx
sub eax,010000h
mov new_base,eax
shr eax,4
mov new_base1,eax
call fill1_gdt
psp_seg dw ?
fill1_gdt proc near
movzx eax,ax
shl eax,4
mov ebx,eax
shr ebx,10h
add [si+2],ax
adc [si+4],bl
fill1_gdt endp
end

 

 

 
上一篇:FASTREBOOT V1.0  下一篇:自己用汇编语言写的一个病毒(源码)