rgonzal@elbereth.rutgers.edu (Ralph Gonzalez) (11/15/90)
Hi. I used to know this... Could someone tell me the instruction to type, when I've just pressed the programmer's switch, so I can return to the Finder? (I'm not using MacsBug.) Thanks. -Ralph
vd09+@andrew.cmu.edu (Vincent M. Del Vecchio) (11/15/90)
> Excerpts from netnews.comp.sys.mac.programmer: 14-Nov-90 Help: return to > Finder with.. Ralph Gonzalez@elbereth. (199) > Could someone tell me the instruction to type, when I've just pressed > the programmer's switch, so I can return to the Finder? (I'm not > using MacsBug.) Thanks. SM 0 A9F4 <return> G 0 <return> Can anyone comment on the safeness of using address 0 as scratch space? I've done this for a while--another alternative is to write into the screen buffer if you're on a + or SE, but the address is longer and harder to type. Is there anything important there that's being overwritten? I don't think I've had any problems with doing this, so I'd guess there's not, but that's just a guess.
kaufman@Neon.Stanford.EDU (Marc T. Kaufman) (11/16/90)
In article <UbEfVf_00Vp38DXGtf@andrew.cmu.edu> vd09+@andrew.cmu.edu (Vincent M. Del Vecchio) writes: >Can anyone comment on the safeness of using address 0 as scratch space? >I've done this for a while--another alternative is to write into the >screen buffer if you're on a + or SE, but the address is longer and >harder to type. Is there anything important there that's being >overwritten? I don't think I've had any problems with doing this, so >I'd guess there's not, but that's just a guess. There are a number of programs, INITs, drivers, etc., that either deliberately or accidently dereference NIL handles. Now a NIL handle points to 0. After dereferencing you get the contents of 0 as a pointer. If this is non-zero, you could be in for lots of fun debugging. There are a number of debugging aids (Mr. Bus Error, the Debugger, etc.) that deliberately put an odd address into location 0 to catch such accidental derefs. If you try to run your program while any of the above are running, things will likely not work right. With all the memory on the mac, and the System heap, and resources, why do you want to write to 0? What if another programmer has the same idea? Marc Kaufman (kaufman@Neon.stanford.edu)
folta@tove.cs.umd.edu (Wayne Folta) (11/16/90)
I am not using Macsbug, and I simply type "G FINDER" at the ">" prompt to get back to the Finder. (This is System 6.0.7, IIci, if that matters.) Wayne -- Wayne Folta (folta@cs.umd.edu 128.8.128.8)
resnick@cogsci.uiuc.edu (Pete Resnick) (11/16/90)
rgonzal@elbereth.rutgers.edu (Ralph Gonzalez) writes: >Could someone tell me the instruction to type, when I've just pressed >the programmer's switch, so I can return to the Finder? (I'm not >using MacsBug.) Thanks. 'G' for go. (I like knowing the easy ones!! :-)) pr -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet/ARPAnet/EDUnet : resnick@cogsci.uiuc.edu BITNET (if no other way) : FREE0285@UIUCVMD
dorner@pequod.cso.uiuc.edu (Steve Dorner) (11/16/90)
In article <1990Nov15.174005.14697@Neon.Stanford.EDU> kaufman@Neon.Stanford.EDU (Marc T. Kaufman) writes: >With all the memory on the mac, and the System heap, and resources, why do you >want to write to 0? What if another programmer has the same idea? Read it again, Marc; he's talking about putting a9f4 at location 0 with the mini-debugger so he can recover from a crash, or similar things. He wondered if tromping on location 0 in this manner was OK. For all the reasons you mention, it is a BAD idea for programs to depend on location 0 being anything in particular. Therefore, it is probably safe to use 0 as scratch space *from the mini-debugger*. -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (11/20/90)
> Can anyone comment on the safeness of using address 0 as scratch space? > I've done this for a while--another alternative is to write into the > screen buffer if you're on a + or SE, but the address is longer and > harder to type. Is there anything important there that's being > overwritten? I don't think I've had any problems with doing this, so > I'd guess there's not, but that's just a guess. It's fine on a Mac. Don't try it on an Amiga. Note that TMON puts NIL! into address 0 as a debugging aid. The idea was that attempting to reference an unitialized pointer would generate an immediate address error since '!' is odd and that the 'NIL!' would give a hint to the programmer. -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org