Posted by andrewm1973: Sun. Apr 22, 2018 - 06:55 PM
1
2
3
4
5
Total votes: 0
El Tangas,
Thanks or the suggestion. I can live with the push pop. I was grumbling about it, but it was not the actual question I asked. That was a derailment and its my own fault as I should learn to ignore posts of negative usefulness.
The original question was if there is a more elegant way to get the compiler to access two sequential elements of an array with compile time maths (adding to the displacement).
I worked out a kludgy way but I would like to know if there is a better way. This is about self improvement and me trying to make myself a better C programmer.
Sprinter, Sparrow, Skeeve, Joey, Westf and several others have been very helpful in the past. As I have learnt more things from them I have had to resort to ASM less often in the games/projects I am doing.
El Tangas,
Thanks or the suggestion. I can live with the push pop. I was grumbling about it, but it was not the actual question I asked. That was a derailment and its my own fault as I should learn to ignore posts of negative usefulness.
The original question was if there is a more elegant way to get the compiler to access two sequential elements of an array with compile time maths (adding to the displacement).
I worked out a kludgy way but I would like to know if there is a better way. This is about self improvement and me trying to make myself a better C programmer.
Sprinter, Sparrow, Skeeve, Joey, Westf and several others have been very helpful in the past. As I have learnt more things from them I have had to resort to ASM less often in the games/projects I am doing.
- Log in or register to post comments
TopOk, I see the problem. I don't think I have a better solution, maybe I would just write it differently:
- Log in or register to post comments
TopLogical pairs of 1-byte variables can be placed in a struct without too much kludginess.
With macros and gcc's ({...}) mechanism
one could define a syntax without too much user pain.
Iluvatar is the better part of Valar.
- Log in or register to post comments
TopPages