🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7529

Re: Filter ON/OFF

#7529
From: logan shaw
Date: Tue, 18 Dec 1990 00:32
36 lines
2422 bytes
In article <faheyr.661405562@silver> faheyr@silver.ucs.indiana.edu (Bob Fahey <NECR0SIS>) writes:
>aaron@stat.tamu.edu (Aaron Hightower) writes:
>Hmm... I'll probably regret posting this, since the last time I did so, 
>I got flamed to hell. (I am talking about reading/writing registers directly).
>It seems that a few C programmers would rather write a large quantity of code
>instead of just dealing with the info at the the source, i.e. registers.

It's not that we're C programmers, it's that we're trying to do it correctly,
so it doesn't break later on.  You can write incorrectly in C, and (believe
it or not) you can write *correctly* in assembly as well.

Poking around at the hardware when there is an operating-system interface
is simply not acceptable.  I have done it before, and I've seen it break.
You can't go breaking the rules and expect your software to work on new
machines like the 3000.  Your code may work faster in some cases, but in
some cases it won't work at all.

>Anyway, Here's how I have done it (not saying it is CORRECT, but it works 
>nonetheless) ;-)
>filter_on:	move.w	#$7000,$bfe000
>filter_off:	move.w	#$7002,$bfe000

Written incorrectly in C:
#define FILTER_ON  ( *((short *)0xbfe000) = 0x7000 )
#define FILTER_OFF ( *((short *)0xbfe000) = 0x7002 )

>|      ///| a.k.a. NECR0SIS     faheyr@silver.ucs.indiana.edu  -or-          |
>|  \\\///_|                     faheyr@rose.ucs.indiana.edu                  |
>|   \XX/  |  M  I  G  A      "'Ere long done do does did..."  - The Smiths   |
>|             "...life is seen through the eyes of a dog..."  - Skinny Puppy |

-- 
=----------------Logan-Shaw---(lshaw@ccwf.cc.utexas.edu)----------------=
  "Trust in the Lord with all thine heart, and lean not on thine own
   understanding.  In all thy ways acknowledge Him and he shall direct
   thy paths"        - Proverbs 3:5-6
Technical Details
Message-ID: <41560@ut-emx.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu
References: <50729@eerie.acsu.Buffalo.EDU> <10940@helios.TAMU.EDU> <faheyr.661405562@silver>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu
From: lshaw@ccwf.cc.utexas.edu (logan shaw)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Filter ON/OFF
Keywords: AUDIO FILTER
Message-ID: <41560@ut-emx.uucp>
Date: 18 Dec 90 00:32:55 GMT
References: <50729@eerie.acsu.Buffalo.EDU> <10940@helios.TAMU.EDU> <faheyr.661405562@silver>
Sender: news@ut-emx.uucp
Reply-To: lshaw@ccwf.cc.utexas.edu (logan shaw)
Organization: The University of Texas at Austin
Lines: 36