Author Topic: Addintion of 2-D array  (Read 1760 times)

Offline Amir Rana

  • Jr. Member
  • *
  • Posts: 2
Addintion of 2-D array
« 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

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2361
  • Country: us
Re: Addintion of 2-D array
« Reply #1 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


Offline Amir Rana

  • Jr. Member
  • *
  • Posts: 2
Re: Addintion of 2-D array
« Reply #2 on: November 02, 2014, 02:56:33 PM »
thank you for concern, i have done it  :)