2-dimensional DW array access without MULs?



I'm still trying to teach myself, so forgive me for getting something
wrong... I'm trying to optimize something for 8088 that is fairly MUL
heavy, and I thought a good way to do that was, for one particular
operation, precalculate a table and then just do (x,y) lookups into the
table. Only problem is, I can't figure out to do this without a MUL to
get to the right row/column in the array.

The only thing I can think of is to make my word array's column size
aligned by a power of 2 so that I can use shifts to get to the right
(x,y)... Or, if my word array is 128 columns or less I could use
something like "mov bh,y; shl bh,1; mov bl,x, mov result,[offset
myarray+bx]"... Is this the right line of thinking?

I'm just curious how people usually work with 2-dimensional arrays that
are not byte arrays, or have dimensions not aligned to a power of 2, or
over 64K, preferably with examples... Is LEA usually used for this? I
checked a few resouces but most of them list the different addressing
modes but not provide example usage (although I confess I haven't
checked Hyde's book yet).

Thanks in advance for any advice!

.



Relevant Pages

  • Re: Find value in array
    ... Raising any number to the power of 0 results in a value of 1, ... also array entered ... MAX/ROW formula gives a blank whereas INDEX/MATCH ... I guess INDEX and header row issue ...
    (microsoft.public.excel.worksheet.functions)
  • Re: IOCTL_POWER_XXX method calls
    ... certainly declare them unsafe as a Char*, ... might even work, since they're just string pointers, not embedded strings ... has two power states, A/C power running at full speed, and off. ... // in the managed array of bytes. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Asus P5QL Pro Nightmare
    ... should change is the setting of the SATA Hard disk. ... a row, but if I wait a few hours after shutting down, then I can reboot ... and as soon as I try to create the array with the ... You can speed up that reboot problem by discharging the power to ...
    (Ubuntu)
  • Re: Find value in array
    ... Raising any number to the power of 0 results in a value of 1, ... Entered as an array using the key combination of CTRL,SHIFT,ENTER: ... MAX/ROW formula gives a blank whereas INDEX/MATCH ... I guess INDEX and header row issue ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Asus P5QL Pro Nightmare
    ... a row, but if I wait a few hours after shutting down, then I can reboot ... and as soon as I try to create the array with the ... raid array at all. ... You can speed up that reboot problem by discharging the power to ...
    (Ubuntu)