#C Compilers: which one?
25-Jul-89 00:46:36
Sb: #58637-#C Compilers: which one?
Fm: John Draper 76703,4322
To: Richard Rae/SYSOP 76703,4253
Rick,
What you are missing is that the code generated by the C part make certain
assumptions about register usage, and expect certain registers to contain, for
example, pointers to data hunks. The assembly is required because the routine
will be called from somewhere external to the program. Now if indeed you could
code it with the asm in two separate modules, and the C part in its own module,
that's fine, and my only argument for the necessity of inline asm will
disappear. ie. you could call the function(s) by calling the asm, which would
'fall through' to the C, and then to the other asm module.
I invited Ben to show me a better way, and his only comment was that it was
obvious that the module should be entirely coded in asm, for 'obvious' reasons.
-larry