asm
From: cherry (chanels2_at_excite.com)
Date: 03/14/04
- Next message: Frank Kotler: "Re: asm"
- Previous message: hutch--: "Re: Software Protection and Anti Crack code"
- Next in thread: Frank Kotler: "Re: asm"
- Reply: Frank Kotler: "Re: asm"
- Reply: Randall Hyde: "Re: asm"
- Reply: Jeff: "Re: asm"
- Reply: Jeff: "Re: asm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 14 Mar 2004 08:56:09 +0000 (UTC)
I am a newbie in assembly..I am working on a project for my assembly
class and I can't figure out why my code will not compute the function
of (n * fact)(n-1)..I am computing the factorial for the numbers 1-10
and I can't get it to work..I have tried everything..Any suggestions
that anyone can make I greatly appreciate...This is a hard language to
understand...Below is my code that I have used to calculate my
factorial...
mov ebx,eax
mul eax
cmp eax,1
jnz else
else:
mul ebx
dec ebx
I have also tried:
MOV ebx, eax ; ebx=3
DEC ebx ; ebx=2
JZ ; not zero, no jump
MUL ebx ; eax=3*2=6
JMP ; loop back
DEC ebx ; ebx=1
JZ ; not zero, no jump
MUL ebx ; eax=6*1=6
JMP ; loop back
DEC ebx ; ebx=0
JZ ; zero, jump out
Nothing works.please help....Thanks in advance to anyone who takes a
look at this..
- Next message: Frank Kotler: "Re: asm"
- Previous message: hutch--: "Re: Software Protection and Anti Crack code"
- Next in thread: Frank Kotler: "Re: asm"
- Reply: Frank Kotler: "Re: asm"
- Reply: Randall Hyde: "Re: asm"
- Reply: Jeff: "Re: asm"
- Reply: Jeff: "Re: asm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|