On 12/21/2010 8:54 AM, dos386 wrote:
> AFAIK the inline ASM is more painful in WATCOM than in Boreland C or
> CC386 compilers (I ever tested the latter one only). The are also
> pre-brewn int86() int386() and maybe more functions to fire the INT
> instruction but don't ask me how they exactly work.
>
>

I have done a bit of inline ASM in both Borland Turbo C++ and Open 
Watcom, and OW isn't that hard to use and is clearly superior for 
optimized code.

Borland (at least Turbo) lets you touch the registers directly using 
them like variables (_AX, _BX, etc.).  That part is nice.  But I'm quite 
certain that as soon as you drop into inline ASM that Borland kills all 
of the optimizations it was doing with the registers.  So if you are 
writing high performance code and want to use ASM, you cause performance 
side-effects that are not desirable.

The #pragma aux lets you declare which registers you want to use as 
parameters, which registers are used for output, and which registers are 
used in the function.  This lets the compiler work the inline ASM into 
the rest of the code flow and preserve optimization if possible.

The professional Borland products might have a similar feature, but 
Turbo did not ...


Mike


------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to