cmhg
Colin (478) 2433 posts |
In cmhg you have generic-veneers and vector-handlers. generic-veneers have the format
and vector-handlers have the format
I note in the RISC OS sources that in the case of claiming the UpCallV for example sometimes a generic-veneer is used and sometimes a vector-handler. From the programmers manual Vector routines passed to OS_Claim can claim the vector, pass it on or claim it and return an error. So my questions are: |
nemo (145) 2529 posts |
Don’t get confused between an UpCallV handler (registered with OS_Claim) and an UpCall handler (registered with OS_ChangeEnvironment). In the former case there is a chain, in the latter there isn’t. Vector handlers can return an error in the usual way¹. Which is how ErrorV works of course. ¹ Vector handlers can either continue to the next handler in the chain or claim the call and hence return to the caller (or an earlier handler). Claiming the call with V set returns an error, where appropriate. |
Colin (478) 2433 posts |
Yes I understand, I’m talking about claiming the UpCallV with OS_Claim. Doing it in assembler is no problem. Doing it in C you need a veneer for your function which you get using cmhg. I would have used a vector-handler (prototype shown above) but that doesn’t allow me to return an error. (which I could in assembler). generic-veneers (which SCSISoftUSB registers with OS_Claim) allow you to return an error but doesn’t have a way of claiming or passing on the vector. I can find no documentation to say whether generic-veneers claim vectors or pass on down the chain. I suspect vector-handlers should be used for vector handlers (the clue is in the name :-) ) but if generic-veneers are used is its vector behaviour defined? |