Disclaimer: I have absolutely no experience with assembly programming, hence this question.
I want to write a program to traverse a matrix two ways, row-wise and column-wise, to demonstrate cache stuff for a presentation etc. The problem is, if I write it in C, gcc will rewrite my code to be row-wise no matter what I do. What's the assembly to force it to run column-wise?