It's actually a pretty easy concept, and one of the most efficient ways of doing it, as well.
Let's say your ISR has four subsections:
open, read, write, and close
And you want the API to be something like this:
mov ax, 0 ; 0 for open, 1 for read, 2 for write, etc...
mov other_regs, parameters
int 32 ; for example
Simple enough, right?
Your int 32 ISR has to call the correct function (read, write, etc) based on what's in the ax register. So why not make an array of function pointers:
long int32routines[] = { open, read, write, close };
// where open, read, write and close are functions
Now, in your ISR code, all you really have to do is call int32routines[ax], and you're done. The ax register becomes the index into that array. Control is passed to the appropriate function, it does its thing, and returns to the ISR, which irets to the calling program.
Hopefully that all makes sense... I must admit, I'm a little hung-over, so the mind isn't exactly functional, lol
Hope you like my mixture of C and ASM
Jeff