Re: Read N from keybord. Double even numbers. Using LOOP instruction
- From: "Wolfgang Kern" <kesys@xxxxxxxxx>
- Date: Mon, 26 Feb 2007 04:23:37 +0100
"aeter" wrote:
Hello im new to this group and new to assembly langage.
i have a simple question how can i double even number?
WHAT is a "double even number" ? (babel-fish translated?)
Reminds me on the "field of the wheel-calulation" [r^2*PI] :)
As this may be a 'home-exercise' quest:
Look at your codeflow and tell yourself 'when' it's finished.
And where is the result to be found.
What I see you may perhaps mean:
x=fn[sum(n+(n+2))] |n=1..10 interval=2
(but infinitus sanctus is around yet)
___________
add ebx,1
and
inc ebx
do almost the same thing (INC wont alter carry-flag)
___________
Looks like MASM ?
Why PROC ? there is not a single stack operation in the code.
__
wolfgang
my code so far:
INCLUDE Irvine32.inc
.code
main PROC ; Label for the start of the main program
mov edx, 0
mov ebx, 1
mov ecx, 10 ;loop can be excuted 10 times
label1:
add edx, ebx
add ebx, 1
inc ebx
jmp label1
loop label1
exit
main ENDP
END main
thanks
.
- References:
- Prev by Date: Re: Universal Kernel Debugger
- Next by Date: Re: Read N from keybord. Double even numbers. Using LOOP instruction
- Previous by thread: Read N from keybord. Double even numbers. Using LOOP instruction
- Next by thread: Re: Read N from keybord. Double even numbers. Using LOOP instruction
- Index(es):
Relevant Pages
|