Using arrays in asm
kenmac
Posts: 96
Hi folks,
What is the best method of storing/reading data in array elements in asm coding?
kenmac
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Perth, Western Australia
Time Zone = GMT + 8
What is the best method of storing/reading data in array elements in asm coding?
kenmac
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Perth, Western Australia
Time Zone = GMT + 8
Comments
if it's a nice power of two size, say 8x8 bytes for example
or if it's an easily obtainable size, ie not too many bits to make the value to multiply the Y by, eg 40
if it's a nice power of two size, say 8x8 words for example
or if it's an easily obtainable size, ie not too many bits to make the value to multiply the Y by, eg 40
otherwise you'll have to use a multiply
also, I've not put any boundary check in there, to keep the entries from getting data outside the array etc. but I'm sure you could add that yourself.
and for storing change rdbyte to wrbyte, etc. obviously copied into another routine so you don't change reading to storing [noparse]:D[/noparse]
hope this helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·