[comp.os.msdos.programmer] The !APX8087 and TASM

jones@tabby.uvm.edu (mrj) (08/02/90)

	What I want to do is take advantage of the limited parallel
processing that the 8086/8087 can do together.

Example: (do nothing code)

	fild  n       ; load value n
	fsqrt         ; start computing sqrt on 8087
	mov	ax,1  ; 8086 code... while 8087 is running
	cmp	ax,bx
	je	go_on
	add	ax,bx
go_on:	wait          ;re-synch 8086/8087
	.
	.
	.

	I have only started with this problem, so I may not be doing
it right anyhow.  But my problem..

	TASM 1.0 is nice enough to put WAITs in before each 8087
instruction for me.  If you dis-assemble it you see...

	WAIT
	fild  n
	WAIT
	fsqrt
	mov	ax,....
	.
	.

	From my Intel product reference, it would seem that I don't
need these.  Is this just a TASM "feature" to keep me out of trouble.
If not, can it be turned off, or should I find a new assembler?  I
could not find anywhere in Borland's manual anything about 8087
handling.  (except the generic line under the "beginning assembly
language programming and don't forget you RETs", TASM is an AS IS
assembler, you get what you write.)  So are these WAITs mandatory ?

Thank you.
Mike Jones.
EMBA-Computer Facility.
jones@uvm.edu

(M-x yow)

smwong@hantsv.enet.dec.com (Stephen Wong) (08/08/90)

In article <1594@uvm-gen.UUCP>, jones@tabby.uvm.edu (mrj) writes:
|> 	What I want to do is take advantage of the limited parallel
|> processing that the 8086/8087 can do together.
 
Actually, 8086/8087 has very very limited parallel processing ability.
 
|> 	TASM 1.0 is nice enough to put WAITs in before each 8087
|> instruction for me. 
 
Yes, TASM (and MASM) is very nice to save your keystrokes to input
FWAIT (or WAIT) after every 8087 instruction, the FWAIT (or WAIT) is
necessary for 8086/8087.
 
|> 	From my Intel product reference, it would seem that I don't
|> need these.  Is this just a TASM "feature" to keep me out of trouble.
|> If not, can it be turned off, or should I find a new assembler?  I
|> could not find anywhere in Borland's manual anything about 8087
|> handling.  (except the generic line under the "beginning assembly
|> language programming and don't forget you RETs", TASM is an AS IS
|> assembler, you get what you write.)  So are these WAITs mandatory ?
 
If you have 80287 or above, the FWAIT (or WAIT) is not necessary, by
using '.287' or '.387' assembler directive, you can turn off the FWAIT
(or WAIT) insertion.  But it will cause your 8086 to hang, so don't use
the above directive unless you have 287 or 387.
 
stephen@hantsq.enet.dec.com