feat: suppression des fonctions de haut niveau et des fonctions obsolètes pour usage en appel stdcall

This commit is contained in:
Nicolas Hordé 2005-12-05 08:01:34 +00:00
parent d7c5923ca8
commit b552531179
1 changed files with 320 additions and 294 deletions

View File

@ -55,16 +55,16 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions
dw clearscreen dw clearscreen
dw setfont dw setfont
dw loadfont dw loadfont
dw nothings dw getfont
dw showline dw showline
dw showchar dw showchar
dw showpixel dw showpixel
dw getpixel dw getpixel
dw setxyg
dw nothings
dw nothings
dw nothings
dw nothings dw nothings
dw setstyle
dw getstyle
dw enablecursor
dw disablecursor
dw nothings dw nothings
dw nothings dw nothings
dw nothings dw nothings
@ -75,14 +75,14 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions
dw getcolor dw getcolor
dw scrolldown dw scrolldown
dw getxy dw getxy
dw setxy2 dw setxy
dw savescreen dw savescreen
dw restorescreen dw restorescreen
dw page2to1 dw page2to1
dw page1to2 dw page1to2
dw xchgPages dw xchgPages
dw savepage1
dw nothings dw nothings
dw waithretrace
dw waitretrace dw waitretrace
dw getvgainfos dw getvgainfos
dw nothings dw nothings
@ -191,29 +191,48 @@ mode9 DB 0E7H, 00H, 03H,01H,0FH,00H,06H
DB 00H,01H,02H,03H,04h,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH,0EH,0FH DB 00H,01H,02H,03H,04h,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH,0EH,0FH
DB 41H,00H,0FH,00H,00H DB 41H,00H,0FH,00H,00H
DB 50,75 DB 50,75
;640*480 16 couleurs
mode10 DB 0E3H
DB 00H
DB 03H,01H,0FH,00H,06H
DB 5FH,4FH,50H,82H,53H,9FH,0BH,3EH,00H,40H,00H,00H,00H,00H,00H,00H,0E9H,8BH,0DFH,28H,00H,0E7H,04H,0E3H,0FFH
DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH
DB 00H,01H,02H,03H,04H,05H,06H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH,01H,00H,0FH,00H,00H
DB 80,60
;800*600 16 couleurs
mode11 DB 0E7H
DB 00H
DB 03H,01H,0FH,00H,06H
DB 70H,63H,64H,92H,65H,82H,70H,0F0H,00H,60H,00H,00H,00H,00H,00H,00H,5BH,8CH,57H,32H,00H,58H,70H,0E3H,0FFH
DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH
DB 00H,01H,02H,03H,04H,05H,06H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH,01H,00H,0FH,00H,00H
DB 100,75
DATABLOCKSIZE equ 40 DATABLOCKSIZE equ 40
DATABLOCK equ $ DATABLOCK equ $
;============================================DATABLOCK========================================================= ;============================================DATABLOCK=========================================================
lines db 0 lines db 0
columns db 0 columns db 0
x db 0 x db 0
y db 0 y db 0
xy dw 0 xy dw 0
colors db 7 colors db 7
mode db 0FFh mode db 0FFh
pagesize dw 0 pagesize dw 0
pages db 0 style db 0
font db 0 font db 0
graphic db 0 graphic db 0
xg dw 0 reserved1 dw 0
yg dw 0 reserved2 dw 0
style dw 0 reserved3 dw 0
nbpage db 0 nbpage db 0
pagesshowed db 0 color db 0
plane db 0 cursor db 0
xyg dw 0 segments dw 0
linesize dw 0 linesize dw 0
adress dw 0 adress dw 0
base dw 0 base dw 0
scrolling db 1 scrolling db 1
@ -227,8 +246,8 @@ graphics equ 03CEh
statut equ 03DAh statut equ 03DAh
maxfunc equ 39h maxfunc equ 39h
maxmode equ 9 maxmode equ 11
planesize equ 64000 planesize equ 65000
;============================================Fonctions de l'int VIDEO=========================================== ;============================================Fonctions de l'int VIDEO===========================================
;message d'erreur specifiant que les interruptions n'existent plus ;message d'erreur specifiant que les interruptions n'existent plus
@ -267,6 +286,69 @@ DisableScroll:
mov cs:scrolling,0 mov cs:scrolling,0
ret ret
;=============ENABLECURSOR (Fonction 013)=========
;Autorise le dfilement
;-> AH=42
;<-
;=====================================================
EnableCursor:
push ax dx
mov cs:cursor,1
mov dx,CCRT
mov al,0Ah
out dx,al
inc dx
in al,dx
and al,11011111b
mov ah,al
dec dx
mov al,0Ah
out dx,ax
mov bh,cs:x
mov bl,cs:y
call setxy
pop dx ax
ret
;=============DISABLECURSOR (Fonction 14)=========
;Dsactive le dfilement
;-> AH=43
;<-
;=====================================================
DisableCursor:
push ax dx
mov cs:cursor,0
mov dx,CCRT
mov al,0Ah
out dx,al
inc dx
in al,dx
or al,00100000b
mov ah,al
dec dx
mov al,0Ah
out dx,ax
pop dx ax
ret
;==========SETSTYLE (Fonction 11)=========
;Change le style du texte a CL
;-> AH=x ,CX style
;<-
;=========================================
setstyle:
mov cs:style,cl
ret
;==========GETSTYLE (Fonction 12)=========
;Récupère le style du texte dans CL
;-> AH=x
;<- CX style
;=========================================
getstyle:
mov cl,cs:style
ret
;==========SHOWCHAR (Fonction 07h)=========== ;==========SHOWCHAR (Fonction 07h)===========
;met un caractère de code ASCII DL aprés le curseur ;met un caractère de code ASCII DL aprés le curseur
;-> AH=7, DL code ASCII du caractère ;-> AH=7, DL code ASCII du caractère
@ -287,16 +369,16 @@ showchar:
;================================================= ;=================================================
setvideomode: setvideomode:
push ax cx dx di push ax cx dx di
cmp al,maxmode cmp al,maxmode
ja errorsetvideomode ja errorsetvideomode
cmp cs:mode,5h cmp cs:mode,5h
jb nographic jb nographic
cmp al,5h cmp al,5h
jae nographic jae nographic
call initvideo call initvideo
nographic: nographic:
cmp cs:mode,0FFh cmp cs:mode,0FFh
jne noinit jne noinit
call initvideo call initvideo
noinit: noinit:
mov cs:mode,al mov cs:mode,al
@ -310,7 +392,7 @@ noinit:
inc di inc di
mov dx,statut mov dx,statut
mov al,cs:[di] mov al,cs:[di]
out dx,al out dx,al
inc di inc di
mov dx,sequencer mov dx,sequencer
xor ax,ax xor ax,ax
@ -323,7 +405,7 @@ initsequencer:
jbe initsequencer jbe initsequencer
mov ax,0E11h mov ax,0E11h
mov dx,ccrt mov dx,ccrt
out dx,ax out dx,ax
xor ax,ax xor ax,ax
initcrt: initcrt:
mov ah,cs:[di] mov ah,cs:[di]
@ -332,7 +414,7 @@ initcrt:
inc di inc di
cmp al,24 cmp al,24
jbe initcrt jbe initcrt
mov dx,graphics mov dx,graphics
xor ax,ax xor ax,ax
initgraphic: initgraphic:
mov ah,cs:[di] mov ah,cs:[di]
@ -342,7 +424,7 @@ initgraphic:
cmp al,8 cmp al,8
jbe initgraphic jbe initgraphic
mov dx,statut mov dx,statut
in al,dx in al,dx
mov dx,attribs mov dx,attribs
xor ax,ax xor ax,ax
initattribs: initattribs:
@ -365,27 +447,43 @@ initattribs:
mov ah,cs:[di+1] mov ah,cs:[di+1]
mov cs:lines,ah mov cs:lines,ah
mul ah mul ah
shl ax,1 mov cl,cs:[di-5]
cmp cs:mode,5 and cl,01000000b
setae cs:graphic cmp cl,0
jb istext je colors16
shl ax,3 mov cs:color,8
mov cl,4
jmp colors256
colors16:
mov cs:color,4
mov cl,3
colors256:
cmp cs:mode,5
setae cs:graphic
jb istext
shl ax,cl
mov cs:segments,0A000h
jmp wasgraph
istext: istext:
mov cs:segments,0B800h
shl ax,1
wasgraph:
mov cs:pagesize,ax mov cs:pagesize,ax
mov ax,planesize mov ax,planesize
xor dx,dx xor dx,dx
div cs:pagesize div cs:pagesize
mov cs:nbpage,al mov cs:nbpage,al
mov al,cs:[di-36] mov al,cs:[di-36]
xor ah,ah xor ah,ah
shl ax,2 shl ax,2
mov cl,cs:graphic mov cl,cs:graphic
shr ax,cl shr ax,cl
mov cs:linesize,ax mov cs:linesize,ax
mov ax,cs:[di-43] mov ax,cs:[di-43]
mov cs:adress,ax mov cs:adress,ax
mov cs:base,ax mov cs:base,ax
mov cs:pages,0 mov cs:cursor,1
mov cs:style,0
pop di dx cx ax pop di dx cx ax
ret ret
errorsetvideomode: errorsetvideomode:
@ -394,9 +492,7 @@ errorsetvideomode:
initvideo: initvideo:
push bx cx si ds push bx cx si ds
;xor bx,bx call clearscreen
;mov ds,bx
;lds si,ds:[43h*4]
push cs push cs
pop ds pop ds
mov si,offset font8x8 mov si,offset font8x8
@ -407,8 +503,6 @@ initvideo:
mov cl,16 mov cl,16
mov bl,0 mov bl,0
call loadfont call loadfont
mov cs:pagesize,64000
call clearscreen
pop ds si cx bx pop ds si cx bx
ret ret
@ -424,52 +518,55 @@ getvideomode:
;=============CLEARSCREEN (Fonction 02h)========= ;=============CLEARSCREEN (Fonction 02h)=========
;Efface l'ecran graphique ou texte ;Efface l'ecran graphique ou texte
;-> AH=2 ;-> AH=2
;<- ;<-
;================================================ ;================================================
clearscreen: clearscreen:
push eax cx dx di es push eax cx dx di es
mov cx,cs:pagesize mov cx,planesize
mov di,cs:adress mov di,cs:adress
shr cx,2 shr cx,2
cmp byte ptr cs:graphic,1 cmp cs:graphic,1
jne erasetext jne erasetext
mov ax,0A000h mov ax,0A000h
mov es,ax mov es,ax
erasegraph: erasegraph:
mov ah,0 mov ax,0F02h
gogot: mov dx,sequencer
push ax cx out dx,ax
mov cl,ah mov ax,0205h
mov ah,1 mov dx,graphics
shl ah,cl out dx,ax
mov al,2 mov ax,0003h
mov dx,sequencer out dx,ax
out dx,ax mov ax,0FF08h
pop cx ax out dx,ax
push si di cx eax
mov eax,00000000h mov eax,00000000h
cld
rep stosd rep stosd
pop eax cx di si mov ax,0005h
inc ah cmp cs:color,4
cmp ah,3 je not256
jbe gogot mov ax,4005h
jmp enderase not256:
mov dx,graphics
out dx,ax
mov ax,0003h
out dx,ax
jmp endoferase
erasetext: erasetext:
mov ax,0B800h mov ax,0B800h
mov es,ax mov es,ax
mov eax,07200720h mov eax,07200720h
cld cld
rep stosd rep stosd
enderase:
mov cs:x,0 endoferase:
mov cs:y,0 xor bx,bx
mov cs:xg,0 call setxy
mov cs:yg,0
mov cs:xy,0
mov cs:xyg,0
mov cs:plane,0
pop es di dx cx eax pop es di dx cx eax
ret ret
;=============SetFont (Fonction 03h)========= ;=============SetFont (Fonction 03h)=========
@ -496,7 +593,7 @@ errorsetfont:
pop dx cx ax pop dx cx ax
ret ret
;=============GetFont (Fonction 0xh)========= ;=============GetFont (Fonction 05h)=========
;Récupère le n° de la font active ;Récupère le n° de la font active
;-> AH=x ;-> AH=x
;<- CL n° font, Carry if error ;<- CL n° font, Carry if error
@ -587,7 +684,7 @@ doseqs:
inc di inc di
cmp di,6 cmp di,6
jbe doseqs jbe doseqs
mov dx,graphics mov dx,graphics
doseqs2: doseqs2:
mov ax,cs:[di+offset reg2] mov ax,cs:[di+offset reg2]
out dx,ax out dx,ax
@ -622,14 +719,14 @@ showline:
jne scro jne scro
dec bl dec bl
mov cx,1 mov cx,1
cmp byte ptr cs:graphic,0 cmp cs:graphic,0
je okscro je okscro
mov cx,8 mov cx,8
okscro: okscro:
call scrolldown call scrolldown
scro: scro:
inc bl inc bl
call setxy2 call setxy
pop cx bx pop cx bx
ret ret
@ -650,30 +747,12 @@ setcolor:
getcolor: getcolor:
mov cl,cs:colors mov cl,cs:colors
ret ret
;==========SETSTYLE (Fonction xh)=========
;Change le style du texte a CL
;-> AH=x ,CX style
;<-
;=========================================
setstyle:
mov cs:style,CX
ret
;==========GETSTYLE (Fonction xh)=========
;Récupère le style du texte dans CL
;-> AH=x
;<- CX style
;=========================================
getstyle:
mov cx,cs:style
ret
;==========SCROLLDOWN (Fonction 17h)========= ;==========SCROLLDOWN (Fonction 17h)=========
;defile de cx lines vers le bas ;defile de cx lines vers le bas
;-> AH=23, CX lines à défiler vers le bas ;-> AH=23, CX lines à défiler vers le bas
;<- ;<-
;============================= ;=============================
scrolldown: scrolldown:
push ax cx dx si di ds es push ax cx dx si di ds es
cmp cs:scrolling,0 cmp cs:scrolling,0
@ -685,33 +764,30 @@ scrolldown:
sub cx,si sub cx,si
mov di,cs:adress mov di,cs:adress
cld cld
cmp byte ptr cs:graphic,1 cmp byte ptr cs:graphic,1
jne textp jne textp
mov ax,0A000h mov ax,0A000h
mov es,ax mov es,ax
mov ds,ax mov ds,ax
shr cx,2 mov ax,0F02h
transfert: mov dx,sequencer
mov ah,0 out dx,ax
gogo: mov ax,0105h
push ax cx mov dx,graphics
mov cl,ah out dx,ax
mov ah,1 cld
shl ah,cl rep movsb
mov al,2 mov ax,0005h
mov dx,sequencer cmp cs:color,4
out dx,ax je not256ok
pop cx ax mov ax,4005h
mov al,4 not256ok:
mov dx,graphics mov dx,graphics
out dx,ax out dx,ax
push si di cx mov ax,0003h
rep movsd out dx,ax
pop cx di si jmp graphp
inc ah
cmp ah,3
jbe gogo
jmp graphp
textp: textp:
mov ax,0B800h mov ax,0B800h
mov es,ax mov es,ax
@ -719,7 +795,7 @@ textp:
rep movsb rep movsb
graphp: graphp:
pop es ds di si dx cx ax pop es ds di si dx cx ax
ret ret
;==========GETXY (Fonction 18h)========= ;==========GETXY (Fonction 18h)=========
;Change les coordonnées du curseur a X:BH,Y:BL ;Change les coordonnées du curseur a X:BH,Y:BL
@ -737,21 +813,7 @@ getxy:
;<- ;<-
;===================================== ;=====================================
setxy: setxy:
push ax bx cx dx push ax bx dx di
; xor ax,ax
; int 16h
; mov cl,cs:lines
; dec cl
; sub cl,bl
; neg cl
; js zero
; xor ch,ch
; inc cl
; jmp nozero
;zero:
; mov cx,0
;nozero:
; call scrolldown
mov cs:x,bh mov cs:x,bh
mov cs:y,bl mov cs:y,bl
mov al,bl mov al,bl
@ -763,56 +825,8 @@ setxy:
add di,ax add di,ax
shl di,1 shl di,1
mov cs:xy,di mov cs:xy,di
cmp byte ptr cs:graphic,1 call setcursor
jne oktext pop di dx bx ax
mov bl,cs:x
mov cl,cs:y
xor bh,bh
xor ch,ch
shl bx,3
shl cx,3
call setxyg
jmp endofsetxy
oktext:
mov ax,0B800h
mov es,ax
call setcursor
endofsetxy:
pop dx cx bx ax
ret
setxy2:
push es di
call setxy
pop di es
ret
;==========SETXYG (Fonction 0Ah)=========
;Change les coordonnées du curseur graphique a X:BX,Y:CX
;-> AH=x, BX coordonnées x, CX coordonnées y
;<- ES:DI pointeur sur pixel avec plan de bit ajusté
;======================================
setxyg:
push ax bx cx dx
mov cs:xg,bx
mov cs:yg,cx
mov ax,cx
mov cl,bl
mul cs:linesize
shr bx,2
add ax,bx
mov di,ax
and cl,3
mov ah,1
shl ah,cl
mov al,2
mov dx, 3c4h
out dx,ax
mov cs:plane,cl
mov cs:xyg,di
mov ax,0A000h
mov es,ax
pop dx cx bx ax
ret ret
;==========SHOWPIXEL (Fonction 08h)========= ;==========SHOWPIXEL (Fonction 08h)=========
@ -821,52 +835,82 @@ setxyg:
;<- ;<-
;========================================= ;=========================================
showpixel: showpixel:
push ax bx cx dx di bp es push ax bx cx dx si di es
mov bp,ax cmp cs:color,4
mov ax,cx je showpixel4
mov cl,bl mov si,ax
mul cs:linesize mov ax,cx
shr bx,2 mov cl,bl
add ax,bx mul cs:linesize
mov di,ax shr bx,2
add di,cs:adress add ax,bx
and cl,3 mov di,ax
mov ah,1 add di,cs:adress
shl ah,cl and cl,3
mov al,2 mov ah,1
mov dx,sequencer shl ah,cl
out dx,ax mov al,2
mov bx,0A000h mov dx,sequencer
mov es,bx out dx,ax
mov ax,bp mov bx,0A000h
mov es:[di],al mov es,bx
pop es bp di dx cx bx ax mov ax,si
mov es:[di],al
jmp endofshow
showpixel4:
mov dx,ax
mov ax,cx
mov ch,dl
mov cl,bl
mul cs:linesize
shr bx,3
add ax,bx
mov di,ax
add di,cs:adress
and cl,111b
xor cl,111b
mov ah,1
shl ah,cl
mov al,8
mov dx,graphics ;masque
out dx,ax
mov ax,0205h
out dx,ax
mov ax,0003h
out dx,ax
mov bx,0A000h
mov es,bx
mov al,es:[di]
mov es:[di],ch
endofshow:
pop es di si dx cx bx ax
ret ret
;==========SHOWPIXEL (Fonction 09h)========= ;==========GETPIXEL (Fonction 09h)=========
;Récupère en al la couleur du pixel de coordonnées X:BX,Y:CX ;Récupère en al la couleur du pixel de coordonnées X:BX,Y:CX
;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur ;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur
;<- ;<-
;========================================= ;=========================================
getpixel: getpixel:
push ax bx cx dx di bp es push ax bx cx dx di bp es
mov bp,ax mov bp,ax
mov ax,cx mov ax,cx
mov cl,bl mov cl,bl
mul cs:linesize mul cs:linesize
shr bx,2 shr bx,2
add ax,bx add ax,bx
mov di,ax mov di,ax
add di,cs:adress add di,cs:adress
and cl,3 and cl,3
mov ah,cl mov ah,cl
mov al,4 mov al,4
mov dx,graphics mov dx,graphics
out dx,ax out dx,ax
mov bx,0A000h mov bx,0A000h
mov es,bx mov es,bx
mov ax,bp mov ax,bp
mov al,es:[di] mov al,es:[di]
pop es bp di dx cx bx ax pop es bp di dx cx bx ax
ret ret
@ -901,6 +945,21 @@ waitr:
jz waitr jz waitr
pop dx ax pop dx ax
ret ret
;==========WAITHRETRACE (Fonction 0xh)=========
;Synchronisation avec la retrace horizontale
;<- AH=x
;->
;=============================================
waithretrace:
push ax dx
mov dx,3DAh
waitr2:
in al,dx
test al,1
jz waitr2
pop dx ax
ret
;Renvoie le caractère sur le curseur en dl ;Renvoie le caractère sur le curseur en dl
getchar: getchar:
@ -915,7 +974,7 @@ getchar:
;Ecrit le caractère ASCII CL attribut CH aprés le curseur, en le mettant à jours ;Ecrit le caractère ASCII CL attribut CH aprés le curseur, en le mettant à jours
charout: charout:
push ax bx cx dx di es push ax bx cx dx di es
cmp byte ptr cs:graphic,1 cmp cs:graphic,1
jne textaccess jne textaccess
call emulatechar call emulatechar
jmp adjusttext jmp adjusttext
@ -927,9 +986,9 @@ textaccess:
add cs:xy,2 add cs:xy,2
adjusttext: adjusttext:
inc cs:x inc cs:x
mov cl,cs:columns mov cl,cs:columns
cmp cs:x,cl cmp cs:x,cl
jb noadjusted jb noadjusted
call showline call showline
noadjusted: noadjusted:
call setcursor call setcursor
@ -937,7 +996,9 @@ noadjusted:
ret ret
setcursor: setcursor:
push ax cx dx push ax cx dx
cmp cs:cursor,1
jne notshow
mov dx,CCRT mov dx,CCRT
mov al,0Eh mov al,0Eh
mov cx,cs:xy mov cx,cs:xy
@ -947,52 +1008,51 @@ setcursor:
mov ah,cl mov ah,cl
inc al inc al
out dx,ax out dx,ax
pop dx cx ax notshow:
pop dx cx ax
ret ret
;Ecrit le caractère ASCII CL attribut CH aprés le curseur graphique, en le mettant à jours en mode graphique ;Ecrit le caractère ASCII CL attribut CH aprés le curseur graphique, en le mettant à jours en mode graphique
emulatechar: emulatechar:
push ax bx cx dx di push ax bx cx dx di
mov dx,cx mov al,ch
mov di,dx mov di,cx
and di,11111111b and di,11111111b
shl di,3 shl di,3
add di,offset font8x8 add di,offset font8x8
xor bx,bx mov bl,cs:x
xor cx,cx mov cl,cs:y
xor bh,bh
xor ch,ch
shl bx,3
shl cx,3
mov ah,cs:[di] mov ah,cs:[di]
xor dx,dx
bouclet: bouclet:
mov al,dh rol ah,1
rol ah,1 push ax
jc colored jc colored
shr al,4 shr al,4
bt word ptr cs:style,0 cmp cs:style,0
jc transparent jnz transparent
colored: colored:
and al,1111b and al,1111b
push bx cx
add cx,cs:yg
add bx,cs:xg
call showpixel call showpixel
pop cx bx
transparent: transparent:
pop ax
inc bx inc bx
cmp bx,8 inc dl
cmp dl,8
jb bouclet jb bouclet
xor bx,bx
inc di inc di
mov ah,cs:[di] mov ah,cs:[di]
xor dl,dl
sub bx,8
inc cx inc cx
cmp cx,8 inc dh
cmp dh,8
jb bouclet jb bouclet
add cs:xg,8
mov cx,cs:linesize
shl cx,2
cmp cs:xg,cx
jb ended
mov cs:xg,0
add cs:yg,8
ended: ended:
pop di dx cx bx ax pop di dx cx bx ax
ret ret
@ -1061,43 +1121,7 @@ Restoreparamfrom:
rep movsb rep movsb
pop es di si ecx pop es di si ecx
ret ret
;sauve la page1 dans un bloc de mémoire
Savepage1:
push ax cx dx si di bp ds es gs
mov bp,sp
mov dx,ss:[bp+22]
mov ah,2
mov cx,cs:pagesize
push cs
pop ds
mov si,offset data4
int 49h
mov ah,6
int 49h
push gs
pop es
xor di,di
call Savepage1to
pop gs es ds bp di si dx cx ax
ret
data4 db '/vgapage1',0
;===================================sauve l'ecran rapidement================
Savepage1to:
push ecx si di ds
mov cx,0B800H
mov ds,cx
xor ecx,ecx
mov cx,cs:pagesize
shr cx,2
mov si,cs:pagesize
cld
rep movsd
pop ds di si ecx
ret
;RcupŠre l'ecran de la carte depuis son bloc mémoire ;RcupŠre l'ecran de la carte depuis son bloc mémoire
RestoreScreen: RestoreScreen:
push ax dx si bp ds gs push ax dx si bp ds gs
@ -1199,6 +1223,8 @@ int 49h
pop gs es ds bp di si dx cx ax pop gs es ds bp di si dx cx ax
ret ret
data4 db '/vgatemp',0
;Sauve l'tat de la carte dans un bloc mémoire ;Sauve l'tat de la carte dans un bloc mémoire
savestate: savestate: