[comp.sys.amiga] LockIBase

bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) (05/13/87)

This is a question about LockIBase() UnlockIBase() and proper use by
upstanding, moral citizens for good deeds and nice stuff:

A long time ago, at a computer far, far, away and using a operating system
called "1.1", I wrote a handy little hack.  This is the 'active ingredient':


hurdle2         move.l  (a0),-(a7)      ;Unlink first event. {ie_NextEvent}
hurdle3         move.l  a6,-(a7)
		move.l	#-1,a6		;->Self modifying. IBASE goes here<-
		moveq	#0,d0
                jsrlib  LockIBase       ;Lock before reading any private
                move.l  d0,-(a7)        ;intuition structures
                move.l  ib_ActiveScreen(a6),d0
                beq.s   inoscreen
                move.l  d0,a0
                jsrlib  ScreenToFront
inoscreen       move.l  ib_ActiveWindow(a6),d0
                beq.s   inowindow
                move.l  d0,a0
                jsrlib  WindowToFront
inowindow       move.l  (a7)+,a0
                jsrlib  UnlockIBase
                move.l  (a7)+,a6
                move.l  (a7)+,d0 ;Pointer to new, shorter input stream
                rts


Well, almost.  V1.2 , relase did not get here until march.  Not until then
did the uses and reality LockIBase() finally sink in.

Now the question: May those two functions be called by interrupt code?
                  Specifically a priority 51 input.device event handler.
                  Yes it "works" both ways.


      //  While I have yet to see it, rumor has it that the rest
   \\//   of this code is in July '87 issue of The Transactor.


------------------------------------------------------
-  Hacker microwave cookbook, Volume $08, Issue $0A  -
------------------------------------------------------
Microwave ovens are among the neatest toys NOT yet regulated by the defense 
department.  There are may ways to prepare popcorn in a microwave.  This
way, however, produces a very different result:

Materials: 
1> Microwave safe vessel with a small-area flat bottom.  Preferably
   ^^^^^^^^^^^^^^
tall, drinking glass shape.

Procedure:
Cover bottom of vessel loosly with popcorn.  Now add heavily saturated
sugar-water.  Better procedure is to add the sugar first then add water
to the top of the kernals.  Add microwaves and time.

The popcorn will *not* be soggy.  For flavor variations either leave the
vessel open on top or close it to trap the steam.  Add other boilable
flavorings for that personal touch.