cos2000v1/lib/math.asm

33 lines
420 B
NASM
Raw Normal View History

2019-07-13 20:49:22 +02:00
use16
align 1
include "..\include\mem.h"
org 0h
header exe 1,exports,0,0,0
2019-07-13 20:49:22 +02:00
exporting
declare random
declare randomize
ende
randseed dw 1234h
proc random uses dx
mov ax,[cs:randseed]
mov dx,8405h
mul dx
inc ax
mov [cs:randseed],ax
mov ax,dx
ret
2019-07-13 20:49:22 +02:00
endp
proc randomize uses ax cx dx
mov ah,0
int 1ah
mov [cs:randseed],dx
ret
2019-07-13 20:49:22 +02:00
endp