[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4938.0. "How much does forbid() .. forbid?" by WELLIN::FINNIS () Wed Jul 31 1991 19:30

    
    
    What exactly does forbid() do
    
    I understand that it disables multitasking..?
    Does this imply that the harddisk.device etc.. also 
    no longer function.
    
    The reason I ask is because I'm hoping to write some software
    for an EPROM programmer, and I need accurate timings. etc..
    
    I guess if it's so then I put the file in ram first.
    
    
    			-Pete-
T.RTitleUserPersonal
Name
DateLines
4938.1ELWOOD::PETERSWed Jul 31 1991 22:367
    
    	Forbid() stops everything !  You should be ready to complete the
    task before doing a forbid(). No user interaction and no devices of any
    type. It even stops hardware interrupts.
    
    		Steve P.
    
4938.2Does it?FORTY2::CADWALLADERThu Aug 01 1991 07:3310
	Are you sure that Forbid() stops interrupts?
	I thought that this is what Disable() & Enable() are for.

	Furthermore, when once writing a sprite-moving routine, I found that
	interrupts had to be disabled by clearing the relevent int register
	bits, although Forbid() had been called already, to enable the routine
	to function correctly.

	BTW - correct me if I'm wrong.
4938.3STAR::GUINEAUbut what was the question?Thu Aug 01 1991 12:018
I believe .-1 is correct. 

Forbid() will only disable task switching (which I guess means any task, so 
the file systems will not run, but I believe drivers can handle interrupts). 

Disable() stops all interrupts so even the drivers are affected.

john
4938.4Thanks...But..WELSWS::FINNISThu Aug 01 1991 20:0515
    Thanks Guys,
    
    		I think that I must have had the disable() in the 
    back of my mind...No not literally..
    
    Can anyone guess the next question..
    Yup..
    	There was a note recently about examples of how to drive the
    Parallel Port, but I can't find it. If anyone has any code that
    may help I would appreciate it. Or a pointer to the note or the 
    author.
    	I've checked out the "C Manual" and "R.K.M" stuff from Fish
    Disks.
    
    			-Pete-