feat: utilisation de la librarie math.lib pour l'usage des fonctions Randomize et random.
This commit is contained in:
parent
d1320a4772
commit
eb533335e6
|
@ -14,6 +14,7 @@ start:
|
||||||
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
||||||
|
|
||||||
realstart:
|
realstart:
|
||||||
|
call [cs:randomize]
|
||||||
push 0FFFFh
|
push 0FFFFh
|
||||||
pushd 652201
|
pushd 652201
|
||||||
pushd 1545454545
|
pushd 1545454545
|
||||||
|
@ -91,29 +92,13 @@ go4:
|
||||||
call [restorestate]
|
call [restorestate]
|
||||||
retf
|
retf
|
||||||
put:
|
put:
|
||||||
call random
|
call [cs:random]
|
||||||
mov di,dx
|
mov di,ax
|
||||||
and di,4096-2
|
and di,4096-2
|
||||||
mov si,offset fond
|
mov si,offset fond
|
||||||
call showstring2
|
call showstring2
|
||||||
ret
|
ret
|
||||||
random:
|
|
||||||
push ax
|
|
||||||
MOV AX,[cs:randseed]
|
|
||||||
MOV DX,8405h
|
|
||||||
MUL DX
|
|
||||||
INC AX
|
|
||||||
MOV [cs:randseed],AX
|
|
||||||
pop ax
|
|
||||||
ret
|
|
||||||
randseed dw 1234h
|
|
||||||
Randomize:
|
|
||||||
push ax cx dx
|
|
||||||
mov ah,0
|
|
||||||
int 1ah
|
|
||||||
mov [cs:randseed],dx
|
|
||||||
pop dx cx ax
|
|
||||||
ret
|
|
||||||
|
|
||||||
zero db 'Chaine a z‚ro terminal',0
|
zero db 'Chaine a z‚ro terminal',0
|
||||||
fixe db 20,'Chaine a taille fixe'
|
fixe db 20,'Chaine a taille fixe'
|
||||||
|
@ -156,6 +141,8 @@ strinaize4:
|
||||||
|
|
||||||
|
|
||||||
importing
|
importing
|
||||||
|
use MATH.LIB,randomize
|
||||||
|
use MATH.LIB,random
|
||||||
use VIDEO.LIB,print
|
use VIDEO.LIB,print
|
||||||
use VIDEO,xchgpages
|
use VIDEO,xchgpages
|
||||||
use VIDEO,setvideomode
|
use VIDEO,setvideomode
|
||||||
|
|
Loading…
Reference in New Issue