[org 0x0100]
num: db 0
factorial: dw 1
VUID: db 1,2,3,4,5,6,7,8
mov bx,0
jmp start
fact: mov ax, byte[num]
fact_loop: mul word[factorial]
sub ax,1
cmp ax,0
jg fact_loop
ret
start: mov bx,0
mov cx,[VUID+bx]
add bx,1
shr cx,1
jc start
mov [num],cx
call fact
mov ax, 0x4c00
int 0x21
VIRTUAL_2 -3 Newbie Poster
rproffitt 2,662 "Nothing to see here." Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.