feat: ajout de la librairie math.lib qui contiendra les fonctionnalités mathématiques de base

This commit is contained in:
Nicolas Hordé 2007-04-18 07:43:02 +00:00
parent cb57000850
commit d1320a4772
2 changed files with 39 additions and 1 deletions

View File

@ -1,7 +1,7 @@
asm= lzasm /z/t
lnk= elink
all: detect.lib video.lib str0.lib bmp.lib graphic.lib 3d.lib
all: detect.lib video.lib str0.lib bmp.lib graphic.lib 3d.lib math.lib
.asm.obj:
$(asm) $<

38
lib/math.asm Normal file
View File

@ -0,0 +1,38 @@
model tiny,stdcall
p586
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
org 0h
header exe <"CE",1,0,0,offset exports,,,>
exporting
declare random
declare randomize
ende
randseed dw 1234h
PROC random FAR
USES dx
mov ax,[cs:randseed]
mov dx,8405h
mul dx
inc ax
mov [cs:randseed],ax
mov ax,dx
ret
endp random
PROC randomize FAR
USES ax,cx,dx
mov ah,0
int 1ah
mov [cs:randseed],dx
ret
endp randomize