2007-03-24 20:39:03 +01:00
|
|
|
|
model tiny,stdcall
|
|
|
|
|
p586N
|
|
|
|
|
locals
|
|
|
|
|
jumps
|
|
|
|
|
codeseg
|
|
|
|
|
option procalign:byte
|
2004-11-25 01:04:04 +01:00
|
|
|
|
|
2007-03-24 20:39:03 +01:00
|
|
|
|
include "..\include\mem.h"
|
|
|
|
|
include "..\include\divers.h"
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
2007-03-24 20:39:03 +01:00
|
|
|
|
org 0h
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
|
|
|
|
start:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
2004-11-25 01:04:04 +01:00
|
|
|
|
|
|
|
|
|
realstart:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
push 0FFFFh
|
|
|
|
|
pushd 652201
|
|
|
|
|
pushd 1545454545
|
|
|
|
|
push 1523
|
|
|
|
|
push 2041
|
|
|
|
|
push offset zero
|
|
|
|
|
push offset fixe
|
|
|
|
|
push 5
|
|
|
|
|
push 'i'
|
|
|
|
|
push 'a'
|
|
|
|
|
pushd 5041
|
|
|
|
|
pushd 125645
|
|
|
|
|
pushd 5041
|
|
|
|
|
pushd 125645
|
|
|
|
|
pushd 5041
|
|
|
|
|
pushd 125645
|
|
|
|
|
push offset message
|
|
|
|
|
call [print]
|
|
|
|
|
xor ax,ax
|
|
|
|
|
int 16h
|
|
|
|
|
call [clearscreen]
|
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [clearscreen]
|
|
|
|
|
mov cx,200
|
2004-06-12 23:34:04 +02:00
|
|
|
|
go1:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
call [print],offset textdemo1
|
|
|
|
|
call put
|
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
dec cx
|
|
|
|
|
jnz go1
|
|
|
|
|
mov cx,200
|
2004-06-12 23:34:04 +02:00
|
|
|
|
go2:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
call [print],offset textdemo2
|
|
|
|
|
call put
|
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
dec cx
|
|
|
|
|
jnz go2
|
|
|
|
|
mov cx,200
|
2004-06-12 23:34:04 +02:00
|
|
|
|
go3:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
call [print],offset textdemo3
|
|
|
|
|
call put
|
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
dec cx
|
|
|
|
|
jnz go3
|
2007-04-11 21:22:29 +02:00
|
|
|
|
call [clearscreen]
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [clearscreen]
|
|
|
|
|
call [print],offset texte2
|
|
|
|
|
mov bp,255
|
|
|
|
|
xor edx,edx
|
2004-06-12 23:34:04 +02:00
|
|
|
|
go4:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
inc edx
|
|
|
|
|
push edx
|
|
|
|
|
push offset texte3
|
|
|
|
|
call [print]
|
|
|
|
|
call [xchgpages]
|
|
|
|
|
call [waitretrace]
|
|
|
|
|
dec bp
|
|
|
|
|
jnz go4
|
|
|
|
|
push offset texte4
|
|
|
|
|
call [print]
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
call [restorestate]
|
|
|
|
|
retf
|
2004-06-12 23:34:04 +02:00
|
|
|
|
put:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
call random
|
|
|
|
|
mov di,dx
|
|
|
|
|
and di,4096-2
|
|
|
|
|
mov si,offset fond
|
|
|
|
|
call showstring2
|
|
|
|
|
ret
|
|
|
|
|
random:
|
|
|
|
|
push ax
|
|
|
|
|
MOV AX,[cs:randseed]
|
|
|
|
|
MOV DX,8405h
|
|
|
|
|
MUL DX
|
|
|
|
|
INC AX
|
|
|
|
|
MOV [cs:randseed],AX
|
|
|
|
|
pop ax
|
|
|
|
|
ret
|
2004-06-12 23:34:04 +02:00
|
|
|
|
randseed dw 1234h
|
|
|
|
|
Randomize:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
push ax cx dx
|
|
|
|
|
mov ah,0
|
|
|
|
|
int 1ah
|
|
|
|
|
mov [cs:randseed],dx
|
|
|
|
|
pop dx cx ax
|
|
|
|
|
ret
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
2004-11-25 01:04:04 +01:00
|
|
|
|
zero db 'Chaine a z<>ro terminal',0
|
|
|
|
|
fixe db 20,'Chaine a taille fixe'
|
2007-04-11 21:22:29 +02:00
|
|
|
|
message db "\s\m01\e\c07\h01D<31>monstration de la librairie VIDEO.LIB\l\l"
|
2004-11-25 01:04:04 +01:00
|
|
|
|
db "\c01Nombres entiers ou sign<67>s (%%u/%%i):\l%u\l%iD\l"
|
|
|
|
|
db "\c02Nombre hexad<61>cimaux (%%h):\l%hD\l%hW\l"
|
|
|
|
|
db "\c03Nombres Binaires (%%b):\l%bD\l%bB\l"
|
|
|
|
|
db "\c04Caracteres simples ou multiples (%%c/%%cM):\l%c\l%cM\l"
|
|
|
|
|
db "\c05Chaines a z<>ro terminal ou fixes (%%0/%%s):\l%s\l%0\l"
|
|
|
|
|
db "\c06Dates et heures (%%t/%%d):\l%t\l%d\l"
|
|
|
|
|
db "\c07Nombre a echelle automatique (%%z):\l%z\l%z\l"
|
|
|
|
|
db "\c08Attributs de fichiers (%%a):\l%a",0
|
|
|
|
|
|
|
|
|
|
fond db 16,'Ceci est un fond'
|
|
|
|
|
textdemo1 db '\c05Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling\l',0
|
|
|
|
|
textdemo2 db '\c07Vertical Vertical Vertical Vertical Vertical Vertical Vertical Vertical\l',0
|
|
|
|
|
textdemo3 db '\c09Rapide Rapide Rapide Rapide Rapide Rapide Rapide Rapide\l',0
|
|
|
|
|
texte1 db 'Echange rapide de pages Vid<69>o',0
|
|
|
|
|
texte2 db '\g04,13Routine d''affichage Ultra Rapide Agissant sur le Mat<61>riel'
|
|
|
|
|
db '\g04,14Possibilit<69> de r<>aliser des effets de superposition',0
|
|
|
|
|
texte3 db '\c04%bD\l',0
|
2007-04-11 21:22:29 +02:00
|
|
|
|
texte4 db '\g01,00Sauvegarde et restauration de l''ecran (\\s/\\r)',0
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
|
|
|
|
showstring2:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
push es bx cx si di
|
|
|
|
|
add di,4000
|
|
|
|
|
mov bx,0B800h
|
|
|
|
|
mov es,bx
|
|
|
|
|
mov bl,[si]
|
|
|
|
|
mov ch,3
|
2004-06-12 23:34:04 +02:00
|
|
|
|
strinaize4:
|
2007-03-24 20:39:03 +01:00
|
|
|
|
inc si
|
|
|
|
|
mov cl,[si]
|
|
|
|
|
mov [es:di],cx
|
|
|
|
|
add di,2
|
|
|
|
|
dec bl
|
|
|
|
|
jnz strinaize4
|
|
|
|
|
pop di si cx bx es
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
importing
|
|
|
|
|
use VIDEO.LIB,print
|
|
|
|
|
use VIDEO,xchgpages
|
|
|
|
|
use VIDEO,setvideomode
|
|
|
|
|
use VIDEO,clearscreen
|
|
|
|
|
use VIDEO,savestate
|
|
|
|
|
use VIDEO,restorestate
|
|
|
|
|
use VIDEO,waitretrace
|
|
|
|
|
endi
|