My program http://www.merlyn.demon.co.uk/programs/fsincos.pas works in
BP7 DOS & DPMI modes, crashes in BPW, and is, I am told, rejected by
Delphi 2.0 -
"Unfortunately the compiler complains with "Invalid registercombination"
(roughly translated from my german Delphi-version).
Here is the code I used:
procedure FSinCos(var S, C : extended ; A : extended) ; assembler ;
asm fld [A] ; db $CD,$35,$FB { >287: => fsincos; fpatan is CD35F3 } ;
les di,[C] ; fstp es:tbyte ptr[di] ;
(**********************************^ stops here **********)"
The full source of the subroutines is
procedure FSinCos(var S, C : extended ; A : extended) ; assembler ;
asm fld [A] ; db $CD,$35,$FB { >287: => fsincos; fpatan is CD35F3 } ;
les di,[C] ; fstp es:tbyte ptr[di] ;
les di,[S] ; fstp es:tbyte ptr[di] ;
end {FSinCos} ;
function FTan(A : extended) : extended ; assembler ;
asm fld [A] ; db $CD,$35,$FB { >287: => fsincos; fpatan is CD35F3 } ;
FDIV end {FTan} ; (* OK? *)
function FCot(A : extended) : extended ; assembler ;
asm fld [A] ; db $CD,$35,$FB { >287: => fsincos; fpatan is CD35F3 } ;
FDIVR end {FCot} ; (* OK? *)
Comments? Corrections?
BTW, has anyone got a way for a BP7 DOS/DPMI program to switch between
25- and 43/50- line modes without "uses Crt;" ?
--
John Stockton, Surrey, UK. j...@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL: http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/> - see 00index.txt.
Do not Mail News to me. Before a reply, quote with ">" or "> " (SoRFC1036)