Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ames!claris!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga.tech Subject: Re: Official Warnings... Message-ID: <11394@well.UUCP> Date: 24 Apr 89 10:51:16 GMT References: <3082@haven.umd.edu> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Lt. Col. Oliver North, Overseas Shipping and Receiving. Lines: 27 Quote: "Men, take Binkley's head." -- Coach Bloom In article <3082@haven.umd.edu> brett@sylvester-tr.UMD.EDU (Brett S Bourbin) writes: > In the Jan/Feb 1989 issue of Amiga-Mail, under the "Official Warnings >to ROM-Jumpers, Structure-Hackers, and Others", it states that you should >NOT use the TAS assembly instruction. What is the reason for this? > A zillion other people have offered explanations. Now it's my turn. TAS uses an indivisible memory cycle to do its work. It's supposed to be used in multi-processor systems, where many CPU's share the same memory. TAS causes the CPU to grab the memory location and hold onto it until it's finished modifying it, thereby preventing other CPU's from possibly inspecting the datum before the modification is complete. It's a form of hardware semaphore facility. However, the Amiga doesn't have multiple CPU's (the Copper doesn't count in this instance). So TAS is not needed, and as has already been explained, the behavior of TAS on the Amiga is guaranteed to be indeterminate. Use the BSET instruction instead. It's functionally similar. It even runs a little quicker. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU \_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor