📄 vesagraphics.inc
字号:
;=========================================================;
; VesaGraphics 11/12/03 ;
;---------------------------------------------------------;
; DOS EXTREME OS V0.01 ;
; by Craig Bamford. ;
; ;
; Vesa Graphics functions for uses in programs. ;
;=========================================================;
;----------------------------------------------------;
; PutBmp ;put a bmp pic on screen ;
;----------------------------------------------------;
PutBmp:
cmp [ModeInfo_BitsPerPixel],24
jne Try32bits
call PutBmp24
jmp wehavedone1
Try32bits:
cmp [ModeInfo_BitsPerPixel],32
jne wehavedone1
call PutBmp32
wehavedone1:
ret
;'''''''''''''''''''''''''''''''''''''''''''''''''''';
; PutBmp32 ; puts a 32bit bmp to screen ;
;----------------------------------------------------;
; ;
; Input: ;
; ;
; ;
; Output: ;
; ;
;....................................................;
PutBmp32:
mov ax,linear_sel
mov es,ax
xor edi,edi
mov edi,[ModeInfo_PhysBasePtr]
mov esi,0x200000
add esi,640*3*479
add esi,ebx
newln32:
push esi
push edi
mov ecx,640
cld
cli
lets_do_a_loop1:
movsd
dec esi
loop lets_do_a_loop1
sti
pop edi
pop esi
sub esi,640*3
add edi,640*4
cmp esi,0x200000
jge newln32
ret
;'''''''''''''''''''''''''''''''''''''''''''''''''''';
; PutBmp24 ; puts a 24bit bmp to screen ;
;----------------------------------------------------;
; ;
; Input: ;
; ;
; ;
; Output: ;
; ;
;....................................................;
PutBmp24:
mov ax,linear_sel
mov es,ax
xor edi,edi
mov edi,[ModeInfo_PhysBasePtr]
mov esi,0x200000
add esi,640*3*479
add esi,ebx
newln24:
push esi
push edi
mov ecx,480
cld
cli
rep movsd
sti
pop edi
pop esi
sub esi,640*3
add edi,640*3
cmp esi,0x200000
jge newln24
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -