Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!psuvax1!vu-vlsi!cbmvax!carolyn From: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Newsgroups: comp.sys.amiga Subject: Re: A2000 questions Message-ID: <2515@cbmvax.UUCP> Date: Thu, 15-Oct-87 20:05:08 EDT Article-I.D.: cbmvax.2515 Posted: Thu Oct 15 20:05:08 1987 Date-Received: Sat, 17-Oct-87 11:22:53 EDT References: <176@tahoma.ARPA> <2467@cbmvax.UUCP> <22314UH2@PSUVM> <317@a.UUCP> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Organization: Commodore Technology, West Chester, PA Lines: 110 In article <317@a.UUCP> adb@a.UUCP (Allen D Barnett) writes: > >Having had my A2000 (B2000, really, even though the box was labeled in >German), I would appreciate some help with a particular problem. >I have a code that neglects to clear register D0 before it does a >_LVOOpenLibrary. The garbage in D0 is larger than 33 so the library >fails to open; so, since we are trying to open dos.library, there is >no way to report this failure other than through Alert. However, >when the Guru is summoned, with a recoverable alert, the entire screen turns >blue and the power LED begins to blink benignly. After waiting a while, >I administer the nerve pinch and lo, the requstor appears. I press the >right mouse button and the machine resets itself. When this code ran on >my 1000, it properly displayed the alert and proceeded to clean up and exit >properly when you pressed the mouse button. No more. What is the source of >this problem? Any speculation is welcome. >(oh, one other thing, I meant to say that I pressed the left mouse button >in response to the alert; my mind wanders.) 1. Try pressing the LEFT mouse button. I think the right mousebutton throws (or can throw) you into RomWack. If you did not have a 9600 baud terminal connected, all would would see is a freezing of the guru'd system. 2. Here's a patch for fixing executables afflicted with the trash-in-d0 OpenDOS problem. It patches in a piece of d0 init code and re-routes things through it. /* * LPatch.c - C. Scheppner 03/87 * * Corrects the startup code of some 1.0/1.1 programs such as * Atom so that they don't abort during startup with the Alert * 00038007. (can't open dos library). The problem is caused * by d0 (version) being uninitialized prior to the OpenLibrary. * * LINKAGE INFO: * Compile with -v flag on LC2 * Link with AStartup.obj ... LIBRARY Amiga.lib, LC.lib */ #include #include #include /* Patch Offsets, Old Values, New Values */ ULONG offset[] = {0x196,0x197, 0x213, 0x23E,0x23F,0x240,0x241,0x242,0x243}; UBYTE oldval[] = {0x01, 0x4E, 0xD2, 0x24, 0x3C, 0x00, 0x00, 0x03, 0xED}; UBYTE newval[] = {0x00, 0xA8, 0x2C, 0x70, 0x00, 0x60, 0x00, 0x00, 0xA2}; LONG file; main(argc, argv) int argc; char **argv; { LONG rLen, wLen; char *filename; UBYTE buf[4]; int k; if (argc==0) cleanexit(""); if ((argc==1)||(argc>2)||(*argv[1]=='?')) cleanexit("Usage: LPatch filename"); filename = argv[1]; if(!(file = Open(filename, MODE_OLDFILE))) cleanexit("File not found"); for(k=0;k<9;k++) { Seek(file,offset[k],OFFSET_BEGINING); if((rLen = Read(file,buf,1)) < 1) cleanexit("Read error"); if(buf[0] != oldval[k]) cleanexit("File not correct for patch"); } for(k=0;k<9;k++) { Seek(file,offset[k],OFFSET_BEGINING); if((wLen = Write(file,&newval[k],1)) < 1) cleanexit("Write error"); } cleanup(); } cleanexit(s) char *s; { if (*s) { printf("%s \n",s); } cleanup(); exit(); } cleanup() { if(file) Close(file); } /* end */ -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CATS >>Commodore Amiga Technical Support<< UUCP ...{allegra,ihnp4,rutgers}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=