NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: Amir Rana on November 02, 2014, 10:18:51 AM

Title: Addintion of 2-D array
Post by: Amir Rana on November 02, 2014, 10:18:51 AM
Calculates the sum of each row and stores the summed result of each row at the last index of each row

num1: dw 10, 20, 30, 0, ; Physical address must be mentioned here
         dw 40, 50, 10, 0, ; Physical address must be mentioned here
         dw 20, 30, 40, 0, ; Physical address must be mentioned here
         dw 50, 10, 20, 0 ; Physical address must be mentioned here
Title: Re: Addintion of 2-D array
Post by: Frank Kotler on November 02, 2014, 12:23:35 PM
I'm not sure I understand the question, if there is one. :)

You've defined an array of words. Now you want to add up the first three words in each row and store that sum in the fourth word, right? Then the comment says "Physical address must be mentioned here." Would you settle for a virtual address? Does "mentioned" mean you want to print it? I don't understand the purpose of that part.

What OS is this for? What part(s) of it do you know how to do? What part(s) are you having trouble with? Show us what you've got!

Best,
Frank

Title: Re: Addintion of 2-D array
Post by: Amir Rana on November 02, 2014, 02:56:33 PM
thank you for concern, i have done it  :)