Click to See Complete Forum and Search --> : sir i try more time


aliseek
March 31st, 2009, 09:10 AM
i try more time but i am enable to assemble this program please detail help me
thanks sir
Write a program in assembly language that calculates the sum of first five odd numbers (1, 3, 5, 7, 9) and stores the result in AX register.
You can do it with the help of loop (initialize AX register with value 0 and BX with value 1, and then on each iteration of loop add BX into AX and add value 2 in BX).
You are NOT allowed to define the data (like num1: dw 1, 3, 5, 7, 9)

rxbagain
March 31st, 2009, 10:45 AM
You mean you copy-pasted the thing I posted and you compiled it as is??? Of course it won't compile as I have told you it's just the guide and NOT the code.

Maybe you need to study more. Here's a good book The Art of Assembly Language Programming (http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html) and here is the intel instruction set (http://www3.itu.edu.tr/~kesgin/mul06/intel/index.html)

Post some of your codes when you get something and we will be willing to help you then.