Replies: 4 comments
-
OW in-line assembler is simple function oriented assembler (for a few instructions only) therefore you must define C prototype for each assembly in-line function. |
Beta Was this translation helpful? Give feedback.
-
Below is little bit changed code which has no problem and do the same thing but correct and more eficient way (code generator assign ms.b value directly to di register with appropriate type conversion. Resulting code will be more efficient (optimized).
|
Beta Was this translation helpful? Give feedback.
-
Right the problem with your approach is the actual inline function I'm working with (not this toy) is a lot longer and the assignment to DI register is not at the beginning of the function, but instead several instructions later. I would like to internalize this reference and not burn a register to pass a constant into a function. |
Beta Was this translation helpful? Give feedback.
-
Take into account that Watcom default calling convention is to use register for passing values, if you want to put it on stack it is possible but is not efficient as use of registers. Documentation for 16-bit Auxiliary Pragmas |
Beta Was this translation helpful? Give feedback.
-
I am trying to load a pointer to a field from an inline assembly function defined using #pragma aux, however I can only do it by hard-coding the exact field location.
Building gives me this error:
but building with -dGOOD gives
Beta Was this translation helpful? Give feedback.
All reactions