From: pottier@clipper.ens.fr (Francois Pottier) Subject: csmp-digest-v3-029 Date: Sun, 22 May 94 23:09:20 MET DST C.S.M.P. Digest Sun, 22 May 94 Volume 3 : Issue 29 Today's Topics: 64-bit multiply & divide for line intersections...? A KON&BAL Puzzle Page of my own Absoft C++ Absoft on Power Mac Another BlockMove question Async Disk Access ExtFS Development Help w- PPC and Time Tasks How To Detect Screen Saver Large device drivers: how to? Taxes on shareware fees Thread Mgr Native PPC NOT - why? updated list of bizarre key combos on the mac The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier (pottier@clipper.ens.fr). The digest is a collection of article threads from the internet newsgroup comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi- regularly and want an archive of the discussions. If you don't know what a newsgroup is, you probably don't have access to it. Ask your systems administrator(s) for details. If you don't have access to news, you may still be able to post messages to the group by using a mail server like anon.penet.fi (mail help@anon.penet.fi for more information). Each issue of the digest contains one or more sets of articles (called threads), with each set corresponding to a 'discussion' of a particular subject. The articles are not edited; all articles included in this digest are in their original posted form (as received by our news server at nef.ens.fr). Article threads are not added to the digest until the last article added to the thread is at least two weeks old (this is to ensure that the thread is dead before adding it to the digest). Article threads that consist of only one message are generally not included in the digest. The digest is officially distributed by two means, by email and ftp. If you want to receive the digest by mail, send email to listserv@ens.fr with no subject and one of the following commands as body: help Sends you a summary of commands subscribe csmp-digest Your Name Adds you to the mailing list signoff csmp-digest Removes you from the list Once you have subscribed, you will automatically receive each new issue as it is created. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest. Questions related to the ftp site should be directed to scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP digest are available there. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src. ------------------------------------------------------- >From dmc@leland.Stanford.EDU (David M. Cannon) Subject: 64-bit multiply & divide for line intersections...? Date: 3 May 1994 03:05:32 GMT Organization: Stanford University, CA 94305, USA I've been trying to adapt some of the code from Graphics Gems for use on some simple mac graphics that I'm doing. In particular, I'm working to get some of the line-intersection code to work for Quickdraw's graphic space, signed 16-bit integers in each direction. To do this, I need routines which will multiply 2 32-bit integers to get a 64 bit signed integer, and then to divide that 64-bit integer by a 32 bit signed integer. There is a 64-bit multiply in the GG code, but it appears to be designed for intel chips (?), and my attempts to modify it don't weem to work for signed integers; my divde routine is even more pathetic. I have a feeling that code to do this stuff is out there somewhere sitting on an ftp server or someone's disk; anyone have any working code or pointers to such? I've already resigned myself to acknowledging my mediocrity as a programmer after several hours at this today... surely better people have found this easy... :-/ Thanks, Dave Cannon PLEASE REPLY TO: dmcannon@step.stanford.edu +++++++++++++++++++++++++++ >From platypus@cirrus.som.cwru.edu (Gary Kacmarcik) Date: 03 May 1994 19:47:23 GMT Organization: Case Western Reserve University, Cleveland, Ohio (USA) In article <2q4f1s$3n0@nntp2.Stanford.EDU> dmc@leland.Stanford.EDU (David M. Cannon) writes: > I've been trying to adapt some of the code from Graphics Gems for use > on some simple mac graphics that I'm doing. In particular, I'm working > to get some of the line-intersection code to work for Quickdraw's > graphic space, signed 16-bit integers in each direction. To do this, > I need routines which will multiply 2 32-bit integers to get a 64 bit > signed integer, and then to divide that 64-bit integer by a 32 bit > signed integer. There is a 64-bit multiply in the GG code, but it i wrote the following a while ago, and haven't had problems with it. on the other hand, i haven't tested it fully. make sure that you understand the code before you add it to any program that involves life-support ;-) the mult64 (64-bit = 32 x 32) and mult128 (128 = 64 x 64) code is commented fairly well, but the divide code leaves a bit to be desired. note that if your compiler supports 64-bit data types, you should use them. the PowerPC can do a 64=32x32 in 2 instructions (mullw and mulhw[u]), and 64-bit PowerPC's (like the 620) will be able to do 128=64x64 in two instructions (mulld and mulhd[u]). enjoy -gary j kacmarcik platypus@nimbus.som.cwru.edu tabs should be set to 4 or else the code will look uglier than necessary. the code assumes the following typedefs: typedef short int16; typedef long int32; typedef unsigned char uchar; typedef unsigned short uint16; typedef unsigned long uint32; typedef struct { uint32 u,l; } int64,uint64; typedef struct { uint32 uu,ul,lu,ll; } int128,uint128; // ************** // MULTIPLICATION // ************** // on a computer with 2n bits in a standard word, multiplying 2 2n-bit words has // the potential of overflowing the output word -- 4n bits are required to // guarantee that the result can be stored without overflow. // // the only way to insure that the result can be stored in a single word // is to limit the range of numbers that can be multiplied. thus, if you // only allow numbers with n bits (or less) to be multiplied, you can guarantee // that the result will fit in a 2n-bit word. // // multiplying 2 2n-bit words can be accomplished by breaking up the 2n-bit x // 2n-bit multiply into a series of n-bit x n-bit multiplies. this is good // because we know that the n x n bit multiplies will not cause an overflow. // // the process is the same as that used when multiplying numbers by hand. e.g.: // // 9 3 // x 2 5 // ----- // 1 5 = 5 x 3 // 4 5 = 5 x 9 (shifted over to the 10's place) // 0 6 = 2 x 3 (shifted over to the 10's place) // 1 8 = 2 x 9 (shifted over to the 100's place) // ------- // 2 3 2 5 // // the results of the individual multiplies are shifted over the appropriate // number of places and then added together // // this can be formalized as follows: // // to multiply 2 2n-bit numbers u and v // // u = 2^n U1 + U0 // v = 2^n V1 + V0 // ------------------ // u * v = 2^2n U1 V1 + 2^n V1 U0 + 2^n U1 V0 + U0 V0 // // U1 and U0 can be thought of as the upper-half and the lower-half of u. // likewise with v. the following figure shows the above formula graphically. // each block is n bits wide. // // +--------+--------+ // u = | U1 | U0 | // +--------+--------+ // +--------+--------+ // * v = | V1 | V0 | // +--------+--------+ // --------------------------------------- // +--------+--------+ // | U0 V0 | // +--------+--------+ // +--------+--------+ // | U1 V0 | (shifted over n bits) // +--------+--------+ // +--------+--------+ // | V1 U0 | (shifted over n bits) // +--------+--------+ // +--------+--------+ // | U1 V1 | (shifted over 2n bits) // +--------+--------+ // --------------------------------------- // +--------+--------+--------+--------+ // | u * v | // +--------+--------+--------+--------+ // // since a 2n-bit unit is that largest unit that we can deal with at a time, we // need to break the 2 middle terms (U1V0 and V1U0) into upper and lower halves // and then add the appropriate half to appropriate half of the result. thus, // we need to take the lower n bits of the U1V0 term, shift them n bits to the // left, and add them to the lower 2n-bit half of the result term. then we take // the upper n bits, shift them n bits to the left, and add them to the upper // 2n-bit half of the result term. repeat for the V1U0 term. // // note that this requires 4 multiplies and 4 additions // // the above formula can be simplified to reduce the number of multiplies required // (at the expense of adding a few additions/subtractions) // // u * v = 2^2n U1 V1 + 2^n V1 U0 + 2^n U1 V0 + U0 V0 // // adding 2^n U1 V1 - 2^n U1 V1 + 2^n U0 V0 - 2^n U0 V0 (which is the same // as adding 0) // // u * v = (2^2n + 2^n) U1 V1 + 2^n (U1 - U0) (V1 - V0) + (2^n + 1) U0 V0 // // or // u * v = 2^2n U1 V1 + 2^n (U1 V1 + (U1-U0)(V1-V0) + U0V0) + U0 V0 // // which requires 3 multiplies and 8 additions/subtractions (2 subtractions and // each middle (ie: 2^n) term requires 2 additions) // // the elimination of one of the multiplications can have a significant impact on // the performance depending on how many times this algorithm needs to be applied // recursively in order to obtain the desired multiplication operation. the // following table // // # of times original reduced // applied method method // recursively * + * +/- // ------------------------------------------------ // 1 4 4 3 8 // 2 16 20 9 32 // 3 64 84 27 96 // 4 256 340 81 296 // // it is obvious that the reduced method performs better than the original method // if we need to apply the algorithm more than 3 times recursively. for the // other cases, we need to take into account the relative performance of the // multiply verses the addition operation. // // for level 1 we replaced 1 multiply with 4 add/sub's // for level 2 we replaced 5 multiplies with 12 add/sub's // for level 3 we replaced 37 multiplies with 12 add/sub's // // since multiplication requires more computation time that addition/subtraction, // the reduced method is advantageous for level 3. for level 2, the reduced // method is advantageous if the average multiply requires more than 12/5 the // time of an add/subtract. the reduced method is advantageous for level 1 // if a multiply requires at least 4 times as much time as an add/subtract. // // in general, it is good to apply the reduced method. // // for more info: "The Art of Computer Programming, Volume II: Seminumerical // Algorithms", by D.E. Knuth. // // whew! now we can actually implement it... // we rely on the compiler to generate the 32-bit product of 2 16-bit integers // this should be a basic instruction #define mult16(x,y) (uint32)(((uint32)x) * ((uint32)y)) // multiply 2 32-bit integers and return a 64 bit result // (13OCT93) uint64 mult32(uint32 u,uint32 v) {int32 u1,u0; int32 v1,v0; int32 u1v1,u0v0,u1u0_v1v0,t; int32 r1,r0; int64 result; u1 = (u >> 16) & 0x0000FFFF; u0 = u & 0x0000FFFF; v1 = (v >> 16) & 0x0000FFFF; v0 = v & 0x0000FFFF; u0v0 = mult16(u0,v0); u1v1 = mult16(u1,v1); u1u0_v1v0 = mult16((u1-u0),(v1-v0)); r0 = u0v0; r1 = u1v1; // take upper half on middle terms, shift them to the right, and add them // to the lower part of the upper half of the result t = (u1v1 >> 16) & 0x0000FFFF; r1 += t; t = (u0v0 >> 16) & 0x0000FFFF; r1 += t; t = (u1u0_v1v0 >> 16) & 0x0000FFFF; r1 += t; // take lower half on middle terms, shift them to the left, and add them // to the upper part of the lower half of the result t = (u1v1 << 16) & 0xFFFF0000; r0 += t; t = (u0v0 << 16) & 0xFFFF0000; r0 += t; t = (u1u0_v1v0 << 16) & 0xFFFF0000; r0 += t; result.u = r1; result.l = r0; return(result);} // multiply 2 64-bit integers and return a 128 bit result // (13OCT93) uint128 mult64(uint64 u,uint64 v) {int128 result; int32 u1,u0; int32 v1,v0; int64 u1v1,u0v0,u1u0_v1v0,t; int64 r1,r0; u1 = u.u; u0 = u.l; v1 = v.u; v0 = v.l; u0v0 = mult32(u0,v0); u1v1 = mult32(u1,v1); u1u0_v1v0 = mult32((u1-u0),(v1-v0)); r0 = u0v0; r1 = u1v1; // take upper half on middle terms, and add them // to the lower part of the upper half of the result t.u = 0; t.l = u1v1.u; addto64(&r1,t); t.l = u0v0.u; addto64(&r1,t); t.l = u1u0_v1v0.u; addto64(&r1,t); // take lower half on middle terms, and add them // to the upper part of the lower half of the result t.l = 0; t.u = u1v1.l; addto64(&r0,t); t.u = u0v0.l; addto64(&r0,t); t.u = u1u0_v1v0.l; addto64(&r0,t); result.uu = r1.u; result.ul = r1.l; result.lu = r0.u; result.ll = r0.l; return(result);} // ******** // DIVISION // ******** // divide a 64-bit number by a 32-bit number and return a 64-bit quotient // and a 32-bit remainder // this operation is: // dividend / divisor // the return values are such that // dividend = (divisor x quotient) + remainder // (09JUN93 - 13OCT93) void divide64(uint64 dividend, uint32 divisor, uint64 *quotient, uint32 *remainder) {int neg_divisor=0,neg_dividend=0; uint32 mask,x; // check if the divisor is negative if(divisor & SIGN) {neg_divisor = 1; // negate the 32-bit divisor so that we deal with + numbers divisor = ~divisor + 1;} // check if the dividend is negative if(dividend.u & SIGN) {neg_dividend = 1; negate64(÷nd);} // calculate the upper and lower parts of the quotient // if the upper part is non-zero, we have an overflow condition mask = SIGN; x = 0; quotient->u = 0; while(mask) {x <<= 1; x += ((dividend.u & mask)?1:0); quotient->u <<= 1; if(divisor <= x) {x -= divisor; quotient->u |= 1;} mask >>= 1;} mask = SIGN; quotient->l = 0; while(mask) {if(x & SIGN) {// overflow quotient->u = SIGN; quotient->l = 0; return;} x <<= 1; x += ((dividend.l & mask)?1:0); quotient->l <<= 1; if(divisor <= x) {x -= divisor; quotient->l |= 1;} mask >>= 1;} *remainder = x; // we need to make sure that the sign of the result makes sense // the remainder should have the same sign as the dividend if(neg_dividend && ((*remainder & SIGN) != SIGN)) *remainder = ~*remainder + 1; if(neg_dividend != neg_divisor) negate64(quotient);} +++++++++++++++++++++++++++ >From Bruce@hoult.actrix.gen.nz (Bruce Hoult) Date: Thu, 5 May 1994 18:05:17 +1200 (NZST) Organization: (none) dmc@leland.Stanford.EDU (David M. Cannon) writes: > I need routines which will multiply 2 32-bit integers to get a 64 bit > signed integer, and then to divide that 64-bit integer by a 32 bit > signed integer. There is a 64-bit multiply in the GG code, but it > appears to be designed for intel chips (?), and my attempts to modify > it don't weem to work for signed integers; my divde routine is even > more pathetic. The work of a moment, if you're running on a 68020 or better :-) - --------------------- lm.a ----------------------- case on machine mc68020 muldiv64 proc export ; long muldiv64(long mul1, long mul2, long div) move.l 4(sp),d0 muls.l 8(sp),d1:d0 divs.l 12(sp),d1:d0 rts endproc end - --------------------- test.c ----------------------- #include long muldiv64(long mul1, long mul2, long div); int main(){ long a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%d\n", muldiv64(a,b,c)); return 0; } - ----------------------------------------------------- That's enough to let you build and test it in MPW (it works). Uhhh -- you don't say whether you wanted the quotient or the remainder from the division -- I assumed the quotient. If you want the remainder then swap d0 with d1 everywhere. The object code output from lm.a is... 00000000: 202F 0004 ' /..' MOVE.L $0004(A7),D0 00000004: 4C2F 0C01 0008 'L/....' MULS.L $0008(A7),D1:D0 0000000A: 4C6F 0C01 000C 'Lo....' DIVS.L $000C(A7),D1:D0 00000010: 4E75 'Nu' RTS ... so you could make a C inline something like this (not tested)... long muldiv64(long mul1, long mul2, long div) = {0x202F, 0x0004, 0x4C2F, 0x0C01, 0x0008, 0x4C6F, 0x0C01, 0x000C}; Happy coding :-) -- Bruce --------------------------- >From pottier@goelette.ens.fr (Francois Pottier) Subject: A KON&BAL Puzzle Page of my own Date: 28 Apr 1994 11:18:55 GMT Organization: Ecole Normale Superieure, PARIS, France I had a hell of a debugging session last night... I had to single-step through the Palette Manager in order to understand what was wrong with my code. After solving the problem I thought the story was amusing, so I turned it into a KON & BAL Puzzle Page. Here it is. I hope you like it... [This puzzle is not as hard as usual KON&BAL ones... I apologize to the real KON & BAL...] KON I have this cool application I'm writing which does some drawing in an offscreen GWorld. BAL Yeah, what about it? KON Well, after I launch it, SetDepth becomes unreliable, and the machine often crashes while trying to change the screen's pixel depth. BAL You must have some slimy code in there mucking with Quickdraw's internals. KON No, nothing of the sort, I just create an offscreen GWorld, draw a picture into it and CopyBits it to the screen. Really innocuous. BAL Okay, where does the crash occur ? KON Always in the same place, somewhere in the System Heap. Must be the Layer Manager or the Palette Manager or something. The code crashes with a bus error because A4 contains an invalid pointer. BALOkay, let's disassemble around the place and figure where the value in A4 comes from. KON Apparently it comes from an array which was obtained from a low memory global named PortList. BAL PortList? Never heard of that one. We're lucky that Macsbug knows its name. It's probably a list of all open grafports. KON Yeah, SetDepth must be walking all ports and changing a few things in them. BAL Fine. Let's have a look at the port that was being checked when the machine crashed. Typing 'dm CGrafPort' will tell us lots of things about it. KON Hey, that's one of my GWorlds! I recognize its bounds rect. That's funny, I thought I had disposed of it, what's it doing in the port list? BAL Hmm, exactly how did you dispose of it? KON Well, I came up with a super KON kluge. All of my objects are allocated within a custom heap zone created with InitZone. This way I don't need to free individual blocks, I just DisposeHandle the whole zone and I'm done. BAL Yech. KON Oh, it works fine, I never had a single memory leak. BAL Sure, but you can't kill a GWorld this way. It actually releases the memory, but since Quickdraw doesn't know about it, you're left with a stale pointer in the port list. That's why your code crashes. Just call DisposeGWorld properly before zapping your custom heap. KON Oops - nasty. BAL Yeah. -- Francois Pottier pottier@dmi.ens.fr +++++++++++++++++++++++++++ >From Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter) Date: 29 Apr 1994 16:28:23 GMT Organization: Berkeley Systems In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois Pottier) wrote: > KON Well, I came up with a super KON kluge. All of my objects are allocated > within a custom heap zone created with InitZone. This way I don't need to > free individual blocks, I just DisposeHandle the whole zone and I'm done. This is on ok thing to do but you have to be really careful about what get allocated in it. If you are set to the heap and you do font stuff then some font related structures and resources will get loaded into it. When you nuke the heap things get flaky. We just had a problem with with PlotSuiteIcon() calling ReallocHandle() into our heap and when we nuked the heap all the icons on the desktop would go weird. The reason to create a heap like this is not so you don't have to free individual blocks. That is just sloppy programming. We use it for allocating MultiFinder temp mem and turning it into a heap so we can use standard memory manager and resource calls with temp mem. -- Bruce Burkhalter Bruce_Burkhalter@inetlink.berksys.com All opinions are mine. Berkeley Systems Inc. +++++++++++++++++++++++++++ >From dean@genmagic.com (Dean Yu) Date: 29 Apr 1994 18:03:16 GMT Organization: General Magic, Inc. In article , Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter) wrote: > In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois > Pottier) wrote: > > KON Well, I came up with a super KON kluge. All of my objects are allocated > > within a custom heap zone created with InitZone. This way I don't need to > > free individual blocks, I just DisposeHandle the whole zone and I'm done. > > This is on ok thing to do but you have to be really careful about what get > allocated in it. If you are set to the heap and you do font stuff then > some font related structures and resources will get loaded into it. When > ... > > The reason to create a heap like this is not so you don't have to free > individual blocks. That is just sloppy programming. We use it for > allocating MultiFinder temp mem and turning it into a heap so we can use > standard memory manager and resource calls with temp mem. > When the Modern Memory Manager was being developed for Power Macs, about 20% of the time was spent actually coding it, then the rest of the time was spent going back in and adding compatability hacks to keep things that messed around with heaps and blocks working. In the end, it was much less cool than it could have been because too many things broke at first. The biggest headaches were programs that created their own heaps or walked the heaps themselves. If you're going to do either of these things, think long and hard about why and how you're doing it, what kind of assumptions about the structures you're making, and if possible, if there is any other way for you to do what you want to do. -- Dean Yu Negative Ethnic Role Model General Magic, Inc. +++++++++++++++++++++++++++ >From pottier@trimaran.ens.fr (Francois Pottier) Date: 30 Apr 1994 11:49:07 GMT Organization: Ecole Normale Superieure, PARIS, France In article , Dean Yu wrote: >> > KON Well, I came up with a super KON kluge. All of my objects are allocated >> > within a custom heap zone created with InitZone. This way I don't need to >> > free individual blocks, I just DisposeHandle the whole zone and I'm done. >> The reason to create a heap like this is not so you don't have to free >> individual blocks. That is just sloppy programming. We use it for >> allocating MultiFinder temp mem and turning it into a heap so we can use >> standard memory manager and resource calls with temp mem. > >If you're going to do either of these things, think long >and hard about why and how you're doing it, what kind of assumptions about >the structures you're making, and if possible, if there is any other way >for you to do what you want to do. I know, and I have thought long and hard about it. My problem is the same as Bruce's : trying to make temporary memory behave the same way as normal memory. I tried to think of other ways. For instance, since GetResource won't let you read a resource into temp mem, I figured I could create a block with TempNewHandle and then read into it with ReadPartialResource. This should work. But I have another problem: the resource I want to load is a Quicktime compressed picture. Then I need to draw that picture. But Quicktime needs a lot of temporary storage for decompression, and apparently takes it from the current heap. So if the current heap is the System heap, or my own application heap, Quicktime runs out of memory and blows everything out of the water. That's why I had to create a heap in temporary memory. I also thought of patching NewHandle of NewPtr in order to force Quicktime to use temp mem, but then I thought it was even skankier than creating my own zone. If you have any ideas about that problem, I'd be really really glad to hear about them. Thanks... -- Francois Pottier pottier@dmi.ens.fr +++++++++++++++++++++++++++ >From slavins@psy.man.ac.uk (Simon Slavin) Date: 30 Apr 94 13:19:15 GMT Organization: Psychology Department, University of Manchester, England, UK In article b0m@nef.ens.fr, pottier@goelette.ens.fr (Francois Pottier) writes: > >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the > real KON & BAL...] Send it in ! develop will probably love it, and may publish it as a warning to treat memory allocation for the managers with care. They'll especially like the way you used a de-bugger to figure out what was wrong. Actually, KON reads this group (very rarely) so he may see it. (KON co-wrote wonderprint, based on a column in an early develop.) Glad you found you bug. Simon. - - < "So I told her a couple of white lies, like I have friends and a life ..." > < - _Cheers_ A sub-Turing machine, and proud of it: slavins@psy.man.ac.uk > +++++++++++++++++++++++++++ >From Reid Ellis Date: Mon, 2 May 1994 23:22:57 GMT Organization: Alias Research, Inc., Toronto ON Canada dean@genmagic.com (Dean Yu) writes: | When the Modern Memory Manager was being developed for Power Macs, about |20% of the time was spent actually coding it, then the rest of the time was |spent going back in and adding compatability hacks to keep things that |messed around with heaps and blocks working. Why weren't new memory manager calls created that didn't do the backwards-compatability hacks? Then we could start using the new routines, and everyone's new apps are mondo cool. We could even call it "Memory Manager GX"! :-)/2 Reid -- - - Reid Ellis, Alias Research Inc. +1 416 362 9181 +++++++++++++++++++++++++++ >From 103t_english@west.cscwc.pima.edu Date: 3 May 94 15:13:05 MST Organization: (none) In article <1994May2.232257.26544@alias.com>, Reid Ellis writes: > dean@genmagic.com (Dean Yu) writes: > | When the Modern Memory Manager was being developed for Power Macs, about > |20% of the time was spent actually coding it, then the rest of the time was > |spent going back in and adding compatability hacks to keep things that > |messed around with heaps and blocks working. > > Why weren't new memory manager calls created that didn't do the > backwards-compatability hacks? Then we could start using the new > routines, and everyone's new apps are mondo cool. We could even call > it "Memory Manager GX"! :-)/2 > > Reid > > -- > --- > Reid Ellis, Alias Research Inc. > +1 416 362 9181 Great minds and all that... The could even have supplied New_and_Improved API's for it and started advanced notice on what will be required for protected memory and pre-emptive multi-tasking... Lawson +++++++++++++++++++++++++++ >From dwareing@apanix.apana.org.au (David Wareing) Date: 2 May 94 15:53:15 GMT Organization: Apanix Public Access Unix, +61 8 373 5485 (5 lines) pottier@goelette.ens.fr (Francois Pottier) writes: >I had a hell of a debugging session last night... I had to single-step >through the Palette Manager in order to understand what was wrong with my >code. After solving the problem I thought the story was amusing, so I turned >it into a KON & BAL Puzzle Page. Here it is. I hope you like it... >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the > real KON & BAL...] This is the first time I've ever solved one of KON & BAL'S puzzles :-) Does anyone else feel like a complete moron and utterly humiliated, after reading one of their puzzles? :) BTW, Francois - some nice tracing you did there. I would have scrapped any 5 or 6 routines at random, rewrote them and see how it worked :) -- David Wareing Adelaide, South Australia Mac Games & Multimedia Development dwareing@apanix.apana.org.au - -------------------------------------------------------------------- +++++++++++++++++++++++++++ >From sparent@mv.us.adobe.com (Sean Parent) Date: Wed, 4 May 1994 19:14:53 GMT Organization: Adobe Systems Incorporated In article <1994May2.232257.26544@alias.com>, Reid Ellis wrote: > Why weren't new memory manager calls created that didn't do the > backwards-compatability hacks? Then we could start using the new > routines, and everyone's new apps are mondo cool. We could even call > it "Memory Manager GX"! :-)/2 Because the heaps have different structures so the system would have to have a third set of calls that knew what to do with each heap slowing down the new mondo cool applications even more (and much of the speed win is coming from calls made within the system heap)! Your app would have to be very very careful about not making new calls on the system or process manager heaps. There where a couple of compatibility hacks where a shadow API would have been useful but not enough to worry about. -- Sean Parent +++++++++++++++++++++++++++ >From u9119523@sys.uea.ac.uk (Graham Cox) Date: Thu, 5 May 1994 17:20:20 GMT Organization: School of Information Systems, UEA, Norwich In article , dwareing@apanix.apana.org.au (David Wareing) wrote: > This is the first time I've ever solved one of KON & BAL'S puzzles :-) > Does anyone else feel like a complete moron and utterly humiliated, after > reading one of their puzzles? > Nope- I feel glad that I have a life, whereas those two obviously don't in spite of the fact I'm stuck in rainy old England while they live in Cal... - ------------------------------------------------------------------------ Love & BSWK, Graham -Everyone is entitled to their opinion, no matter how wrong they may be... - ------------------------------------------------------------------------ --------------------------- >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) Subject: Absoft C++ Date: 05 May 1994 12:45:53 GMT Organization: L'AISON - Beverly Hills, Michigan Jess M Holle (jess@ecn.purdue.edu) asks: > When does the C/C++ Absoft PPC compiler ship? > Does it run only under MPW? > Does it have templates, exceptions, namespaces, RTTI, etc? > What's optimization going to be like as compared to Apple SDK, > CodeWarrior, and Symantec's Cross-compiler? - The compiler will ship in July. - Yes, so far we are targetting it as an MPW Tool. We may study other possibilities; no immediate plans to change though. As for the features list, bear in mind that I am speaking unofficially a couple of months before the product is released--things might change before then (or even before I'm done typing these notes!): - Exceptions: Probably not. - Namespaces: No. - RTTI: No. - Optimizations include but are not limited to: Sophisticated register allocation, working inliner, common sub-expression removal, dead store removal, code scheduling, loop invariant removal, loop unrolling, etc. In a nutshell, I can say we'll be able to do mostly the same optimizations that we do with our FORTRAN compilers. As for comparing it to Apple, Symantec, and other products, it's a bit premature for that. Maybe as we get through beta testing and closer to release, we'll have some basis for comparisons. If you have any other technical questions, feel free to contact me; either in the newsgroup or directly at "support@absoft.com". Thanks for your interest. Lee David Rimar Absoft Technical Support (support@absoft.com, not the address in the message header) DISCLAIMER: Any opinions you find in this text are probably mine, but you're welcome to share them. +++++++++++++++++++++++++++ >From rmah@panix.com (Robert S. Mah) Date: Fri, 06 May 1994 03:19:40 -0500 Organization: One Step Beyond Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote: > - The compiler [Absoft C/C++] will ship in July. > [...] > - Exceptions: Probably not. > - Namespaces: No. > - RTTI: No. > - Optimizations include but are not limited to: Sophisticated > register allocation, working inliner, common sub-expression removal, > [...] Thanks for the info... How about templates? Level of segmentation support? Inline assembly (68K and PPC)? Will it generate both 68K and PPC code? What provisions are there for creating code resources (e.g. WDEF's and CDEF's)? Cheers, Rob ___________________________________________________________________________ Robert S. Mah -=- One Step Beyond -=- 212-947-6507 -=- rmah@panix.com --------------------------- >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) Subject: Absoft on Power Mac Date: 02 May 1994 15:11:22 GMT Organization: L'AISON - Beverly Hills, Michigan Steve Ebstein (sebstein@netcom.com) asks: > Has Absoft's PowerPC native compiler shipped? > Do you have any benchmark info comparing the > native compiler with the 68K versions ? Yes and Yes. We starting shipping last week, and in general we run between 4 to 8 times faster than a 68040. It's hard to get more detailed than that, because it depends a lot on specific machine configurations and the kind of programs you're running. But that "4 to 8 times faster" comment is based on comparing Whetstone and Linpack benchmarks on a couple of systems we have here; a Power Mac 7100/66 and a Centris 650. Whetstone was about 4x faster on the Power Mac; Linpack about 8x. Remember: Your actual mileage may vary. Lee D. Rimar support@absoft.com Disclaimer: Anything resembling an opinion probably is just that. +++++++++++++++++++++++++++ >From rmah@panix.com (Robert S. Mah) Date: Tue, 03 May 1994 02:15:57 -0500 Organization: One Step Beyond Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote: > Yes and Yes. We starting shipping last week, and in general we > run between 4 to 8 times faster than a 68040. It's hard to get > more detailed than that, because it depends a lot on specific > machine configurations and the kind of programs you're running. So, could you give us a bit more info about the Absoft compiler? The level of ANSI conformance, environment support (I assume it needs MPW?), retail price, etc. Cheers, Rob ___________________________________________________________________________ Robert S. Mah -=- One Step Beyond -=- 212-947-6507 -=- rmah@panix.com +++++++++++++++++++++++++++ >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) Subject: Absoft on Power Mac Date: 05 May 1994 12:45:36 GMT Organization: L'AISON - Beverly Hills, Michigan Robert S. Mah (rmah@panix.com) asks: > Could you give us a bit more info about the Absoft compiler? The > level of ANSI conformance, environment support (I assume it needs > MPW?), retail price, etc. I'd be glad to give you more info. A little disclaimer up front though: I know many people are (justifiably) sensitive to any post that is even remotely "commercial" sounding, and my responses to your questions will probably qualify (especially since you asked the price). But you *did* ask, so here I go... - The compiler is a full ANSI X3.9-1978 implementation, plus it offers lots of extensions (a good subset of VAX extensions, mostly). - Environment support: Yes, this is an MPW tool. We provide our own linker and debugger, but for editting, compiler control, etc., you use MPW. Actually, I've played around with BBEdit and ToolServer, it works okay; and I'm told there are other text editors with AppleEvent and ToolServer support--so I suppose if you really *hated* MPW you could avoid using it. But personally, I like MPW. - Retail price is $699, but there are good introductory offers going on now. You should contact our sales department at 313-853-0050 for more details. If you have other questions, feel free to ask (either in the newsgroup, or write to me direct at "support@absoft.com"). Thanks for your interest. Lee D. Rimar Absoft Technical Support (support@absoft.com, not the address in the message header) DISCLAIMER: Any opinions in this text are probably mine, but I don't know if anyone agrees with me. --------------------------- >From parkb@bigbang.Stanford.EDU (Brian Park) Subject: Another BlockMove question Date: 2 May 1994 17:48:35 GMT Organization: Stanford University Robert S. Mah wrote: >It's not supposed to move memory. The only problems that could occur >is if someone patches BlockMove and the patch moves memory. Thanks, something I've wondered myself. Here's related question: Which is more efficient, BlockMove() or standard ANSI memmove() (coded in 680x0 assembly, both running on a 680x0 machine)? Is the difference great enough that I should care at all? I realize that memmove() will usually be in another segment, so you have lock the handle because the Segment Manager will move memory (took me a little while to catch that bug...). BlockMove() flushes the cache, so how much penalty is that? Does BlockMove() move one byte at a time, or does it try to optimize by moving words or long words? Brian Park +++++++++++++++++++++++++++ >From jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~}) Date: 2 May 1994 20:50:27 GMT Organization: University of California, Berkeley In article <2q3edj$p56@nntp2.stanford.edu>, Brian Park wrote: > >Which is more efficient, BlockMove() or standard ANSI memmove() >(coded in 680x0 assembly, both running on a 680x0 machine)? Is the I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C 5.0. The result shows that BlockMove() is MUCH faster than memcpy(). I don't have the numbers with me right now. I think BlockMove() is almost twice as fast as memcpy(). I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160. Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM. -- Jiang +++++++++++++++++++++++++++ >From jwbaxter@olympus.net (John W. Baxter) Date: Mon, 02 May 1994 15:09:33 -0700 Organization: Internet for the Olympic Peninsula In article <2q3edj$p56@nntp2.Stanford.EDU>, parkb@bigbang.Stanford.EDU (Brian Park) wrote: > Robert S. Mah wrote: > >It's not supposed to move memory. The only problems that could occur > >is if someone patches BlockMove and the patch moves memory. > > Thanks, something I've wondered myself. Here's related question: > > Which is more efficient, BlockMove() or standard ANSI memmove() > (coded in 680x0 assembly, both running on a 680x0 machine)? Only testing will tell you for sure, and then only for the Mac models you test on. I'd expect that BlockMove () would be better. [BlockMoveData (), in fact, if there's no chance that what you are moving might be code, since BlockMoveData () doesn't flush the '40 instruction cache, only the data cache.] BlockMove does pretty well about moving memory in chunks, rather than byte at a time. Either way will perform better if the data are aligned well, particularly BlockMove (). If the data are in handles, they are aligned well. In addition to moving in multi-byte chunks where possible, BlockMove () has the advantage of being coded for the particular machine it's running on (including PowerPC), whereas memmove () in a library is probably optimized for only a particular member of the 680x0 family (and likely an old one like an '020 at that). -- John Baxter Port Ludlow, WA, USA [West shore, Puget Sound] jwbaxter@pt.olympus.net +++++++++++++++++++++++++++ >From MorrisGC@ccmail.apldbio.com (George Morris) Date: 2 May 94 23:30:02 GMT Organization: Perkin Elmer, Applied Biosystems Div. In article <2q3p2j$pt7@agate.berkeley.edu>, jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~}) wrote: > In article <2q3edj$p56@nntp2.stanford.edu>, > Brian Park wrote: > > > >Which is more efficient, BlockMove() or standard ANSI memmove() > >(coded in 680x0 assembly, both running on a 680x0 machine)? Is the > > I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C > 5.0. The result shows that BlockMove() is MUCH faster than memcpy(). > I don't have the numbers with me right now. I think BlockMove() is > almost twice as fast as memcpy(). > > I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160. > Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM. > > -- Jiang Be careful! When you say MUCH faster, what was your block size during the tests? BlockMove is more efficient but incurs the overhead of a trap call. A colleague at a previous company did some investiagtion into this and found that for moves less than about 600 bytes (on a MacIIfx, MPW compiler & linker) memcpy was faster because there was no trap call overhead. I'm not sure where the point will fall on todays systems but a IIfx is probably above the median in performance of installed Macs and a good general benchmark. George Morris Applied Biosystems +++++++++++++++++++++++++++ >From rmah@panix.com (Robert S. Mah) Date: Mon, 02 May 1994 19:18:45 -0500 Organization: One Step Beyond parkb@bigbang.Stanford.EDU (Brian Park) wrote: > Robert S. Mah wrote: > >It's not supposed to move memory. The only problems that could occur > >is if someone patches BlockMove and the patch moves memory. > > Thanks, something I've wondered myself. Here's related question: > > Which is more efficient, BlockMove() or standard ANSI memmove() > (coded in 680x0 assembly, both running on a 680x0 machine)? Is the > difference great enough that I should care at all? I realize that > [...] Because of various factors such as trap dispatcher and cache flushing BlockMove is usually only faster when used with large blocks. memmove() and memcpy() are often faster if you're dealing with small blocks. How large is "large" and how small is "small"? It depends on the machine, block alignment, whether it's executable code or not, etc. I personally use the rule of thumb that if I'm moving 256 bytes or less I use use my own memory moving routine (similar to memmove) and if it's over 1024 bytes, I use BlockMove. Things in between depend on my mood. Cheers, Rob ___________________________________________________________________________ Robert S. Mah -=- One Step Beyond -=- 212-947-6507 -=- rmah@panix.com +++++++++++++++++++++++++++ >From sgl1@kimbark.uchicago.edu (Steven Lane) Date: Mon, 2 May 1994 23:49:40 GMT Organization: University of Chicago jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~}) writes: >In article <2q3edj$p56@nntp2.stanford.edu>, >Brian Park wrote: >> >>Which is more efficient, BlockMove() or standard ANSI memmove() >>(coded in 680x0 assembly, both running on a 680x0 machine)? Is the > >I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C >5.0. The result shows that BlockMove() is MUCH faster than memcpy(). >I don't have the numbers with me right now. I think BlockMove() is >almost twice as fast as memcpy(). I can confirm this for my own attempts to write a byte-copying routine that would do short string copies faster than BlockMove. The break-even point was around 20 characters. My assembly loop's execution time rose *much* more rapidly than BlockMove's, which (in my pretty extensive tests) had a very low time/block-size slope. BlockMove, in other words, is pretty darn efficient. -- - -- Steve Lane University of Chicago, Department of History sgl1@midway.uchicago.edu +++++++++++++++++++++++++++ >From rang@winternet.mpls.mn.us (Anton Rang) Date: 02 May 1994 23:04:17 GMT Organization: Minnesota Angsters In article <2q3edj$p56@nntp2.Stanford.EDU> parkb@bigbang.Stanford.EDU (Brian Park) writes: >Which is more efficient, BlockMove() or standard ANSI memmove() >(coded in 680x0 assembly, both running on a 680x0 machine)? Depends on how much data you're transferring. Against a fairly simple memory-move replacement I wrote, BlockMove was faster on chunks of data bigger than 200-300 bytes or so; my routine was faster on smaller chunks. >Is the difference great enough that I should care at all? Is this happening in an inner loop somewhere? Does your profiler say that BlockMove() or memmove() is a bottleneck? If not, why worry about it? >BlockMove() flushes the cache, so how much penalty is that? Can be quite a bit in a big loop, or on an '040. Use the new BlockMoveData() routine (aka "BlockMove with an extra bit set") if you don't want the cache to be flushed on newer systems. (Built in on the Power Macintoshes, supposed to be included in a new system release for older machines.) >Does BlockMove() move one byte at a time, or does it >try to optimize by moving words or long words? It may use move.b, move.w, move.l, or move16, depending on what processor you're on and what the alignment is. (I'm not sure whether the current '040 BlockMove tries to use move16 or not...but it could.) It's got some fairly large unrolled loops and various tricks to make the last few bytes get transferred quickly. Beating it for large transfers could probably be done, but most likely isn't worth it. For small transfers, the trap dispatcher overhead (plus cache flush) can be pretty expensive. It also makes a difference if the area of memory you're moving is VM-locked or not, but unless you're doing drivers, you probably don't need to worry about it. -- Anton Rang (rang@winternet.mpls.mn.us) +++++++++++++++++++++++++++ >From Bruce@hoult.actrix.gen.nz (Bruce Hoult) Date: Tue, 3 May 1994 17:17:30 +1200 (NZST) Organization: (none) parkb@bigbang.Stanford.EDU (Brian Park) writes: > Which is more efficient, BlockMove() or standard ANSI memmove() > (coded in 680x0 assembly, both running on a 680x0 machine)? Is the > difference great enough that I should care at all? For really small blocks (like 10 bytes or smaller), memcpy or memmove (always use memcpy if you're sure the memory areas don't overlap -- it's faster) are much faster than BlockMove. For really big blocks (like a few KB or bigger), BlockMove is much faster. For blocks in between: test on your own machine, the tradeoff point moves. > Does BlockMove() move one byte at a time, or does it > try to optimize by moving words or long words? On most machines, it trys to use long words. On 68040 machines it trys to use the MOVE16 instruction, which speeds things up by 50% over a byte, word, or longword move -- on 040's a memory move is essentially memory bandwidth limited (on my Q700, anyway) and byte, word and longword copying loops are all the same speed, but MOVE16 is faster. This is because of the cache. Suppose you execute MOVE.L (AO),(A1) where the memory pointed to by both A0 and A1 is different and not in cache. It goes like this (only on an '040): 1) read the 16 bytes around (A0) 2) read the 16 bytes around (A1) 3) modify the appropriate longword in the cache line 4) (eventually) write the 16 bytes around (A1) As you can see, that requires three memory transactions for each 16 bytes copied. When you use MOVE16, the CPU knows that you're going to modify all 16 bytes in a cache line, and so it doesn't need to read them from memory before changing them, resulting in a 50% speedup. -- Bruce +++++++++++++++++++++++++++ >From bdiamand@netcom.com (Ben Diamand) Date: Tue, 3 May 1994 17:50:27 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) Just to add my 2 cents, I once wrote an asm BlockMove like routine that knew about my machine(Se/30) and messed with the CACR. I was unable to *beat* BlockMove consistantly. I was faster on non-aligned data, and it was faster on %4/%16 data, but only by a real small amount either way. What does this mean? I don't have a clue, but I use NGetTrapAddress, and always use BlockMove, having proved to myself that It was useless to roll my own, considering that I would have to most likely re-write it for each new chip. For the same reason, I would suspect that a library routine would not be optimized for all chips. Ben Diamand bdiamand@netcom.com ALINK:bdiamand +++++++++++++++++++++++++++ >From Ron_Hunsinger@bmug.org (Ron Hunsinger) Date: Fri, 6 May 94 07:41:37 PST Organization: Berkeley Macintosh Users Group > Robert S. Mah wrote: > >It's not supposed to move memory. The only problems that could occur > >is if someone patches BlockMove and the patch moves memory. This kind of error would be immediately apparent, since the memory manager moves memory by calling BlockMove. > Thanks, something I've wondered myself. Here's related question: > > Which is more efficient, BlockMove() or standard ANSI memmove() > (coded in 680x0 assembly, both running on a 680x0 machine)? Is the > difference great enough that I should care at all? I realize that > [...] If you've ever disassembled BlockMove(), you'll see that it's optimized to within an inch of its life. Even with the trap dispatch overhead, it's pretty hard to beat. On anything bigger than 10 or 20 bytes, the only thing that is likely to beat BlockMove would be BlockMove minus the trap dispatch code. (Call NGetTrapAddress, and then write your own routine that jumps directly to that address without trapping. That's what the Memory Manager does, but Apple doesn't recommend it for us mere mortals. Of course, the ROM knows how to do NGetTrapAddress on the fly without calling NGetTrapAddress.) memmove() is more interested in portability than speed. I doubt that it can beat BlockMove(), even on very short blocks and even despite the trap dispatch overhead. -Ron Hunsinger --------------------------- >From mars@netcom.com (Darren Giles) Subject: Async Disk Access Date: Wed, 4 May 1994 04:26:15 GMT Organization: Netcom Online Communications Services (408-241-9760 login: guest) This may be hopeless, but is there any way to do an async read from a volume while QuickDraw activity is going on? I'm trying to read from a CD-ROM volume while doing CopyBits and such. I'd like to make it "real" async operation, so I can continue getting events, etc... but I'm willing to try anything. I don't even need a notification on completion; I can just poll the last byte of the buffer. Is there any way to do this? With the new SCSI Manager & all, I'm keeping my fingers crossed. - Darren "no nickname" Giles - wishing the async versions of the routines really worked! +++++++++++++++++++++++++++ >From rang@winternet.mpls.mn.us (Anton Rang) Date: 04 May 1994 13:07:14 GMT Organization: Minnesota Angsters In article mars@netcom.com (Darren Giles) writes: >This may be hopeless, but is there any way to do an async read from a >volume while QuickDraw activity is going on? I'm trying to read >from a CD-ROM volume while doing CopyBits and such. Sure. Just call _Read with the asynchronous bit of the trap set. You'll get a call through IOCompletion when it finishes, or you can test the IOResult field of the parameter block. (Don't poll the buffer, you never know for sure what might come into it, and there's no guarantee that it's being filled in the order you expected.) >Is there any way to do this? With the new SCSI Manager & all, I'm >keeping my fingers crossed. As you noted, the new SCSI manager will let this happen, assuming that the driver you're using supports it. (Offhand, I don't know whether Apple's current CD drivers do or not.) If you're on a machine with the old SCSI manager, you're out of luck (unless you're using a third-party SCSI card or something similar). -- Anton Rang (rang@winternet.mpls.mn.us) +++++++++++++++++++++++++++ >From kluev@jonathan.srcc.msu.su (Kluev) Date: Fri, 6 May 94 14:54:31 +0400 Organization: (none) In article mars@netcom.com (Darren Giles) wrote: > This may be hopeless, but is there any way to do an async read from a > volume while QuickDraw activity is going on? I'm trying to read > from a CD-ROM volume while doing CopyBits and such. > > I'd like to make it "real" async operation, so I can continue getting > events, etc... but I'm willing to try anything. I don't even need > a notification on completion; I can just poll the last byte of the > buffer. > > Is there any way to do this? With the new SCSI Manager & all, I'm > keeping my fingers crossed. You can do a sort of this even with old SCSI Manager (in genaral with any device driver). The key idea is to read small chunks of data in paralel to other activity, thus it would be pseudo-concurency. Read Read Read... Draw Draw... 1. One way is to install VblTask (or whatever), read small chunk of data from inside it, poll ioResult whithin next VblTask, if there is noErr read next chunk, and so on. By varying chunk size and VblCount parameters you will be able to set the speed of file operations. 2. The alternate way is to use "call chaining", i.e. read a small chunk of data with completion set, issue another read call from inside completion and so on. This method lacks of adjusting of speed (see above). Moreover sometimes it would crash your computer, because "the first read terminated immediatly -> first completion called -> second call issued -> it terminated immediatly -> second compl called (on top of the first one: StackSpace decreased), and ever and ever..". So your stack will grow into your heap = crash. See Develop 15. 3. You may combine the first and the second method: read -> completion-> VInstall (or whatever, will break completion chain) -> VblTask -> read... But this is a bit more complicated, I recommend to use the latter approach if the speed is really critical. See details about async. routines in Develop 13, 15. Michael Kluev. --------------------------- >From ggrant@Emerald.tufts.edu (G. Grant) Subject: ExtFS Development Date: Fri, 29 Apr 1994 17:46:04 GMT Organization: Tufts University - Medford, MA The "Apple External File System docs" write: >"Our reccomendation at this point is against writing an external file > system if there is any way to avoid it..." The gods have spoken! Funny; I didn't think the ExtFS stuff would be taboo, especially since it has such a nice icon! :) Ah, well, on to the next project, I guess... -George +++++++++++++++++++++++++++ >From tzs@u.washington.edu (Tim Smith) Date: 1 May 1994 06:09:50 GMT Organization: University of Washington School of Law, Class of '95 Amanda Walker wrote: >> Can someone point me to documentation on how to develop an External >> File System extension? I just couldn't seem to find the right tome... > >It doesn't exist. And unless someone is paying you a *lot* of money, >you don't want to write an external file system. It most certainly does exist. It's called "FST Cookbook". It even comes with a diskette containing sample code. My copy is beta 1988. I don't recall them ever coming out with a final version, so it may be hard to track down, unless the first poster knows a developer who happened to get a copy back then. (Nope, mine is not for sale). --Tim Smith +++++++++++++++++++++++++++ >From Gavin@UMich.EDU (Gavin Eadie) Date: Mon, 02 May 1994 10:42:55 -0400 Organization: Ramsay Consulting In article <2pvh3e$hq4@news.u.washington.edu>, tzs@u.washington.edu (Tim Smith) wrote: > Amanda Walker wrote: > >> Can someone point me to documentation on how to develop an External > >> File System extension? I just couldn't seem to find the right tome... > > > >It doesn't exist. And unless someone is paying you a *lot* of money, > >you don't want to write an external file system. > > It most certainly does exist. It's called "FST Cookbook". It even comes > with a diskette containing sample code. My copy is beta 1988. Nonetheless, what Amanda says is correct -- "you don't want to write an external file system", I know, I've been there too and it's not fun. There was a presentation on a File System Manager at the WWDC two (three?) years ago which looked like a rational alternative but I've not seem it show up over the horizon yet ... Gav +++++++++++++++++++++++++++ >From jumplong@aol.com (Jump Long) Date: 3 May 1994 15:22:02 -0400 Organization: America Online, Inc. (1-800-827-6364) In article <9404281622.AA30631@fusion.intercon.com>, amanda@intercon.com (Amanda Walker) writes: >ggrant@Emerald.tufts.edu (G. Grant) writes: >> Can someone point me to documentation on how to develop an External >> File System extension? I just couldn't seem to find the right tome... > >It doesn't exist. And unless someone is paying you a *lot* of money, >you don't want to write an external file system. I'll agree that writing a foreign file system isn't an easy task - you can expect to spend a minimum of several months on a simple read-only file system. However... Since I've spent many hours over the last year working on it, the "It doesn't exist" statement is wrong. At last year's WWDC (1993), Apple (re)announced work on the File System Manager (known as FSM). Since it was announced publicly at the WWDC, FSM isn't secret information. To prove how real it is, Apple currently ships two foreign file systems based on FSM: the ProDOS File System (part of the software that comes with the Apple IIe Card for the Macintosh LC) and Macintosh PC Exchange. At this time, only Developers in Apple's Partner's program have been seeded with beta versions of FSM and draft documentation (if you aren't in the Partner's program, don't ask for FSM because you WON'T get it until it ships to all developers). I'm working on a sample foreign file system but it may not be available in complete working condition for some time (hey, I said it can take months and I'm only able to work on it part time). -- Jim Luther (one of those Apple DTS types) P.S. Amanda Walker: InterCon Systems has been sent the FSM seed package (I don't remember who I sent it to though). +++++++++++++++++++++++++++ >From quinn@cs.uwa.edu.au (Quinn "The Eskimo!") Date: Thu, 05 May 1994 10:06:15 +0800 Organization: Department of Computer Science, The University of Western Australia In article <2q688q$6s1@search01.news.aol.com>, jumplong@aol.com (Jump Long) wrote: >At this time, only Developers in Apple's Partner's program have been seeded >with beta versions of FSM and draft documentation [...] Which begs the question... Why? Lots of other beta managers make it out to 'normal' developers. -- Quinn "The Eskimo!" "Support HAVOC!" Department of Computer Science, The University of Western Australia +++++++++++++++++++++++++++ >From amanda@intercon.com (Amanda Walker) Date: Thu, 5 May 1994 16:21:40 -0500 Organization: InterCon Systems Corporation, Herndon, VA USA jumplong@aol.com (Jump Long) writes: > Since I've spent many hours over the last year working on it, the "It does > n't exist" statement is wrong. At last year's WWDC (1993), Apple (re) > announced work on the File System Manager (known as FSM). Yup. Of course, it's been on-again/off-again since BEFORE SYSTEM 7 WENT ALPHA, so please excuse my skepticism about whether or not Apple "really means it" this time :). > At this time, only Developers in Apple's Partner's program have > been seeded with beta versions of FSM and draft documentation (if > you aren't in the Partner's program, don't ask for FSM because you > WON'T get it until it ships to all developers). We're a partner, we've got the draft docs, and we're sticking with ExtFSHook since the FSM is not sufficient for our needs, and offers no benefits over doing it the "hard way". Now, to be sure, the FSM will be useful for many developers, especially those trying to talk to physical devices instead of network servers (note that AppleShare doesn't use the FSM either, and won't be able to unless the FSM is revved severely). It's not a general File System Manager, but I'll grant that if and when it's released it'll be useful to many developers. Amanda Walker InterCon Systems Corporation +++++++++++++++++++++++++++ >From jumplong@aol.com (Jump Long) Date: 6 May 1994 01:51:03 -0400 Organization: America Online, Inc. (1-800-827-6364) In article , quinn@cs.uwa.edu.au (Quinn "The Eskimo!") writes: >>At this time, only Developers in Apple's Partner's program have been seeded >>with beta versions of FSM and draft documentation [...] > >Which begs the question... Why? Lots of other beta managers make it out >to 'normal' developers. Why? Until a little over a month ago, all we had to send to developers with FSM was an out-of-date ERS that didn't cover all of FSM and what it did cover had lots of mistakes. With just the ERS, we expected (and received from seeded developers) *lots* of questions that good documentation and sample code would prevent. Since Developer Support only takes questions from developers in the Partners program, we didn't want to give a product with no documentation to everyone. OK, so the draft documentation is written so why are we waiting? Because I'm on sabbatical and don't feel like working of Apple business until I have to :-) - Jim Luther +++++++++++++++++++++++++++ >From jumplong@aol.com (Jump Long) Date: 6 May 1994 02:07:02 -0400 Organization: America Online, Inc. (1-800-827-6364) In article <9405051621.AA40138@fusion.intercon.com>, amanda@intercon.com (Amanda Walker) writes: >We're a partner, we've got the draft docs, and we're sticking with ExtFSHook >since the FSM is not sufficient for our needs, and offers no benefits over >doing it the "hard way". I'll agree that if you already have a working foreign file system that hangs off the ToExtFS hook, you have little reason to rewrite your file system using FSM. Apple doesn't have plans to rewrite our non-FSM based forign file system like AppleShare, High Sierra, ISO 9660, etc using FSM because they work OK with the current File Manager (we, like you, don't have time to fix what isn't broke). >Now, to be sure, the FSM will be useful for many >developers, especially those trying to talk to physical devices instead of >network servers (note that AppleShare doesn't use the FSM either, and won't be >able to unless the FSM is revved severely). It's not a general File System >Manager, but I'll grant that if and when it's released it'll be useful to many >developers. AppleShare could be written using FSM. FSM is *not* limited to file systems that use only local physical devices. Amanda, I don't know why you think it has to be revised. We've done a lot of extra work to make sure FSM and the rest of the file system related managers support calls like VolumeMount just to make it easier. If you want a more complete explanation of this, send me a Link at DEVSUPPORT next week (when I'm back from sabbatical) and I'll be glad to discuss this with you. - Jim Luther +++++++++++++++++++++++++++ >From amanda@intercon.com (Amanda Walker) Date: Fri, 6 May 1994 14:14:32 -0500 Organization: InterCon Systems Corporation, Herndon, VA USA jumplong@aol.com (Jump Long) writes: > AppleShare could be written using FSM. FSM is *not* limited to > file systems that use only local physical devices. Hmm. Perhaps I should rephrase this. You are correct in that it is not limited to physical devices--my impression, though, is still that this is where it will be most useful. > Amanda, I don't know why you think it has to be revised. I'm not sure I can respond to this on the net without breaking my NDA... :) > If you want a > more complete explanation of this, send me a Link at DEVSUPPORT next > week (when I'm back from sabbatical) and I'll be glad to discuss this > with you. I'll try and write up our comments an impressions. We'll also be at the file system sessions at the WWDC; I'll try to have comments there as well. Also, I'm sorry if I gave the impression that we don't appreciate the FSM and the work that has gone into it. Far otherwise. Even if we don't use it for NFS/Share (which is admittedly an extreme case as far as XFS's go :)), it's still an incredible improvement over rolling your own completely from scratch. I hope it actually ships this time :). Any word on the B-Tree Manager? (another thing that was originally planned for System 7...) Amanda Walker InterCon Systems Corporation --------------------------- >From adamnash@Xenon.Stanford.EDU (Adam Nash) Subject: Help w- PPC and Time Tasks Date: 6 May 1994 03:59:42 GMT Organization: Computer Science Department, Stanford University. Well, I'm making the jump to PPC with my previously unreleased animation library. I've run into one small problem. I use a Time Manager task to keep my animation running at the same speed on different machines. However, my previous Time Task was a VERY simple bit of assembly, and now I need to know what to do to get it to work, in C, on the PPC. I'm using MW CodeWarrior Gold. Basically, I have a structure declared as such: struct myTimeTask { TMTask theTask; Boolean isTime; }; I would then set the Boolean to false, and check it every loop. My time task just set it to true. In THINK C, it looked like this: void pascal PixieTimer(void) { // on entry a pointer to our time task is in A1 // TR 2.0 reference asm { move.b #true, PixieTimeTask.isTime(A1) } } So, will some brave soul out there explain to me what I need to do to 1) put this into C 2) deal w/ all the UPP stuff? Thanx, Adam +++++++++++++++++++++++++++ >From zstern@adobe.com (Zalman Stern) Date: Fri, 6 May 1994 08:16:55 GMT Organization: Adobe Systems Incorporated Adam Nash writes [Deleted.] > So, will some brave soul out there explain to me what I need to do to > 1) put this into C > 2) deal w/ all the UPP stuff? #ifdef __powerc void PixelTimer(TMTask *theTask) { struct myTimeTask *myTask = (struct myTimeTask *)theTask; myTask->isTime = true; } RoutineDescriptor PixelTimerRDS = BUILD_ROUTINE_DESCRIPTOR(uppTimerProcInfo, &PixelTimer); #define PixelTimerRD (&PixelTimerRDS) #else /* 68K code from above. */ #define PixelTimerRD (&PixelTimer) #endif /* Somewhere else in your code. */ myTask.tmAddr = PixelTimerRD; -- Zalman Stern zalman@adobe.com (415) 962 3824 Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900 There is no lust like the present. +++++++++++++++++++++++++++ >From jberry@teleport.com (James D. Berry) Date: Fri, 06 May 1994 08:58:15 -0700 Organization: Consultant In article <2qcfbe$3dv@Times.Stanford.EDU>, adamnash@Xenon.Stanford.EDU (Adam Nash) wrote: > I would then set the Boolean to false, and check it every loop. My time > task just set it to true. In THINK C, it looked like this: If this is really all you need to do (and you can be assurred of the extended time manager; a good bet these days), then you don't need to bother with the assembly portion at all. The time manager will set bit 15 of the qType field in the tmTask when you call PrimeTime, and clear it when the time period expires (it is also cleared when you call InsTime or InsXTime). So don't bother with the call-back or UPPs or any of that nonesense -- the time manager is already doing for you essentially what you have been redundantly doing in your callback. This is documented in late time manager documentation (don't trust me on the exact details!). -- James Berry jberry@teleport.com --------------------------- >From dlb@netcom.com (David Beauchesne) Subject: How To Detect Screen Saver Date: Thu, 5 May 1994 18:17:30 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) How can you detect (programmatically) that a screen saver, such as After Dark, has become activated? It doesn't seem to send a suspend event or anything. Any help would be appreciated. TIA -- David L. Beauchesne dlb@netcom.com Santa Cruz, California, USA +++++++++++++++++++++++++++ >From csuley@netcom.com (Christopher S. Suley) Date: Fri, 6 May 1994 08:32:13 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) In article , David Beauchesne wrote: >How can you detect (programmatically) that a screen saver, such as >After Dark, has become activated? Here's a routine I use to detect whether a screen saver is active: Boolean SaverOn( void ) { long result; if ( GetMBarHeight() > 0 ) { if ( Gestalt( 'SAVR', &result ) == noErr ) { return( (result & 0x02) != 0 ); } else { return( false ); } } return( true ); } I make use of two facts here. Most of the code floating around on the net for hiding the menu bar sets the menu bar height to zero. If the menu bar height is not zeroed, I try the way cool, modern Gestalt method pioneered by the regrettably litigious Berkeley Systems. Hope this helps! -- Want some? csuley@netcom.com Want some? ChrisSuley@aol.com --------------------------- >From tob@zardoz.ece.cmu.edu (Toby Smith) Subject: Large device drivers: how to? Date: 2 May 1994 20:54:40 GMT Organization: Electrical and Computer Engineering We're working on a device driver here which has quickly exceeded 32k in size. Now that we've reached that point (and spent a few days trimming the fat), what do we do next? I'm using THINK C, and in the Project Type... dialog there is indeed an option for "Multi-segment" in the device driver category, but when compiling with this option on (and our code broken into two, <32k segments), I get a "resource too big" error message when linking. Is this a problem with THINK not knowing that the main segment should be a DRVR and the others should be DCOD? Instead of working this way, must I instead have two separate projects, one for the DRVR and another for the DCOD? Assuming that this isn't a major problem (building the relevant resources, that is), what's next? We have an init which will load a DRVR, but what do we do with the DCOD jobbies? How do we set up the jump table so the driver can find the routines it needs? As you might guess, I'm a little confused on this whole topic. If you have experience with something like this, or can point me towards any meaningful text on the subject, I'd be very appreciative. Thanks, Tob +++++++++++++++++++++++++++ >From resnick@cogsci.uiuc.edu (Pete Resnick) Date: Wed, 04 May 1994 20:27:01 -0500 Organization: University of Illinois at Urbana-Champaign In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby Smith) wrote: >We're working on a device driver here which has quickly exceeded 32k in >size. Now that we've reached that point (and spent a few days trimming >the fat), what do we do next? I'm using THINK C, and in the Project >Type... dialog there is indeed an option for "Multi-segment" in the >device driver category, but when compiling with this option on (and our >code broken into two, <32k segments), I get a "resource too big" error >message when linking. Remember that THINK C counts up the total sizes of everything you put in a single segment, including MacTraps and other libraries. Make sure that the amount of code in each segment is <32K. Multisegment drivers work just fine. >Assuming that this isn't a major problem (building the relevant >resources, that is), what's next? We have an init which will load a >DRVR, but what do we do with the DCOD jobbies? How do we set up the >jump table so the driver can find the routines it needs? The multi-segment switch tells THINK C to generate it's own jump table, so it will take care of this on its own. Now, as far as loading at INIT time, you will probably want to get my device driver code. I have been working on a couple of bug fixes for it (the latest released version, 2.2, has several bugs), but I have been working on several other things and have not completed it. Feel free to berate me with e-mail so that I finish cleaning it up and send it out. 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: resnick@cogsci.uiuc.edu +++++++++++++++++++++++++++ >From leblonk@netcom.com (Marcel Blonk) Date: Thu, 5 May 1994 08:39:09 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) Toby Smith (tob@zardoz.ece.cmu.edu) wrote: : We're working on a device driver here which has quickly exceeded 32k in [text about problems with DRVR and DCOD resources] Quick description of driver loading: Since the INIT file will be closed after the init completes, all resources should be loaded and detached before this happens. Since the DCOD segment loader depends on opening 'DCOD' resources it is necessary to load all segments at inittime, and never unload (or even unlock) them, since any such action would prompt the segloader code to go look for the 'DCOD' resources again. The best/easiest/most compatible way to load a segment, is to simply call a routine within that segment. The segment loader will load the resource, MoveHHi (ouch, more about that later), and fill in the jumptable. If that is done for each segment, all DCOD resources should be detached (and of course whatever other resource you would like to keep around) (note, they are locked, but again, more about it later). Also, even before any of this, a 'DATA' segment is loaded by the DRVR entry code and detached. Don't worry about that one. Now for the MoveHHi catch. Since this init time, and the driver is loaded into the system heap, it is absolutely undesirable that anything is MoveHHi and locked, if it is going to remain there (since this will limit to where the systemheap can shrink, not to mention heap fragmentation). The obvious solution, is to make all DCOD resources resSysHeap and resLocked. This will ensure that when the resource is loaded, it will be loaded low in the heap, and it will be locked, so the MoveHHi doesn't do anything (btw. if you want, you can make them preload also). Since Think C doesn't give you the option to specify the resource attributes of the DCOD resources and since I am a basically lazy person who doesn't enjoy going into ResEdit after every build, the following code, contains a kludge, which works, works safe, but which I would NOT use if I were to build a commercial shrinkwrap product (change the resource attributes with ResEdit after every non-debug build and #if DEBUG the kludge). The kludge, btw, checks the resource attributes, changes them if necessary (wherein lies the problem. One should not change its own resource file like that. Although the kludge is safe, in that it will only change the attributes the first time the driver is loaded.) I hope the following code will be clear enough to get the appropiate ideas. It was never used with Think C 6, so I don't know if it works with that (not as if I would garantee any of this code to work, all I can say is, I used it and it never failed on me). Think C 4 (if I recall correct) had main() in the DRVR resource. Think C 5 puts main() in on of the DCOD recources. The code given here is meant for Think C 5, but should be easily adaptable for other versions. - ---------------------------------------------------------- #define PROJECT 'DRVR' or whatever code resource or 'APPL' if you're using a test application project /* * include this in your main.c: * * #define MAIN * #include * * SEGSTART * SEG( _seg1) /* one entry for each segment * SEG( _seg2) * SEGEND * if ( ResError() ) * oops! * * * * include this once for each segment: * * #include * * SEGMENT( _seg1) */ // the PROJECTNAME is included in each segment, just for debug/recognition // purposes, feel free to remove it #define SEGMENT(x) static noname(){asm{dc.b "Segment: " PROJECTNAME "," #x}}void x(void);void x( void){} #if PROJECT == 'APPL' #define SEGSTART #define SEG(x) #define SEGEND #else #ifdef MAIN #if PROJECT == 'DRVR' #define RESTYPE 'DCOD' #else #define RESTYPE 'CCOD' #endif // the PROJECTNAME is included in this segment, just for debug/recognition // purposes, feel free to remove it static noname(){asm{dc.b "Segment: " PROJECTNAME ",MainSeg"}} typedef void (*VSeg)( void); #define SEGSTART {int i=0;VSeg procs[16];int LoadSegs( VSeg [], int); #define SEG(x) {void x(void);procs[i++]=x;} #define SEGEND ResErr = LoadSegs( procs, i);} void UnloadA4Seg( ProcPtr); static int LoadSegs( VSeg seg[], int count); static int LoadSegs( VSeg seg[], int count) { short i, attr, wrongsegs, index; OSErr err; register Handle h; THz oldZone; Handle segments[ 32], mainseg; short id, mainid; OSType type; unsigned char s[ 256]; oldZone = GetZone(); SetZone( SysZone); #if PROJECT == 'DRVR' /* think 5.0 puts DRVR's main() in seperate DCOD resource */ count++; #endif mainseg = Get1IndResource( PROJECT, 1); if ( mainseg == nil ) { DebugStr( "\pno main segment"); return( ResError()); } GetResInfo( mainseg, &mainid, &type, s); if ( err = ResError() ) { DebugStr( "\pcould not get main segment info"); return( err); } wrongsegs = 0; i = 0; for( index = Count1Resources( RESTYPE); index > 0; index--) { SetResLoad( false); h = Get1IndResource( RESTYPE, index); SetResLoad( true); if ( h == nil ) break; GetResInfo( h, &id, &type, s); if ( (id & 0xffe0) == (0xf800 + ((mainid & 0x3f) << 5)) ) { segments[ i++] = h; attr = GetResAttrs( h); if ( err = ResError() ) { DebugStr( "\presource error checking flags"); return( err); } if ( (attr & (resSysHeap | resLocked)) != (resSysHeap | resLocked) ) { SetResAttrs( h, attr | resSysHeap | resLocked); wrongsegs++; } } } if ( i != count ) { DebugStr( "\pnot all segments are indentified"); return( -1); } if ( wrongsegs != 0 ) // not all resource were loaded right { UpdateResFile( CurResFile()); /* unload all segments (might be in ApplZone) */ for ( i = 0; i < count; i++) UnloadA4Seg( seg[i]); /* attributes were wrong, release 'm, so as to not have 'm remain in the ApplZone */ for ( i = 0; i < count; i++) { h = segments[i]; if ( *h != 0L ) ReleaseResource( h); } } /* load all segments (again) */ for ( i = 0; i < count; i++) (*(seg[i]))(); /* detach all resources */ for ( i = 0; i < count; i++) { h = segments[i]; DetachResource( h); if ( err = ResError() ) { DebugStr( "\presource error detaching resources"); return( err); } } DetachResource( mainseg); if ( err = ResError() ) { DebugStr( "\presource error detaching main resource"); return( err); } SetZone( oldZone); return( noErr); } #endif // #ifdef MAIN #endif // #if PROJECT == 'APPL' +++++++++++++++++++++++++++ >From tob@zardoz.ece.cmu.edu (Toby Smith) Date: 6 May 1994 19:54:02 GMT Organization: Electrical and Computer Engineering Pete Resnick (resnick@cogsci.uiuc.edu) wrote: : In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby : Smith) wrote: : >We're working on a device driver here which has quickly exceeded 32k in : >size. Now that we've reached that point (and spent a few days trimming : >the fat), what do we do next? I'm using THINK C, and in the Project : >Type... dialog there is indeed an option for "Multi-segment" in the : >device driver category, but when compiling with this option on (and our : >code broken into two, <32k segments), I get a "resource too big" error : >message when linking. : Remember that THINK C counts up the total sizes of everything you put in a : single segment, including MacTraps and other libraries. Make sure that the : amount of code in each segment is <32K. Multisegment drivers work just : fine. Okay, maybe I have a magically stupid version of THINK C (or maybe I'm the one who's magically stupid...). The total size of my code is around 34k at this point. I'm using no libraries whatsoever. I've split that 34k of code up into, lessee, 5 segments now just to be spiteful towards the "resource too big" error messages I continue to receive every time I try to do "Build device driver." None of my individual segments exceeds 11k at this point, and I'm still receiving that error message (and I do indeed have the multi-segment option checked in the Device Driver dialog box). I couldn't hope to be more frustrated here. Any suggestions? Tob +++++++++++++++++++++++++++ >From leblonk@netcom.com (Marcel Blonk) Date: Sat, 7 May 1994 12:01:52 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) Toby Smith (tob@zardoz.ece.cmu.edu) wrote: : : >We're working on a device driver here which has quickly exceeded 32k in [] : : >Type... dialog there is indeed an option for "Multi-segment" in the : : >device driver category, but when compiling with this option on (and our : : >code broken into two, <32k segments), I get a "resource too big" error : : >message when linking. [] : Okay, maybe I have a magically stupid version of THINK C (or maybe I'm : the one who's magically stupid...). The total size of my code is around : 34k at this point. I'm using no libraries whatsoever. I've split that : 34k of code up into, lessee, 5 segments now just to be spiteful towards : the "resource too big" error messages I continue to receive every time I : try to do "Build device driver." None of my individual segments exceeds : 11k at this point, and I'm still receiving that error message (and I do : indeed have the multi-segment option checked in the Device Driver dialog : box). I couldn't hope to be more frustrated here. Any suggestions? Maybe it's the DATA segment that's being too big. When you made the driver into a multi segment project, suddenly all the intersegment calls are adding their 6 bytes each to the jumptable, which resides in the DATA resource. So, the solution might be to remove static alloctated data and change it to dynamically allocated. mb --------------------------- >From kidwell@wam.umd.edu (Christopher Bruce Kidwell) Subject: Taxes on shareware fees Date: 13 Apr 1994 21:29:10 GMT Organization: University of Maryland, College Park As tax time for us US folks rolls around, I was curious about what to do about shareware payments received. Do small-time shareware authors out there report their income? What about foreign income? Chris Kidwell kidwell@wam.umd.edu +++++++++++++++++++++++++++ >From ellens@bnr.ca (Chris Ellens) Date: Wed, 13 Apr 1994 18:06:49 -0400 Organization: BNR In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu (Christopher Bruce Kidwell) wrote: > As tax time for us US folks rolls around, I was curious about what to do > about shareware payments received. Do small-time shareware authors out > there report their income? What about foreign income? > > Chris Kidwell > kidwell@wam.umd.edu I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if I did, I'd declare the shareware fees as business income, and then write off my mailing expenses, my development software, and depreciation on my new PowerMac (and maybe a few business lunches) as expenses and claim the loss against my regular income. -- Chris Ellens ellens@bnr.ca +++++++++++++++++++++++++++ >From omh@cs.brown.edu (Owen M. Hartnett) Date: Thu, 14 Apr 1994 03:58:11 GMT Organization: Brown University Department of Computer Science In article <1994Apr14.025106.6190@news.yale.edu> owenc@minerva.cis.yale.edu (Christopher Owen) writes: >Chris Ellens (ellens@bnr.ca) wrote: > >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if >: I did, I'd declare the shareware fees as business income, and then write >: off my mailing expenses, my development software, and depreciation on my >: new PowerMac (and maybe a few business lunches) as expenses and claim the >: loss against my regular income. > >Well it doesn't quite work that way. Unless you spend a LOT of time on >the shareware your loses are limited to your income from the activity. >Still you can write all you shareware income off pretty easily though. This is correct. If you have any "outside" income over a certain very minimal amount, you must report it either as miscellaneous income or file a Schedule C - sole proprietorship. You report both domestic and foreign income. You can report it as miscellaneous if you don't want to bother with a schedule C, but you can't write off anything against it. Filing a schedule C is a definite advantage to you, as you can write off your expenses incurred against the income you made. If you show a definite business intent (meant by the IRS as "you really truly intended to make a profit" and you show a profit for 3 out of 5 years (this may have been broadened a bit)) then in your loss years you can write off your losses vs. your ordinary income. Otherwise, your income is assumed to be hobby income and your expenses can only be written off against the hobby income. There are definite advantages to filing a schedule C and you may want to consider them. Also consider the fact that, while you must report all your income, you plan your own purchases, so you do control whether or not your venture is profitable for a given year. -Owen -- Owen Hartnett omh@cs.brown.edu "FAITH, n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel." -Ambrose Bierce - The Devil's Dictionary +++++++++++++++++++++++++++ >From Scott_Gruby@hmc.edu (Scott Gruby) Date: Wed, 13 Apr 1994 19:22:11 -0700 Organization: Harvey Mudd College, Claremont CA In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu (Christopher Bruce Kidwell) wrote: > As tax time for us US folks rolls around, I was curious about what to do > about shareware payments received. Do small-time shareware authors out > there report their income? What about foreign income? > > Chris Kidwell > kidwell@wam.umd.edu Unfortunately I don't have a direct answer to this question and I don't plan on doing research until next year at tax time (I just started this year); but I do have some information on state sales tax in California...basically you don't have to collect it and people don't have to pay it. That's what the Board of Equalization told me yesterday. Something California shareware authors may want to note. -- Scott Allen Gruby (Scott_Gruby@hmc.edu) Macintosh Student System Manager Academic Computing, Harvey Mudd College Claremont, CA Finger ripem_public@eagle.st.hmc.edu for public key +++++++++++++++++++++++++++ >From owenc@minerva.cis.yale.edu (Christopher Owen) Date: Thu, 14 Apr 1994 02:51:06 GMT Organization: Yale Center for International and Area Studies Chris Ellens (ellens@bnr.ca) wrote: : I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if : I did, I'd declare the shareware fees as business income, and then write : off my mailing expenses, my development software, and depreciation on my : new PowerMac (and maybe a few business lunches) as expenses and claim the : loss against my regular income. Well it doesn't quite work that way. Unless you spend a LOT of time on the shareware your loses are limited to your income from the activity. Still you can write all you shareware income off pretty easily though. Chris -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 Bishop ~ Voice: (203) 772-3382 ~ owenc@minerva.cis.yale.edu New Haven CT 06511 ~ Data : (203) 772-4485 ~ finger for PGP key - ------------------------------------------------------------------------- Different _can_ mean inferior ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +++++++++++++++++++++++++++ >From resnick@cogsci.uiuc.edu (Pete Resnick) Date: Thu, 14 Apr 1994 00:02:18 -0500 Organization: University of Illinois at Urbana-Champaign In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu (Christopher Bruce Kidwell) wrote: >As tax time for us US folks rolls around, I was curious about what to do >about shareware payments received. Do small-time shareware authors out >there report their income? What about foreign income? I report it all on the 1040 and file the Schedule C (Profit or Loss From Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I also depreciate my computer and programming tools (compiler, Inside Mac, etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain in the butt to figure out, but that's where you can take off part of the cost of equipment, etc. 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: resnick@cogsci.uiuc.edu +++++++++++++++++++++++++++ >From gdl@stlawrence.maths (Greg Landweber) Date: 14 Apr 1994 10:53:44 GMT Organization: (none) In article resnick@cogsci.uiuc.edu (Pete Resnick) writes: In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu (Christopher Bruce Kidwell) wrote: >As tax time for us US folks rolls around, I was curious about what to do >about shareware payments received. Do small-time shareware authors out >there report their income? What about foreign income? I report it all on the 1040 and file the Schedule C (Profit or Loss From Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I also depreciate my computer and programming tools (compiler, Inside Mac, etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain in the butt to figure out, but that's where you can take off part of the cost of equipment, etc. I do the same thing, except that on form 4562, I declare all my computer-related expenses as Section 179 deductions. That way, you deduct the entire cost the first year and don't have to worry about the various percentages for depreciation. The limit for Section 179 deductions is $17,500. Is there any reason why I shouldn't do this (my shareware income is higher than the total cost of the hardware I buy, so declaring Section 179 doesn't give me a loss)? -- Greg Landweber gdl@maths.ox.ac.uk +++++++++++++++++++++++++++ >From giles@med.cornell.edu (Aaron Giles) Date: Thu, 14 Apr 1994 09:10:20 -0500 Organization: Cornell University Medical College In article <1994Apr14.025106.6190@news.yale.edu>, owenc@minerva.cis.yale.edu (Christopher Owen) wrote: > Well it doesn't quite work that way. Unless you spend a LOT of time on > the shareware your loses are limited to your income from the activity. > Still you can write all you shareware income off pretty easily though. Actually, beginning this year that restriction has been lifted. As long as you have other income, you can end up with a loss for your business and subtract that from your net income for purposes of calculating your taxes. Aaron -- Aaron Giles Power Macintosh & Newton Developer Cornell University Medical College giles@med.cornell.edu +++++++++++++++++++++++++++ >From ari@world.std.com (Ari I Halberstadt) Date: Thu, 14 Apr 1994 16:29:42 GMT Organization: The World Public Access UNIX, Brookline, MA In article <2oho76$7mq@cville-srv.wam.umd.edu>, Christopher Bruce Kidwell wrote: >As tax time for us US folks rolls around, I was curious about what to do >about shareware payments received. Do small-time shareware authors out >there report their income? What about foreign income? > >Chris Kidwell >kidwell@wam.umd.edu You have to pay taxes on just about all income you receive. You may have to pay both state and federal taxes on your income. I think that this would fall under the tax rules for self employed individuals or small businesses. This means that if you earned more than about $400 dollars, then you will have to pay federal income tax, social security, medicaid and medicare, and state income tax. If you received shareware payments from people within your state of business, then you will also have to pay any state sales tax. At any rate, you will certainly have to report your income to the government. You may be able to take certain deductions on your taxes if they relate to your work, such as computer books, hardware, and software. Unforuntately, home office deductions are not too easy to take these days. It isn't especially difficult to get all the relevant forms and fill them out, but it can be a pain, especially if you've already got a job and already had to fill out forms for it. Considering the late date, you can always file an ammended return, but of course you'll owe any interest on unpaid taxes. If you actually got a significant amount of money in shareware fees, it may push your income into a heigher income bracket; this may not have been what you wanted to happen... What you really don't want to have to do (since it can be a bit of a pain) is have to file estimated taxes for each year, but you may have no choice in the matter. You may not have to pay taxes if you earned less than a certain amount on your shareware fees, or if your activity is considered a hobby (by IRS and/or state tax rules). I'm crossposting this to alt.computer.consultants, since, as I recall, that was a good forum for discussing this sort of stuff. I haven't read that group in a while though, so if this topic is inappropriate please forgive me. Disclaimer: I'm not a CPA, just a self-employed programmer. As usual, don't trust any legal or tax advice you get on the net. Find the relevant IRS documentation and read it. The IRS publishes several books for small businesses that make figuring this all out much simpler. There are also plenty of good tax guides out there for small businesses, but always read the IRS literature, just to be sure. -- Ari Halberstadt ari@world.std.com #include "These beetles were long considered to be very rare because very few entomologists look for beetles in the mountains, in winter, at night, during snow storms." -- Purves W. K., et al, "Life: The Science of +++++++++++++++++++++++++++ >From jvp@tools1.ee.iastate.edu (Jim Van Peursem) Date: 14 Apr 94 18:32:47 GMT Organization: Iowa State University, Ames, Iowa In gdl@stlawrence.maths (Greg Landweber) writes: >I do the same thing, except that on form 4562, I declare all my >computer-related expenses as Section 179 deductions. That way, you >deduct the entire cost the first year and don't have to worry about >the various percentages for depreciation. The limit for Section 179 >deductions is $17,500. Is there any reason why I shouldn't do this >(my shareware income is higher than the total cost of the hardware I >buy, so declaring Section 179 doesn't give me a loss)? Slight clarification. The limit is the lesser of $17,500 and your net income without the 179 deduction. This basically means that you can't show a loss from any 179 deductions. +---------------------------------------------------------------+ | Jim Van Peursem - Ph.D. Candidate (Ham Radio -> KE0PH) | | Department of Electrical Engineering and Computer Engineering | | Iowa State University - Ames, IA 50011 : (515) 294-8339 | | internet - jvp@iastate.edu -or- jvp@cpre1.ee.iastate.edu | +---------------------------------------------------------------+ +++++++++++++++++++++++++++ >From sbill@informix.com (Bill Stackhouse) Date: 14 Apr 1994 18:20:55 GMT Organization: Informix Software, Inc. >>As tax time for us US folks rolls around, I was curious about what to do >>about shareware payments received. Do small-time shareware authors out >>there report their income? What about foreign income? > >I report it all on the 1040 and file the Schedule C (Profit or Loss From >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I >also depreciate my computer and programming tools (compiler, Inside Mac, >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain >in the butt to figure out, but that's where you can take off part of the >cost of equipment, etc. Something to keep in mind is hardware purchases up to 17,500 can be written off in the year of purchase using section 179 of form 4562. Software does not fall into this areas and must be depreciated over 3 years. A good tax program helps alot tracking all of this. Calling software purchases an office expense is an idea but not proper. Don't forget Home business use but make sure that you have the area solely for business. Look at the form C to find what catagories of expenses you need to track during the year. Time you spend developing the software cannot be treated as an expense, only if you contract someone else to develop it. Bill +++++++++++++++++++++++++++ >From wdh@netcom.com (Bill Hofmann) Date: Fri, 15 Apr 1994 01:24:21 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) resnick@cogsci.uiuc.edu (Pete Resnick) writes: >I report it all on the 1040 and file the Schedule C (Profit or Loss From >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I >also depreciate my computer and programming tools (compiler, Inside Mac, >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain >in the butt to figure out, but that's where you can take off part of the >cost of equipment, etc. You may already be doing it, but you should be aware that you can convert a certain amount of capital equipment (computer, software, "library") to expense under Sec 179. The limit was $10k/year, it just went up. This way you can avoid depreciation. Also, according to my accountant, software is a 3-year depreciation item. -- -Bill Hofmann wdh@netcom.COM Fresh Software and Instructional Design +1 510 524 0852 +++++++++++++++++++++++++++ >From gdl@stlawrence.maths (Greg Landweber) Date: 15 Apr 1994 00:54:11 GMT Organization: (none) In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes: Something to keep in mind is hardware purchases up to 17,500 can be written off in the year of purchase using section 179 of form 4562. Software does not fall into this areas and must be depreciated over 3 years. Really? Where does it say this about software? I deducted my software purchases using section 179. I hope that wasn't a mistake. I seem to recall there being something in the tax instructions about expenses for developing software can be deducted as current expenses. And I read it all so carefully, too... What about software upgrades? If I shell out money for a new compiler upgrade each year, do I have to depreciate all these purchases over three years? -- Greg "Buttons" Landweber gdl@maths.ox.ac.uk +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Thu, 14 Apr 1994 03:24:06 GMT Organization: Syracuse University, CIS Dept. In article <2oho76$7mq@cville-srv.wam.umd.edu> kidwell@wam.umd.edu (Christopher Bruce Kidwell) writes: >As tax time for us US folks rolls around, I was curious about what to do >about shareware payments received. Do small-time shareware authors out >there report their income? What about foreign income? I do. If you're a shareware author who has received income, I hate to say it, but you're a bit late in considering this question! Dealing with the income requires that you file a Schedule C (sole proprietorship income), which also means you'll have to file a form 1040 (long form). You'll almost certainly want to deduct relevant business expenses, which is a nontrivial task, and requires depreciating many expenses. (Some expenses can be deducted at one time.) This is all complicated, to the say the least, and is certainly not something a novice is likely to get done right in two days. If you're in this situation, you should seriously consider filing for an extension, and enlisting the aid of a competent professional. Personally, I found I was able to handle my own returns (the last two years) using TaxCut--but I left myself plenty of time to research depreciation schedules and other related items. As for foreign income, I treat shareware fees received from foreign users exactly the same as those received from domestic users. Good luck. -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From sbill@informix.com (Bill Stackhouse) Date: 15 Apr 1994 16:27:31 GMT Organization: Informix Software, Inc. In article From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Thu, 14 Apr 1994 14:56:54 GMT Organization: Syracuse University, CIS Dept. Chris Ellens (ellens@bnr.ca) wrote: >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if >: I did, I'd declare the shareware fees as business income, and then write >: off my mailing expenses, my development software, and depreciation on my >: new PowerMac (and maybe a few business lunches) as expenses and claim the >: loss against my regular income. > >Well it doesn't quite work that way. Unless you spend a LOT of time on >the shareware your loses are limited to your income from the activity. This is not correct. As long as you treat the venture as a business (i.e., you make a genuine effort to turn a profit) rather than as a hobby, your losses are not limited to your income. There is no specific requirement as to how much time you must spend on the activity. Owen M. Hartnett (omh@cs.brown.edu) writes: >Filing a schedule C is a definite advantage to you, as you can write off >your expenses incurred against the income you made. If you show a definite >business intent (meant by the IRS as "you really truly intended to make >a profit" and you show a profit for 3 out of 5 years (this may have been >broadened a bit)) then in your loss years you can write off your losses >vs. your ordinary income. Otherwise, your income is assumed to be hobby >income and your expenses can only be written off against the hobby income. The 3 out of 5 rule is no longer law. Under current law, you need only treat the activity as a genuine business (intended to turn a profit). Don't ask me how you would prove this if you consistently show a loss (or more to the point, how the IRS would prove the activity was not a business). >There are definite advantages to filing a schedule C and you may want to >consider them. Also consider the fact that, while you must report all >your income, you plan your own purchases, so you do >control whether or not your venture is profitable for a given year. Maybe, maybe not. Unexpected expenses can always change things. -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From rba26@cas.org (Brad Andrews) Date: Fri, 15 Apr 1994 17:57:53 GMT Organization: Chemical Abstracts Service In article B6t@netcom.com, wdh@netcom.com (Bill Hofmann) writes: ]resnick@cogsci.uiuc.edu (Pete Resnick) writes: ] ]>I report it all on the 1040 and file the Schedule C (Profit or Loss From ]>Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I ]>also depreciate my computer and programming tools (compiler, Inside Mac, ]>etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain ]>in the butt to figure out, but that's where you can take off part of the ]>cost of equipment, etc. ]You may already be doing it, but you should be aware that you can convert ]a certain amount of capital equipment (computer, software, "library") to ]expense under Sec 179. The limit was $10k/year, it just went up. This ]way you can avoid depreciation. Also, according to my accountant, ]software is a 3-year depreciation item. With nearly yearly upgrades, something is wrong with a 3 year depreciation of software. Where is the Sec 179 info supposed to go? Right on the Schedule C, or somewhere else? - - Brad Andrews Brad.Andrews@cas.org All opinions are strictly mine +++++++++++++++++++++++++++ >From omh@cs.brown.edu (Owen M. Hartnett) Date: Fri, 15 Apr 1994 19:38:11 GMT Organization: Brown University Department of Computer Science In article <1994Apr14.145654.16454@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes: >Owen M. Hartnett (omh@cs.brown.edu) writes: > >>Filing a schedule C is a definite advantage to you, as you can write off >>your expenses incurred against the income you made. If you show a definite >>business intent (meant by the IRS as "you really truly intended to make >>a profit" and you show a profit for 3 out of 5 years (this may have been >>broadened a bit)) then in your loss years you can write off your losses >>vs. your ordinary income. Otherwise, your income is assumed to be hobby >>income and your expenses can only be written off against the hobby income. > >The 3 out of 5 rule is no longer law. Under current law, you need only >treat the activity as a genuine business (intended to turn a profit). >Don't ask me how you would prove this if you consistently show a loss >(or more to the point, how the IRS would prove the activity was not a >business). > The 3 out of 5 was never law, it was an IRS ruling that they would consider a business to be non-hobby given that the business made a profit for 3 out of 5 years. You could always, then and now, made a point that the business was truly a business based on other factors. Consider the business, newly started, which loses money tremendously in a year and ends up getting closed down. Certainly this wouldn't meet the 3 out of 5 rule, but the IRS wouldn't consider it a hobby. However, you can probably be assured that if you show a profit 3 out of 5 years, you won't be considered a hobby. > >>There are definite advantages to filing a schedule C and you may want to >>consider them. Also consider the fact that, while you must report all >>your income, you plan your own purchases, so you do >>control whether or not your venture is profitable for a given year. > >Maybe, maybe not. Unexpected expenses can always change things. Even so, the timing of those expenses is under your control. -Owen -- Owen Hartnett omh@cs.brown.edu "FAITH, n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel." -Ambrose Bierce - The Devil's Dictionary +++++++++++++++++++++++++++ >From gdl@stlawrence.maths (Greg Landweber) Date: 16 Apr 1994 03:15:28 GMT Organization: (none) In article <1994Apr15.175753.3639@chemabs.uucp> rba26@cas.org (Brad Andrews) writes: With nearly yearly upgrades, something is wrong with a 3 year depreciation of software. I counted my software purchases as a Section 179 deduction. Is this wrong? Where is the Sec 179 info supposed to go? Right on the Schedule C, or somewhere else? Section 179 info goes on form 4562. It is all explained (rather poorly) in the instructions for that form. -- Greg Landweber gdl@maths.ox.ac.uk +++++++++++++++++++++++++++ >From hall_j@sat.mot.com (Joseph Hall) Date: Thu, 14 Apr 1994 22:06:25 GMT Organization: Motorola Inc., Satellite Communications Seems it was resnick@cogsci.uiuc.edu (Pete Resnick) who said: >In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu >(Christopher Bruce Kidwell) wrote: > >>As tax time for us US folks rolls around, I was curious about what to do >>about shareware payments received. Do small-time shareware authors out >>there report their income? What about foreign income? > >I report it all on the 1040 and file the Schedule C (Profit or Loss From >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I >also depreciate my computer and programming tools (compiler, Inside Mac, >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain >in the butt to figure out, but that's where you can take off part of the >cost of equipment, etc. If you're like me, you pay enough for software tools, computer-related books and professional dues to wipe out any self-employment income arising from small-time shareware fees. My expenditures in that area are at least $2K per year (probably twice that last year). You still need to report the income and offsetting expenses, of course. The nice thing is that expenses come right out of self-employment income and you don't have to get over the standard deduction hump. Just keep those receipts and don't deduct games (unless you're writing them). :-) So far I haven't bothered keeping track of capital expenditures, but then again my self-employment income has been very small. -- Joseph Nathan Hall | Joseph's Law of Interface Design: Never give your users Software Architect | a choice between the easy way and the right way. Gorca Systems Inc. | joseph@joebloe.maple-shade.nj.us (home) (on assignment) | (602) 732-2549 (work) Joseph_Hall-SC052C@email.mot.com +++++++++++++++++++++++++++ >From robertl@netcom.com (Robert L Mathews) Date: Sat, 16 Apr 1994 08:55:41 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) Scott Gruby (Scott_Gruby@hmc.edu) wrote: : Unfortunately I don't have a direct answer to this question and I don't : plan on doing research until next year at tax time (I just started this : year); but I do have some information on state sales tax in : California...basically you don't have to collect it and people don't have : to pay it. That's what the Board of Equalization told me yesterday. : Something California shareware authors may want to note. Whoa! This is only true if you don't mail the purchaser ANYTHING AT ALL in return for the shareware payment. If you do paper mail them anything - disk, manual, confirmation letter, anything - then it is taxable. This is true even if the shareware user sends you a blank disk to put a copy of the program on. In front of me I have a copy of Regulation 1502: Sales Tax and Use Regulations; Computers, Programs, and Data Processing. "(c1) The transfer of title, for a consideration, of tangible personal property, including property on which or into which information has been recorded or incorporated, is a sale subject to tax." Also, "(f1a) Tax applies whether title to the storage media on which the program is recorded...passes to the customer, or the program is recorded...on storage media furnished by the customer." It goes on to say, though, that "(f1d) The sale or lease of a prewritten program is NOT a taxable transaction if the program is transferred by remote telecommunications from the seller's place of business, to or through the purchaser's computer and the purchaser does not obtain posession of ANY tangible personal property, such as storage media, in the transaction." It also mentions that the transfer of any written information, including documentation of any form, would make the sale taxable. So. If you're doing EVERYTHING by e-mail, or you don't send people anything when they pay you, you don't have to pay sales tax. However, if you send them a disk or manual, or a letter including a serial number or a registration code (which counts as documentation, according to the definitions), you gotta pay the tax. Anyone can get a copy of this pamphlet by contacting the State Board of "Equalization" at 450 N Street, Sacramento CA 95814. Ask for regulation 1502. It gets very detailed, and it's all about computer businesses. Mileage in other states may vary. However, you should check it out; the penalties for not paying the tax are, as you would expect, nasty. By the way, the best advice I have for filling out all those annoying forms at the end of the year: marry a CPA. She (or he)'ll handle it. -- Robert L Mathews +++++++++++++++++++++++++++ >From jvp@tools1.ee.iastate.edu (Jim Van Peursem) Date: 16 Apr 94 16:12:14 GMT Organization: Iowa State University, Ames, Iowa In gdl@stlawrence.maths (Greg Landweber) writes: >In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes: > Something to keep in mind is hardware purchases up to 17,500 can be > written off in the year of purchase using section 179 of form 4562. Software > does not fall into this areas and must be depreciated over 3 years. >Really? Where does it say this about software? I deducted my >software purchases using section 179. I hope that wasn't a mistake. >I seem to recall there being something in the tax instructions about >expenses for developing software can be deducted as current expenses. >And I read it all so carefully, too... I called the IRS on this point and they said software CAN be used as a 179 deduction. +---------------------------------------------------------------+ | Jim Van Peursem - Ph.D. Candidate (Ham Radio -> KE0PH) | | Department of Electrical Engineering and Computer Engineering | | Iowa State University - Ames, IA 50011 : (515) 294-8339 | | internet - jvp@iastate.edu -or- jvp@cpre1.ee.iastate.edu | +---------------------------------------------------------------+ +++++++++++++++++++++++++++ >From tzs@u.washington.edu (Tim Smith) Date: 18 Apr 1994 04:44:10 GMT Organization: University of Washington School of Law, Class of '95 Owen M. Hartnett wrote: >The 3 out of 5 was never law, it was an IRS ruling that they would >consider a business to be non-hobby given that the business made a >profit for 3 out of 5 years. You could always, then and now, made a >point that the business was truly a business based on other factors. I call your attention to paragraph (d) of section 183 of the Internal Revenue Code, reproduced after my signature, infra. The 3 out of 5 rule was indeed law (and still is, as far as I can tell, unless there was a change I missed after Clinton's tax bill). --Tim Smith Sec. 183. Activities not engaged in for profit (a) General rule In the case of an activity engaged in by an individual or an S corporation, if such activity is not engaged in for profit, no deduction attributable to such activity shall be allowed under this chapter except as provided in this section. (b) Deductions allowable In the case of an activity not engaged in for profit to which subsection (a) applies, there shall be allowed - (1) the deductions which would be allowable under this chapter for the taxable year without regard to whether or not such activity is engaged in for profit, and (2) a deduction equal to the amount of the deductions which would be allowable under this chapter for the taxable year only if such activity were engaged in for profit, but only to the extent that the gross income derived from such activity for the taxable year exceeds the deductions allowable by reason of paragraph (1). (c) Activity not engaged in for profit defined For purposes of this section, the term 'activity not engaged in for profit' means any activity other than one with respect to which deductions are allowable for the taxable year under section 162 or under paragraph (1) or (2) of section 212. (d) Presumption If the gross income derived from an activity for 3 or more of the taxable years in the period of 5 consecutive taxable years which ends with the taxable year exceeds the deductions attributable to such activity (determined without regard to whether or not such activity is engaged in for profit), then, unless the Secretary establishes to the contrary, such activity shall be presumed for purposes of this chapter for such taxable year to be an activity engaged in for profit. In the case of an activity which consists in major part of the breeding, training, showing, or racing of horses, the preceding sentence shall be applied by substituting '2' for '3' and '7' for '5'. (e) Special rule (1) In general A determination as to whether the presumption provided by subsection (d) applies with respect to any activity shall, if the taxpayer so elects, not be made before the close of the fourth taxable year (sixth taxable year, in the case of an activity described in the last sentence of such subsection) following the taxable year in which the taxpayer first engages in the activity. For purposes of the preceding sentence, a taxpayer shall be treated as not having engaged in an activity during any taxable year beginning before January 1, 1970. (2) Initial period If the taxpayer makes an election under paragraph (1), the presumption provided by subsection (d) shall apply to each taxable year in the 5-taxable year (or 7-taxable year) period beginning with the taxable year in which the taxpayer first engages in the activity, if the gross income derived from the activity for 3 (or 2 if applicable) or more of the taxable years in such period exceeds the deductions attributable to the activity (determined without regard to whether or not the activity is engaged in for profit). (3) Election An election under paragraph (1) shall be made at such time and manner, and subject to such terms and conditions, as the Secretary may prescribe. (4) Time for assessing deficiency attributable to activity If a taxpayer makes an election under paragraph (1) with respect to an activity, the statutory period for the assessment of any deficiency attributable to such activity shall not expire before the expiration of 2 years after the date prescribed by law (determined without extensions) for filing the return of tax under chapter 1 for the last taxable year in the period of 5 taxable years (or 7 taxable years) to which the election relates. Such deficiency may be assessed notwithstanding the provisions of any law or rule of law which would otherwise prevent such an assessment. +++++++++++++++++++++++++++ >From tzs@u.washington.edu (Tim Smith) Date: 18 Apr 1994 04:59:02 GMT Organization: University of Washington School of Law, Class of '95 Jim Van Peursem wrote: > I called the IRS on this point and they said software CAN be used >as a 179 deduction. If I were going to try this, I think I'd call them two or three times and make sure I got the same answer. Section 179 says that it only applies to tangible property, and at first blush I'd expect software to be intangible property. The regulations for section 179 do not clarify things. --Tim Smith +++++++++++++++++++++++++++ >From resnick@cogsci.uiuc.edu (Pete Resnick) Date: Mon, 18 Apr 1994 00:08:33 -0500 Organization: University of Illinois at Urbana-Champaign In article <2ot42m$eng@news.u.washington.edu>, tzs@u.washington.edu (Tim Smith) wrote: >Jim Van Peursem wrote: >> I called the IRS on this point and they said software CAN be used >>as a 179 deduction. > >If I were going to try this, I think I'd call them two or three times >and make sure I got the same answer. Section 179 says that it only >applies to tangible property, and at first blush I'd expect software >to be intangible property. The regulations for section 179 do not >clarify things. When I called in '92 to ask about THINK C (I just said "software tools"), they not only said that I couldn't take a 179, but also that it should be depreciated over 5 years (which according to some folks here is wrong and should be 3). Lovely folks manning the phones at the IRS. :-) 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: resnick@cogsci.uiuc.edu +++++++++++++++++++++++++++ >From wdh@netcom.com (Bill Hofmann) Date: Mon, 18 Apr 1994 17:20:54 GMT Organization: NETCOM On-line Communication Services (408 241-9760 guest) tzs@u.washington.edu (Tim Smith) writes: >Jim Van Peursem wrote: >> I called the IRS on this point and they said software CAN be used >>as a 179 deduction. >If I were going to try this, I think I'd call them two or three times >and make sure I got the same answer. Section 179 says that it only >applies to tangible property, and at first blush I'd expect software >to be intangible property. The regulations for section 179 do not >clarify things. Well, my accountant (who's an "Enrolled Agent," which means that she takes lots of continuing education about tax law) who has lots of computer geeks as customers, says that software is a 3 year item (which *is* a recent change), and that it can be Section 179'd. There is also a distinction between software you *use* and software you use (eg) for testing--so your THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo Write you bought to test your automatic spell checker system extension against could actually be expensed. Of course, unless you spend more than 17,500 or so, you should probably just take it as section 179. -- -Bill Hofmann wdh@netcom.COM Fresh Software and Instructional Design +1 510 524 0852 +++++++++++++++++++++++++++ >From sbill@informix.com (Bill Stackhouse) Date: 18 Apr 1994 17:19:48 GMT Organization: Informix Software, Inc. In article From gdl@stlawrence.maths (Greg Landweber) Date: 18 Apr 1994 22:53:49 GMT Organization: (none) In article wdh@netcom.com (Bill Hofmann) writes: Well, my accountant (who's an "Enrolled Agent," which means that she takes lots of continuing education about tax law) who has lots of computer geeks as customers, says that software is a 3 year item (which *is* a recent change), and that it can be Section 179'd. There is also a distinction between software you *use* and software you use (eg) for testing--so your THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo Write you bought to test your automatic spell checker system extension against could actually be expensed. Of course, unless you spend more than ^^^^^^^^ 17,500 or so, you should probably just take it as section 179. What does it mean to "expense" something? If I decide to "expense" my copy of Whammo Write, where do I enter it on my tax forms? I take it that if I "expense" Whammo Write, then it is not depreciated, and so it does not go on form 4562. Do you put it on Schedule C under Miscellaneous Expenses (writing out what it is), or does it fit into one of the nice categories they provide for expenses? BTW, for shareware authors with less than $2000 in expenses, you can file Schedule C-EZ, where you simply enter your earnings, enter your expenses, and subtract. I'm not sure if you are allowed to do that if your expenses include any property that should be depreciated. However, with Schedule C-EZ, you don't have to provide a break-down of your expenses, so the IRS would never know. Also, you can feel safe, realizing that had you filled out Schedule C, Form 4562, and taken the Section 179 deduction, your taxes would have come out precisely the same! -- Greg gdl@maths.ox.ac.uk +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Mon, 18 Apr 1994 01:51:31 GMT Organization: Syracuse University, CIS Dept. In article <1994Apr15.193811.14928@cs.brown.edu> omh@cs.brown.edu (Owen M. Hartnett) writes: >> >>The 3 out of 5 rule is no longer law. Under current law, you need only >>treat the activity as a genuine business (intended to turn a profit). >>Don't ask me how you would prove this if you consistently show a loss >>(or more to the point, how the IRS would prove the activity was not a >>business). >> >The 3 out of 5 was never law, it was an IRS ruling that they would >consider a business to be non-hobby given that the business made a >profit for 3 out of 5 years. You could always, then and now, made a >point that the business was truly a business based on other factors. You're right--I misspoke, and I realized it when I saw my post but didn't figure it was worth cancelling the post. But the former 3 out of 5 rule is definitely no longer an IRS rule... [...] >>>There are definite advantages to filing a schedule C and you may want to >>>consider them. Also consider the fact that, while you must report all >>>your income, you plan your own purchases, so you do >>>control whether or not your venture is profitable for a given year. >> >>Maybe, maybe not. Unexpected expenses can always change things. > >Even so, the timing of those expenses is under your control. How so? I incurred substantial legal expenses last year related to a trademark dispute. I don't see where I had any choice but to deduct those expenses on my return for last year. (Not that I wanted to do otherwise. My point is, simply, that expenses like non-startup-related legal fees are not capital expenditures. I wouldn't think that they could be depreciated.) -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From isbell@ai.mit.edu (Charles L Isbell) Date: 19 Apr 94 08:52:22 Organization: MIT Artificial Intelligence Laboratory resnick@cogsci.uiuc.edu (Pete Resnick) writes: |>> I called the IRS on this point and they said software CAN be used |>>as a 179 deduction. |> |>If I were going to try this, I think I'd call them two or three times |>and make sure I got the same answer. Section 179 says that it only |>applies to tangible property, and at first blush I'd expect software |>to be intangible property. The regulations for section 179 do not |>clarify things. |When I called in '92 to ask about THINK C (I just said "software tools"), |they not only said that I couldn't take a 179, but also that it should be |depreciated over 5 years (which according to some folks here is wrong and |should be 3). Lovely folks manning the phones at the IRS. :-) It is a known feature of the IRS that each time you call them to ask about a particular question, you will get a different answer. Given that and an early enough start, it is reasonable to keep calling until you get the answer you want to hear. At that time, record the time and date of the call and write down the name of the person giving you the answer. This might help at audit time, should it ever come up. :) -- Peace. "If I could find a way to get [Saddam Hussein] out of there, even putting a contract out on him, if the CIA still did that sort of a thing, assuming it ever did, I would be for it." -- Richard Nixon -\--/- Don't just adopt opinions | \/ | Some of you are homeboys develop them. | /\ | but only I am The Homeboy From hell -/--\- +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Mon, 18 Apr 1994 14:26:51 GMT Organization: Syracuse University, CIS Dept. In article <2ot42m$eng@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes: >> I called the IRS on this point and they said software CAN be used >>as a 179 deduction. > >If I were going to try this, I think I'd call them two or three times >and make sure I got the same answer. Section 179 says that it only >applies to tangible property, and at first blush I'd expect software >to be intangible property. The regulations for section 179 do not >clarify things. How do you figure that it's intangible? You must think that shrinkwrap licenses--which specify that you purchase only a license to use the software--are valid contracts. I'd maintain that what you purchase (in almost all cases) is a *copy* of the software (along with manuals, etc.). That copy of the software is most certainly tangible. -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Mon, 18 Apr 1994 14:36:28 GMT Organization: Syracuse University, CIS Dept. In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes: >>The 3 out of 5 was never law, it was an IRS ruling that they would >>consider a business to be non-hobby given that the business made a >>profit for 3 out of 5 years. You could always, then and now, made a >>point that the business was truly a business based on other factors. > >I call your attention to paragraph (d) of section 183 of the Internal >Revenue Code, reproduced after my signature, infra. The 3 out of 5 >rule was indeed law (and still is, as far as I can tell, unless there >was a change I missed after Clinton's tax bill). > > >Sec. 183. Activities not engaged in for profit > >[text omitted] I just scanned the text quickly, but it appeared to me that all it said was that making a profit in 3 out of 5 years creates a presumption that the activity is for profit. In other words, it is a *sufficient* condition to be considered a business rather than a hobby. This is quite different from requiring 3 out of 5 years of profit as a *necessary* condition to be considered a business. The latter seems to have been an IRS rule, which I'm quite sure is no longer in effect. I believe the rule was overturned as the result of litigation. -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From omh@cs.brown.edu (Owen M. Hartnett) Date: Tue, 19 Apr 1994 23:14:29 GMT Organization: Brown University Department of Computer Science In article <1994Apr18.143628.14657@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes: >In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes: > >>>The 3 out of 5 was never law, it was an IRS ruling that they would >>>consider a business to be non-hobby given that the business made a >>>profit for 3 out of 5 years. You could always, then and now, made a >>>point that the business was truly a business based on other factors. >> >>I call your attention to paragraph (d) of section 183 of the Internal >>Revenue Code, reproduced after my signature, infra. The 3 out of 5 >>rule was indeed law (and still is, as far as I can tell, unless there >>was a change I missed after Clinton's tax bill). >> >> >>Sec. 183. Activities not engaged in for profit >> >>[text omitted] > >I just scanned the text quickly, but it appeared to me that all it said >was that making a profit in 3 out of 5 years creates a presumption that >the activity is for profit. In other words, it is a *sufficient* >condition to be considered a business rather than a hobby. > >This is quite different from requiring 3 out of 5 years of profit as a >*necessary* condition to be considered a business. > You are quite correct. I remember reading a CCH Tax article which said just the above. You could still get a business deduction if you met other "reasonable man" types of conditions, even when 3 out of 5 was in effect. There were several court cases which validated this. >The latter seems to have been an IRS rule, which I'm quite sure is no >longer in effect. I believe the rule was overturned as the result of >litigation. I don't think it was for a particular litigation, rather the court cases which have been taking place. I think that the IRS instruction was to allow its agents more broader authority in determining business vs. hobby. Particularly when you consider businesses that go broke before 5 years, which often happens, this ruling needed to be broader. -Owen -- Owen Hartnett omh@cs.brown.edu "FAITH, n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel." -Ambrose Bierce - The Devil's Dictionary +++++++++++++++++++++++++++ >From oster@netcom.com (David Phillip Oster) Date: Wed, 20 Apr 1994 06:38:47 GMT Organization: Netcom Online Communications Services (408-241-9760 login: guest) Has anyone succeeded in claiming the (Federal) Research and Development Investment Tax Credit? I have not been able to find a definition of this that I can +++++++++++++++++++++++++++ >From sbill@informix.com (Bill Stackhouse) Date: 20 Apr 1994 20:56:37 GMT Organization: Informix Software, Inc. In article <1994Apr18.142651.14458@newstand.syr.edu- greeny@top.cis.syr.edu (J. S. Greenfield) writes: -In article <2ot42m$eng@news.u.washington.edu- tzs@u.washington.edu (Tim Smith) writes: - - - I called the IRS on this point and they said software CAN be used - -as a 179 deduction. -- --If I were going to try this, I think I'd call them two or three times --and make sure I got the same answer. Section 179 says that it only --applies to tangible property, and at first blush I'd expect software --to be intangible property. The regulations for section 179 do not --clarify things. - -How do you figure that it's intangible? You must think that shrinkwrap -licenses--which specify that you purchase only a license to use the -software--are valid contracts. - -I'd maintain that what you purchase (in almost all cases) is a *copy* -of the software (along with manuals, etc.). That copy of the software -is most certainly tangible. - Sorry but the IRS booklet on depreciation specifically says that software is intangible and cannot not be included with section 179 expenses. +++++++++++++++++++++++++++ >From peirce@outpost.SF-Bay.org (Michael Peirce) Date: 20 Apr 94 23:47:27 GMT Organization: Peirce Software, Inc. In article (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes: > In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu > (Christopher Bruce Kidwell) wrote: > > > As tax time for us US folks rolls around, I was curious about what to do > > about shareware payments received. Do small-time shareware authors out > > there report their income? What about foreign income? > > > > Chris Kidwell > > kidwell@wam.umd.edu > > Unfortunately I don't have a direct answer to this question and I don't > plan on doing research until next year at tax time (I just started this > year); but I do have some information on state sales tax in > California...basically you don't have to collect it and people don't have > to pay it. That's what the Board of Equalization told me yesterday. > > Something California shareware authors may want to note. Humm, I was told the exact opposite. I've been filing annual sales tax reports for the last couple of years for my shareware sales to to California folks (I live in CA). It possible that things have changed, but I already have to file a sales tax report for other products and people seem to expect to pay the sales tax... __ Michael Peirce __ peirce@outpost.sf-bay.org __ Peirce Software, Inc. __ 719 Hibiscus Place, Suite 301 __ __ San Jose, California USA 95117-1844 __ Makers of: Smoothie & __ voice: +1.408.244.6554 fax: +1.408.244.6882 __ Peirce Print Tools __ AppleLink: peirce & AOL: AFC Peirce +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Thu, 21 Apr 1994 13:32:36 GMT Organization: Syracuse University, CIS Dept. In article <2p44u5$6ik@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes: >--If I were going to try this, I think I'd call them two or three times >--and make sure I got the same answer. Section 179 says that it only >--applies to tangible property, and at first blush I'd expect software >--to be intangible property. The regulations for section 179 do not >--clarify things. >- >-How do you figure that it's intangible? You must think that shrinkwrap >-licenses--which specify that you purchase only a license to use the >-software--are valid contracts. >- >-I'd maintain that what you purchase (in almost all cases) is a *copy* >-of the software (along with manuals, etc.). That copy of the software >-is most certainly tangible. > >Sorry but the IRS booklet on depreciation specifically says that software >is intangible and cannot not be included with section 179 expenses. In that case, I'd have to conclude that the IRS does not understand the meaning of the word "intangible." -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From rba26@cas.org (Brad Andrews) Date: Fri, 22 Apr 1994 19:33:09 GMT Organization: Chemical Abstracts Service In article 6ik@infmx.informix.com, sbill@informix.com (Bill Stackhouse) writes: ] ]Sorry but the IRS booklet on depreciation specifically says that software ]is intangible and cannot not be included with section 179 expenses. ] ] But what kind of "software" is it referring to? I would guess they might have been thinking of the kind you buy for a mainframe. I could be wrong though. - - Brad Andrews Brad.Andrews@cas.org All opinions are strictly mine +++++++++++++++++++++++++++ >From jfw@ksr.com (John F. Woods) Date: 18 Apr 1994 19:38:09 GMT Organization: Kendall Square Research tzs@u.washington.edu (Tim Smith) writes: >Jim Van Peursem wrote: >> I called the IRS on this point and they said software CAN be used >>as a 179 deduction. >If I were going to try this, I think I'd call them two or three times >and make sure I got the same answer. Section 179 says that it only >applies to tangible property, and at first blush I'd expect software >to be intangible property. The regulations for section 179 do not >clarify things. Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses make it pretty clear that you have purchased, at most, some small squares of plastic and iron oxide and a badly written manual which isn't guaranteed to have anything to do with any program that might, through sheer negligence, have accidently been recorded on the piece of plastic. That sounds pretty tangible to me; maybe software licenses have a use after all ;-). [WARNING: THE ABOVE IS INTENDED AS HUMOR. I FORMALLY GUARANTEE, WITH THE SAME FIRMNESS OF COMMITMENT AT COMMERCIAL SOFTWARE PUBLISHERS, THAT THE IRS DO *NOT* CONCUR WITH THAT REASONING (I.E. IF IT TURNS OUT THAT THEY DO, RETURN THIS ARTICLE TO WHERE YOU PURCHASED IT WITHIN THE NEXT 90 MILLISECONDS FOR A FULL REFUND OF YOUR PURCHASE PRICE :-) ) ] +++++++++++++++++++++++++++ >From greeny@top.cis.syr.edu (J. S. Greenfield) Date: Sun, 24 Apr 1994 03:31:55 GMT Organization: Syracuse University, CIS Dept. In article <2ounj1$njg@hopscotch.ksr.com> jfw@ksr.com (John F. Woods) writes: >>>I called the IRS on this point and they said software CAN be used >>>as a 179 deduction. >> >>If I were going to try this, I think I'd call them two or three times >>and make sure I got the same answer. Section 179 says that it only >>applies to tangible property, and at first blush I'd expect software >>to be intangible property. The regulations for section 179 do not >>clarify things. > >Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses >make it pretty clear that you have purchased, at most, some small squares >of plastic and iron oxide and a badly written manual which isn't guaranteed >to have anything to do with any program that might, through sheer negligence, >have accidently been recorded on the piece of plastic. That sounds pretty >tangible to me; maybe software licenses have a use after all ;-). > > >[WARNING: THE ABOVE IS INTENDED AS HUMOR.... Actually, I'd say you have it backwards. Most shrinkwrap licenses suggest that you have not bought a *copy* of the software, but rather, you have only purchased a license to use the software. The shrinkwrap license maintains that the copy you are given remains the property of the publisher. Since shrinkwrap licenses are almost universally considered to be unenforceable, as a matter of law, you actually do purchase a *copy* of the software. Now, a license is intangible, but an actual copy of the software is tangible. That the IRS apparently defines software as intangible (regardless of the actual circumstances of its purchase) suggests that they don't give a damn whether their rules have anything to do with law or reality. (That is, their definition of "tangible" has nothing to do with either the legal or common definition of that word.) -- J. S. Greenfield greeny@top.cis.syr.edu (I like to put 'greeny' here, but my d*mn system wants a *real* name!) "What's the difference between an orange?" +++++++++++++++++++++++++++ >From Rick_Holzgrafe@taligent.com (Rick Holzgrafe) Date: Mon, 25 Apr 1994 18:55:52 GMT Organization: Semicolon Software In article , peirce@outpost.SF-Bay.org (Michael Peirce) wrote: > > In article (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes: > > > > [...] but I do have some information on state sales tax in > > California...basically you don't have to collect it and people don't have > > to pay it. That's what the Board of Equalization told me yesterday. > > > > Something California shareware authors may want to note. > > Humm, I was told the exact opposite. I've been filing annual sales > tax reports for the last couple of years for my shareware sales to > to California folks (I live in CA). My discussions with the CA State Board of Equalization and my reading of their rules and regs (sorry, can't quote a source just now) indicate that you must pay sales tax if and only if your customers receive some sort of material goods from you as part of the exchange. If the goods are delivered entirely by electronic means (e.g., the customer downloaded the product from a BBS and you send no disks or manual in exchange for their payment), then sales tax is not involved. Accordingly I report sales tax on my mail-order product (for which the customer receives a labeled disk and printed manual) but not for my shareware products which are complete and self-contained when the customer downloads them. A nit: the customer is not required to pay sales tax in any case. The SELLER is required to pay the tax, which may be collected from the customer (i.e., added to the product's base price) or simply paid out of the seller's gross. -- Rick Holzgrafe Semicolon Software rmh@taligent.com +++++++++++++++++++++++++++ >From tzs@u.washington.edu (Tim Smith) Date: 7 May 1994 11:56:37 GMT Organization: University of Washington School of Law, Class of '95 >How do you figure that it's intangible? You must think that shrinkwrap >licenses--which specify that you purchase only a license to use the >software--are valid contracts. Non sequitur. Why would my guess that software is intangible for tax purposes have anything to do with what I think of shrinkwrap licenses? --Tim Smith +++++++++++++++++++++++++++ >From rmah@panix.com (Robert S. Mah) Date: Sat, 07 May 1994 15:11:13 -0500 Organization: One Step Beyond tzs@u.washington.edu (Tim Smith) wrote: > >How do you figure that it's intangible? You must think that shrinkwrap > >licenses--which specify that you purchase only a license to use the > >software--are valid contracts. > > Non sequitur. Why would my guess that software is intangible for tax > purposes have anything to do with what I think of shrinkwrap licenses? Software is copyrightable. Only tanglible things can be copyrighted. Copyrighted items, when sold (or licensed or whatever) are usually taxed. In some places even services (i.e. non tangibles) have a sales tax associated with them. In other words, whether you have to pay sales taxes is not a philosophical question or a question of logical deduction. Simply follow the appropriate laws. No one ever said laws have to make sence. If you disagree you can challenge the law in court. But until you win, you must still pay your taxes if that's what the law says. Cheers, Rob ___________________________________________________________________________ Robert S. Mah -=- One Step Beyond -=- 212-947-6507 -=- rmah@panix.com --------------------------- >From taihou@iss.nus.sg (Tng Tai Hou) Subject: Thread Mgr Native PPC NOT - why? Date: 8 May 1994 08:43:27 +0800 Organization: Institute Of Systems Science, NUS In the readme of the new native Thread Mgr 2.01, it was emphasized that there are no pre-emptive threads for the PPC - never has and never will !!! This from a official free Apple product!!! No reasons were given. But I think everyone would like to know why this is so. Is there something about the PPC that makes it unable to perform pre-emptive threads?!!! Is it the software or hardware? If it is true for all (now and future) PowerMacs, then we can end the debate about pre-emptive threads once and for all - there won't be any. Please, can someone, esp someone from Apple clarify this in technical details. I can only venture a guess - that the PPC in hardware has only one level of interrupt, and that makes in very tough. That the System Software in 68k has a lot more interrupts, and this has be emulated, which it is. Please, this isn't a flame or a criticism. I need to know. Tai Hou TNG Singapore +++++++++++++++++++++++++++ >From chewy@shell.portal.com (Paul F. Snively) Date: 8 May 1994 14:12:10 GMT Organization: tumbolia.com In article <2qhcjf$1gd@ghost.iss.nus.sg> taihou@iss.nus.sg (Tng Tai Hou) writes: > In the readme of the new native Thread Mgr 2.01, it was emphasized that > there are no pre-emptive threads for the PPC - never has and never > will !!! This from a official free Apple product!!! > > No reasons were given. But I think everyone would like to know > why this is so. There was a fairly sizable thread about this earlier. The problem stems from the fact that the 68K emulator uses a pretty simple runtime model for the interrupts that the Thread Manager uses to schedule preemptive threads. That is, if an interrupt occurred in the middle of emulating a 68K instruction, and a thread context-switch occurred, the emulator isn't written in such a way as to handle that gracefully, and to rewrite the emulator to allow thread context switching in the middle of emulating a 68K instruction would introduce significant overhead into the emulator, so they're not prepared to do it. Apple's conventional wisdom on the subject is that they're working on a preemptively-multitasked future version of the OS, so "wait for it." This, of course, conveniently ignores the installed base plus the amount of time between when Apple releases a new system and the time that a statistically significant portion of Apple's 13% of the market trusts it. Does it sound like I feel pretty cynical about Apple these days? It should. - --------------------------------------------------------------------- Paul F. Snively "Just because you're paranoid, it doesn't mean chewy@shell.portal.com that there's no one out to get you." --------------------------- >From knop@duteca8.et.tudelft.nl (Peter Knoppers) Subject: updated list of bizarre key combos on the mac Date: 2 May 1994 21:52:34 GMT Organization: Delft University of Technology, Dept. of Electrical Engineering It has been quite a while since I last updated the list below. It is about double the size of the previous version. Recently I got a few requests for the "current" version, so I decided to create a "current" version. Enjoy! List of bizarre, useful keyboard combinations, version 1.2, May 2, 1994. - --------------------------------------------------------------------------- Effect: Rebuild the desktop file. How to obtain: Hold COMMAND+OPTION during startup. Restrictions: None. Why use this: When your icons are suddenly lost, to reduce the size of the desktop file (and probably in some other cases). Learned from: Comp.sys.mac.faq, July 22, 1992. - --------------------------------------------------------------------------- Effect: Don't mount the internal SCSI disk (ID=0) on startup. How to obtain: Hold OPTION+COMMAND+SHIFT+BACKSPACE during startup. Restrictions: Only on ADB keyboard. Why use this: To by-pass (not boot from) a corrupt internal hard disk. Learned from: Posting by Daniel Mueller . - --------------------------------------------------------------------------- Effect: Startup with a minimal ROM-disk containing System 6.0.3, Finder 6.1x and AppleShare. How to obtain: Hold COMMAND+OPTION+X+O during startup. Restrictions: Only on the Mac Classic; this version of the System is NOT recommended to run the Classic under. Why use this; Probably for emergency repairs. Learned from: The Macintosh secret trick list, 16 April, 1992. - --------------------------------------------------------------------------- Effect: Zap the PRAM (Parameter RAM). How to obtain: Hold COMMAND+OPTION+P+R during startup. Restrictions: Only on System 7 and your timing seems to be critical... Why use this: This sometimes cures weird problems. Learned from: The Macintosh secret trick list, 16 April, 1992. - --------------------------------------------------------------------------- Effect: Don't load extensions and don't execute startup items. How to obtain: Hold SHIFT during startup. Restrictions: System 7. Why use this: To start a Macintosh with a conflicting collection of extensions and startup items. Learned from: Rene G.A. Ros rgaros@bio.vu.nl>, or - --------------------------------------------------------------------------- Effect: Don't execute startup items. How to obtain: Press and hold SHIFT after the last extension has loaded, but before the finder is completely started. Restrictions: System 7. Why use this: To start a Macintosh that has a conflicting collection of startup items. Learned from: Rene G.A. Ros rgaros@bio.vu.nl>, or - --------------------------------------------------------------------------- Effect: Eject floppy disk before looking for a boot disk. How to obtain: Hold MOUSEBUTTON during startup. Restrictions: None. Why use this: If you have a boot disk in the floppy drive, but don't want to boot from it. Learned from: Michael Grabenstein or . - --------------------------------------------------------------------------- Effect: Kill the current foreground process. How to obtain: Type COMMAND+OPTION+ESCAPE. Restrictions: Only on System 7. Why use this: After an application has crashed this might regain you control of the machine in order to save work done in other applications before restarting. Restart as soon as possible afterwards because some things may have been clobbered by the crashed application. Learned from: The Macintosh secret trick list, 16 April, 1992. - --------------------------------------------------------------------------- Effect: Rebuild the desktop. How to obtain: Type COMMAND+OPTION+ESCAPE while in the Finder, then (at the dialog "Force Finder to quit?") select Force Quit and then immediately hold OPTION+COMMAND. Restrictions: Only on System 7. Why use this: When your icons are suddenly lost, to reduce the size of the desktop file (and probably in some other cases). Learned from: Mark Noda . - --------------------------------------------------------------------------- Effect: Reset. How to obtain: Type COMMAND+CONTROL+POWER (power is the key with the triangle on it). Restrictions: Macintosh LC or Macintosh IIsi (which don't have a restart button). Why use this: To restart a hung system. Learned from: The Macintosh secret trick list, 16 April, 1992. - --------------------------------------------------------------------------- Effect: Restart the Mac. How To Obtain: Type COMMAND-SHIFT-POWER. (power is the key with the triangle on it). restrictions: Must have programmer's key installed. Why use this: To restart a hung system. Learned from: Joshua Rabinowitz . - --------------------------------------------------------------------------- Effect: Interrupt; enter the debugger. How to obtain: Type COMMAND+POWER. (power is the key with the triangle on it). Restrictions: Macintosh LC or Macintosh IIsi (which don't have an interrupt button). Why use this: To enter the debugger (if installed, else to crash the computer). Learned from: The Macintosh secret trick list, 16 April, 1992. - --------------------------------------------------------------------------- Effect: Eject the floppy disk in the internal drive immediately. How to obtain: Hold COMMAND+SHIFT+1. Restrictions: None (known). Why use this: To save yourself one bent paper clip. This works even while _in_ the format dialog, thus enabling you to replace the floppy in the drive by one with an unrepairable desktop file. Learned from: Owen S. Nishioka - --------------------------------------------------------------------------- Effect: Eject the floppy disk in the external (or second internal) drive immediately. How to obtain: Hold COMMAND+SHIFT+2. Restrictions: None (known). Why use this: To save yourself one bent paper clip. This works even while _in_ the format dialog, thus enabling you to replace the floppy in the drive by one with an unrepairable desktop file. Learned from: Owen S. Nishioka - --------------------------------------------------------------------------- Effect: Create a screen dump in MacPaint format. How to obtain: Type COMMAND+SHIFT+3. Restrictions: None. Why use this: To create documentation of a Macintosh product. The screen dump files are created in the root directory of the drive and are assigned unique names starting with "screen". Learned from: Posting by Matt Georgy . - --------------------------------------------------------------------------- Effect: Zap the PRAM (Parameter RAM). How to obtain: Hold COMMAND+OPTION+SHIFT while activating the control panel with the mouse. Restrictions: System 6. Why use this: This sometimes cures weird problems. Learned from: Walter - --------------------------------------------------------------------------- Effect: Cycle keyboard mappings. How to obtain: Hold COMMAND+OPTION+SPACE. Restrictions: System 7. Why use this: To switch to the appropriate keyboard mapping when you use several languages. To show the current keyboard in the menu bar edit the 'itlc' resource with ResEdit and turn "Show Keyboard Menu" on. Learned from: Paul Savage - --------------------------------------------------------------------------- Effect: Format a floppy disk that has an un-repairable desktop file. How to obtain: Hold COMMAND+OPTION+SHIFT+TAB while inserting the floppy disk. Restrictions: None (known). Why use this: To re-use the floppy (and destroy all information currently stored on it). Learned from: Owen S. Nishioka - --------------------------------------------------------------------------- Please MAIL additions/corrections/suggestions to knop@duteca.et.tudelft.nl If there is interest, I will maintain, correct and extend this list. I expect that the "Restrictions:" lines are not 100% correct... -- _____ __ __ __ __ ____ _____ _____ ______ _____ _____ | _ \ | |/ || \| | / \ | _ \ | _ \ | ___|| _ \ / ___| | __/ _ | < | || || || __/ | __/ | >__ | < \__ \ |__| |_| |__|\__||__|\__| \____/ |__| |__| |______||__|\__||_____/ Delft University of Technology, The Netherlands, knop@duteca.et.tudelft.nl +++++++++++++++++++++++++++ >From Frank Manshande Date: Tue, 3 May 1994 07:07:15 GMT Organization: AND Software BV In article <2q3sn2$lj4@liberator.et.tudelft.nl> Peter Knoppers, knop@duteca8.et.tudelft.nl writes: >Effect: Reset. >How to obtain: Type COMMAND+CONTROL+POWER > (power is the key with the triangle on it). >Restrictions: Macintosh LC or Macintosh IIsi (which don't have a restart > button). >Why use this: To restart a hung system. >Learned from: The Macintosh secret trick list, 16 April, 1992. My Centris 660AV does the same, and I suspect all new Macintoshes can do a restart using this key combination. I missed pressing the POWER key seperately. On the Centris 660AV this brings up a dialog asking the user if he or she wants to shutdown the computer. This is the same with the Color Classic, and probably some more Macs. It is also very logical to use the same key for starting up a Mac as for shutting down (although you can't start up a Centris 660AV this way, because it has a real power switch :( ). The first computer I saw which used a key on the keyboard to shutdown the computer was the NeXT. Frank Manshande frankm@and.nl AND Software BV Rotterdam, The Netherlands +++++++++++++++++++++++++++ >From Bruce@hoult.actrix.gen.nz (Bruce Hoult) Date: Fri, 6 May 1994 15:07:25 +1200 (NZST) Organization: (none) Frank Manshande writes: > The first computer I saw which used a key on the keyboard to shutdown > the computer was the NeXT. It's not on the keyboard, but perhaps you never saw the Apple Lisa? You hit the power switch, and it shut down all the applications and turned off. When you turned it back on, it opened all the applications and documents again, just the way you left them... +++++++++++++++++++++++++++ >From rarachel@poly.edu (Arsen Ray Arachelian) Date: Fri, 6 May 1994 04:13:34 GMT Organization: Polytechnic University, New York : The first computer I saw which used a key on the keyboard to shutdown : the computer was the NeXT. Of course there was the Lisa with the Power switch inside the alcove where the keyboard sat. Not exactly on the keyboard, but certainly a soft-power on/off switch. First computer I ever saw that could shut itself off! :-) +++++++++++++++++++++++++++ >From epenneba@ux1.cso.uiuc.edu (I never ) Date: 6 May 1994 18:01:27 GMT Organization: University of Illinois at Urbana Could someone please mail me the original updated list? I must have missed it...... Thanks:) -Erik -- "Really ain't no use in me hanging around.... <><><> epenneba@ux1.cso.uiuc.edu Feeling sweet feelin', wish I could caress and kiss..." These are not the opinions of CCSO. I am the mouthpiece of Satan. --------------------------- End of C.S.M.P. Digest **********************