Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucsd!hub!6500stom From: 6500stom@hub.UUCP (Josh Pritikin) Newsgroups: comp.sys.mac.programmer Subject: Re: patching SetPort() Message-ID: <3991@hub.UUCP> Date: 18 Feb 90 17:42:22 GMT References: Sender: news@hub.UUCP Lines: 39 From article , by jjoshua@topaz.rutgers.edu (Jon Joshua): > I am trying to patch SetPort() to eventually do some neat things. >... I think its better to do it this way: asm { movem a0/a1/d0,-(sp) ;save the reg that you use bra.s @start ;Jump over storage tAddr: dc.l 0 ;Save SetPort trap addr here start: jsr main ;Do neat stuff movem (sp)+,a0/a1/d0 move.l @tAddr,-(sp) ;Load orig SetPort trap addr rts ;Outa' here } void main () { FlashMenuBar(0); /* sysbeep isn't such a hot idea */ FlashMenuBar(0); /* in some programs */ } > Question: Could someone please shed some light on what might be > happening? Why only under MF and not finder. I tried booting with 0 > INITs/CDEVs etc. and the same thing happened. Umm, I've no idea why it wouldn't work but try my changes and see what happens. > -- > /\ ? ________________ > jjoshua@topaz.rutgers.edu \ ____ __ fgu |.signature under| > Anything is possible... \ | | / | orywlut- | construction | > ========== gfgsdfsdfsd |________________| > _____________________________OO_____O___hfdhksjdhfksjdfs_______||__________||__ / Josh Pritikin T The C++ programming language \ | Internet: 6500stom@ucsbuxa.ucsb.edu | is at worst, the second best | | AppleLink: Josh.P | for a given application. | \ GEnie: J.Pritikin ! But usually, it is the best. /