汇编源代码之图形显示方式屏幕的保存和恢复
2009-01-28 09:37:10 来源:WEB开发网核心提示:mov al,video_modeor al,80hint 10hmov ah,1call vga_basejmp short rs_mode31rs_mode3:call restore_vramrs_mode31:push cspop espush cspop dsmov ax,1c02h ;恢复视频状态mov b
mov al,video_mode
or al,80h
int 10h
mov ah,1
call vga_base
jmp short rs_mode31
rs_mode3:
call restore_vram
rs_mode31:
push cs
pop es
push cs
pop ds
mov ax,1c02h ;恢复视频状态
mov bx,offset video_buffer
mov cx,7
int 10h
test flag,10000000b
jz rs_no_mouse
mov ax,17h ;恢复鼠标状态
mov dx,offset mouse_buffer
int 33h
rs_no_mouse:
ret
rs_mode7:
mov ax,7 ;显示模式 7 恢复
int 10h
push 0b000h
pop es
call restore_vram1
jmp short rs_mode31
RESTORE_SCR ENDP
更多精彩
赞助商链接