[org 0x0100]
num: db 0
factorial: dw 1
VUID: db 1,8,2,1,9,3,6
mov bx, 0
jmp start
fact: mov ax, byte[num]
fact_loop: mul word[factorial]
sub ax, 1
cmp ax, 0
jp 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
组装后:
as02.asm: 10: error: mismatch in operand sizes