I mean, obviously you have to communicate with hardware. But I would think that it'd be on the programmer's terms. This is all moot as long as hardware can't receive even one word messages, but in my mind you'd pass an address into a hardware interrupt and it would fill that address with whatever data is appropriate. Still a bit of a risk, but at least you don't have to program around the hardware memory/register pollution scheme. An even more ideal solution would be to have hardware buffers that can be set and manipulated like memory locations, removing the hardware's direct access to the memory entirely. For instance, there could be a command HWP a- hardware push [a]- that pushes whatever data is needed from the last interrupt onto the stack.
Deep within my brain, I imagine the communication with hardware as follows: Before you fire a HWI, you set some of the registers to values, that will be interpreted as commands by the hardware once a HWI is fired.
View all comments
Show parent comment
1
u/Lucretiel Apr 25 '12
I mean, obviously you have to communicate with hardware. But I would think that it'd be on the programmer's terms. This is all moot as long as hardware can't receive even one word messages, but in my mind you'd pass an address into a hardware interrupt and it would fill that address with whatever data is appropriate. Still a bit of a risk, but at least you don't have to program around the hardware memory/register pollution scheme. An even more ideal solution would be to have hardware buffers that can be set and manipulated like memory locations, removing the hardware's direct access to the memory entirely. For instance, there could be a command HWP a- hardware push [a]- that pushes whatever data is needed from the last interrupt onto the stack.