Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!uflorida!haven!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.programmer Subject: Re: HELP with _OpenResFile Summary: Jump back could cause this error Message-ID: <4940@umd5.umd.edu> Date: 26 May 89 20:22:51 GMT References: <863@umecs.cs.umu.se> <23197@dhw68k.cts.com> Reply-To: zben@umd5.umd.edu (Ben Cranston) Organization: University of Maryland, College Park Lines: 33 I think these two lines of code are exactly equivalent: DC.B 0x0006 DC.B 0x06 because the DC directive is told to make exactly one byte. Chances are this is not the problem. Consider these two facts: 1. Lack of a branch around the literal string means control is going to fall into the string and execute it as instructions. 2. User complained of a return code that says "Too many files open". Suppose part of the string, as interpreted as instructions, is actually a short branch back into the top of the code! It will try to open the same file a second time. Two possibilities here: A. The Mac file system notices it is the same file, and issues an error code that can also mean "tried to open the same file more than once". B. The Mac file system does NOT notice it, and opens another connection to the same file. Control falls into the short branch back. Opens another connection to the same file. Control falls into the short branch back... Eventually some system file table overflows, and the "too many files open" condition is diagnosed. I would either put a sysbeep into the putative loop and see if the Mac makes a lot of noise, or MacNosy the resource and see if there is indeed a branch back. -- Ben Cranston (Kingdom of Merryland UniSys 1100/92) Copyright 1989 (you may redistribute ONLY if your recipients can).