home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / csmpdigest / csmp-digest-v3-029 < prev    next >
Text File  |  2010-09-21  |  163KB  |  4,213 lines

  1. Received-Date: Sun, 22 May 1994 23:09:32 +0200
  2. From: pottier@clipper.ens.fr (Francois Pottier)
  3. Subject: csmp-digest-v3-029
  4. To: csmp-digest@ens.fr
  5. Date: Sun, 22 May 94 23:09:20 MET DST
  6. X-Mailer: ELM [version 2.3 PL11]
  7. Errors-To: listman@ens.fr
  8. Reply-To: pottier@clipper.ens.fr
  9. X-Sequence: 32
  10.  
  11. C.S.M.P. Digest             Sun, 22 May 94       Volume 3 : Issue 29
  12.  
  13. Today's Topics:
  14.  
  15.         64-bit multiply & divide for line intersections...?
  16.         A KON&BAL Puzzle Page of my own
  17.         Absoft C++
  18.         Absoft on Power Mac
  19.         Another BlockMove question
  20.         Async Disk Access
  21.         ExtFS Development
  22.         Help w- PPC and Time Tasks
  23.         How To Detect Screen Saver
  24.         Large device drivers: how to?
  25.         Taxes on shareware fees
  26.         Thread Mgr Native PPC NOT - why?
  27.         updated list of bizarre key combos on the mac
  28.  
  29.  
  30.  
  31. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  32. (pottier@clipper.ens.fr).
  33.  
  34. The digest is a collection of article threads from the internet newsgroup
  35. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  36. regularly and want an archive of the discussions.  If you don't know what a
  37. newsgroup is, you probably don't have access to it.  Ask your systems
  38. administrator(s) for details.  If you don't have access to news, you may
  39. still be able to post messages to the group by using a mail server like
  40. anon.penet.fi (mail help@anon.penet.fi for more information).
  41.  
  42. Each issue of the digest contains one or more sets of articles (called
  43. threads), with each set corresponding to a 'discussion' of a particular
  44. subject.  The articles are not edited; all articles included in this digest
  45. are in their original posted form (as received by our news server at
  46. nef.ens.fr).  Article threads are not added to the digest until the last
  47. article added to the thread is at least two weeks old (this is to ensure that
  48. the thread is dead before adding it to the digest).  Article threads that
  49. consist of only one message are generally not included in the digest.
  50.  
  51. The digest is officially distributed by two means, by email and ftp.
  52.  
  53. If you want to receive the digest by mail, send email to listserv@ens.fr
  54. with no subject and one of the following commands as body:
  55.     help                        Sends you a summary of commands
  56.     subscribe csmp-digest Your Name    Adds you to the mailing list
  57.     signoff csmp-digest            Removes you from the list
  58. Once you have subscribed, you will automatically receive each new
  59. issue as it is created.
  60.  
  61. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  62. Questions related to the ftp site should be directed to
  63. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  64. digest are available there.
  65.  
  66. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.
  67.  
  68.  
  69. -------------------------------------------------------
  70.  
  71. >From dmc@leland.Stanford.EDU (David M. Cannon)
  72. Subject: 64-bit multiply & divide for line intersections...?
  73. Date: 3 May 1994 03:05:32 GMT
  74. Organization: Stanford University, CA 94305, USA
  75.  
  76.  
  77. I've been trying to adapt some of the code from Graphics Gems for use
  78. on some simple mac graphics that I'm doing.  In particular, I'm working
  79. to get some of the line-intersection code to work for Quickdraw's
  80. graphic space, signed 16-bit integers in each direction.  To do this,
  81. I need routines which will multiply 2 32-bit integers to get a 64 bit
  82. signed integer, and then to divide that 64-bit integer by a 32 bit
  83. signed integer.  There is a 64-bit multiply in the GG code, but it
  84. appears to be designed for intel chips (?), and my attempts to modify
  85. it don't weem to work for signed integers; my divde routine is even
  86. more pathetic.  I have a feeling that code to do this stuff is out there
  87. somewhere sitting on an ftp server or someone's disk; anyone have any
  88. working code or pointers to such?  I've already resigned myself to
  89. acknowledging my mediocrity as a programmer after several hours at this
  90. today... surely better people have found this easy... :-/
  91.  
  92. Thanks,
  93.  
  94. Dave Cannon
  95. PLEASE REPLY TO:
  96. dmcannon@step.stanford.edu
  97.  
  98. +++++++++++++++++++++++++++
  99.  
  100. >From platypus@cirrus.som.cwru.edu (Gary Kacmarcik)
  101. Date: 03 May 1994 19:47:23 GMT
  102. Organization: Case Western Reserve University, Cleveland, Ohio (USA)
  103.  
  104.  
  105. In article <2q4f1s$3n0@nntp2.Stanford.EDU> dmc@leland.Stanford.EDU (David M. Cannon) writes:
  106.  
  107. > I've been trying to adapt some of the code from Graphics Gems for use
  108. > on some simple mac graphics that I'm doing.  In particular, I'm working
  109. > to get some of the line-intersection code to work for Quickdraw's
  110. > graphic space, signed 16-bit integers in each direction.  To do this,
  111. > I need routines which will multiply 2 32-bit integers to get a 64 bit
  112. > signed integer, and then to divide that 64-bit integer by a 32 bit
  113. > signed integer.  There is a 64-bit multiply in the GG code, but it
  114.  
  115. i wrote the following a while ago, and haven't had problems with it.
  116. on the other hand, i haven't tested it fully.  make sure that you 
  117. understand the code before you add it to any program that involves
  118. life-support ;-)
  119.  
  120. the mult64 (64-bit = 32 x 32) and mult128 (128 = 64 x 64) code is commented
  121. fairly well, but the divide code leaves a bit to be desired.
  122.  
  123. note that if your compiler supports 64-bit data types, you should use them.
  124. the PowerPC can do a 64=32x32 in 2 instructions (mullw and mulhw[u]), and
  125. 64-bit PowerPC's (like the 620) will be able to do 128=64x64 in two
  126. instructions (mulld and mulhd[u]).
  127.  
  128. enjoy
  129.  
  130. -gary j kacmarcik
  131. platypus@nimbus.som.cwru.edu
  132.  
  133.  
  134. tabs should be set to 4 or else the code will look uglier than necessary.
  135. the code assumes the following typedefs:
  136.  
  137. typedef short int16;
  138. typedef long int32;
  139.  
  140. typedef unsigned char uchar;
  141. typedef unsigned short uint16;
  142. typedef unsigned long uint32;
  143.  
  144. typedef struct {
  145.     uint32    u,l;
  146.     } int64,uint64;
  147.  
  148. typedef struct {
  149.     uint32    uu,ul,lu,ll;
  150.     } int128,uint128;
  151.     
  152.  
  153. // **************
  154. // MULTIPLICATION
  155. // **************
  156.  
  157. // on a computer with 2n bits in a standard word, multiplying 2 2n-bit words has
  158. // the potential of overflowing the output word -- 4n bits are required to
  159. // guarantee that the result can be stored without overflow.
  160. //
  161. // the only way to insure that the result can be stored in a single word
  162. // is to limit the range of numbers that can be multiplied.  thus, if you
  163. // only allow numbers with n bits (or less) to be multiplied, you can guarantee
  164. // that the result will fit in a 2n-bit word.
  165. //
  166. // multiplying 2 2n-bit words can be accomplished by breaking up the 2n-bit x
  167. // 2n-bit multiply into a series of n-bit x n-bit multiplies.  this is good
  168. // because we know that the n x n bit multiplies will not cause an overflow.
  169. //
  170. // the process is the same as that used when multiplying numbers by hand.  e.g.:
  171. //
  172. //             9 3
  173. //           x 2 5
  174. //           -----
  175. //             1 5   = 5 x 3
  176. //           4 5     = 5 x 9 (shifted over to the 10's place)
  177. //           0 6     = 2 x 3 (shifted over to the 10's place)
  178. //         1 8       = 2 x 9 (shifted over to the 100's place)
  179. //         -------
  180. //         2 3 2 5
  181. //
  182. // the results of the individual multiplies are shifted over the appropriate
  183. // number of places and then added together
  184. //
  185. // this can be formalized as follows:
  186. //
  187. //     to multiply 2 2n-bit numbers u and v
  188. //          
  189. //          u = 2^n U1 + U0
  190. //          v = 2^n V1 + V0
  191. //       ------------------
  192. //      u * v = 2^2n U1 V1  +  2^n V1 U0  +  2^n U1 V0  +  U0 V0
  193. //
  194. // U1 and U0 can be thought of as the upper-half and the lower-half of u.
  195. // likewise with v.  the following figure shows the above formula graphically.
  196. // each block is n bits wide.
  197. //
  198. //                        +--------+--------+
  199. //                   u =  |   U1   |   U0   |
  200. //                        +--------+--------+
  201. //                        +--------+--------+
  202. //               *   v =  |   V1   |   V0   |
  203. //                        +--------+--------+
  204. //     ---------------------------------------
  205. //                        +--------+--------+
  206. //                        |      U0 V0      |
  207. //                        +--------+--------+
  208. //               +--------+--------+
  209. //               |      U1 V0      |            (shifted over n bits)
  210. //               +--------+--------+
  211. //               +--------+--------+
  212. //               |      V1 U0      |            (shifted over n bits)
  213. //               +--------+--------+
  214. //      +--------+--------+
  215. //      |      U1 V1      |                     (shifted over 2n bits)
  216. //      +--------+--------+
  217. //     ---------------------------------------
  218. //      +--------+--------+--------+--------+
  219. //      |               u * v               |
  220. //      +--------+--------+--------+--------+
  221. //
  222. // since a 2n-bit unit is that largest unit that we can deal with at a time, we
  223. // need to break the 2 middle terms (U1V0 and V1U0) into upper and lower halves
  224. // and then add the appropriate half to appropriate half of the result.  thus,
  225. // we need to take the lower n bits of the U1V0 term, shift them n bits to the
  226. // left, and add them to the lower 2n-bit half of the result term.  then we take
  227. // the upper n bits, shift them n bits to the left, and add them to the upper
  228. // 2n-bit half of the result term.  repeat for the V1U0 term.
  229. //
  230. // note that this requires 4 multiplies and 4 additions
  231. //
  232. // the above formula can be simplified to reduce the number of multiplies required
  233. // (at the expense of adding a few additions/subtractions)
  234. //
  235. //      u * v = 2^2n U1 V1  +  2^n V1 U0  +  2^n U1 V0  +  U0 V0
  236. //
  237. // adding  2^n U1 V1  -  2^n U1 V1  +  2^n U0 V0  -  2^n U0 V0  (which is the same
  238. // as adding 0)
  239. //
  240. //      u * v = (2^2n + 2^n) U1 V1  +  2^n (U1 - U0) (V1 - V0)  +  (2^n + 1) U0 V0
  241. //
  242. // or
  243. //      u * v = 2^2n U1 V1  +  2^n (U1 V1 + (U1-U0)(V1-V0) + U0V0)  +  U0 V0
  244. //
  245. // which requires 3 multiplies and 8 additions/subtractions (2 subtractions and
  246. // each middle (ie: 2^n) term requires 2 additions)
  247. //
  248. // the elimination of one of the multiplications can have a significant impact on
  249. // the performance depending on how many times this algorithm needs to be applied
  250. // recursively in order to obtain the desired multiplication operation.  the
  251. // following table
  252. //
  253. //   # of times          original         reduced
  254. //     applied            method           method
  255. //   recursively        *       +        *       +/-
  256. //  ------------------------------------------------
  257. //        1             4       4        3        8
  258. //        2            16      20        9       32
  259. //        3            64      84       27       96
  260. //        4           256     340       81      296
  261. //
  262. // it is obvious that the reduced method performs better than the original method
  263. // if we need to apply the algorithm more than 3 times recursively.  for the
  264. // other cases, we need to take into account the relative performance of the
  265. // multiply verses the addition operation.
  266. //
  267. //   for level  1  we replaced   1  multiply   with   4  add/sub's
  268. //   for level  2  we replaced   5  multiplies with  12  add/sub's
  269. //   for level  3  we replaced  37  multiplies with  12  add/sub's
  270. //
  271. // since multiplication requires more computation time that addition/subtraction,
  272. // the reduced method is advantageous for level 3.  for level 2, the reduced
  273. // method is advantageous if the average multiply requires more than 12/5 the
  274. // time of an add/subtract.  the reduced method is advantageous for level 1
  275. // if a multiply requires at least 4 times as much time as an add/subtract.
  276. //
  277. // in general, it is good to apply the reduced method.
  278. //
  279. // for more info: "The Art of Computer Programming, Volume II: Seminumerical
  280. // Algorithms", by D.E. Knuth.
  281. //
  282. // whew!  now we can actually implement it...
  283.  
  284.  
  285. // we rely on the compiler to generate the 32-bit product of 2 16-bit integers
  286. // this should be a basic instruction
  287. #define    mult16(x,y)        (uint32)(((uint32)x) * ((uint32)y))
  288.  
  289.  
  290. // multiply 2 32-bit integers and return a 64 bit result
  291. // (13OCT93)
  292. uint64
  293. mult32(uint32 u,uint32 v)
  294.    {int32 u1,u0;
  295.     int32 v1,v0;
  296.     int32 u1v1,u0v0,u1u0_v1v0,t;
  297.     int32 r1,r0;
  298.     int64 result;
  299.     
  300.     u1 = (u >> 16) & 0x0000FFFF;
  301.     u0 = u & 0x0000FFFF;
  302.     v1 = (v >> 16) & 0x0000FFFF;
  303.     v0 = v & 0x0000FFFF;
  304.     
  305.     u0v0 = mult16(u0,v0);
  306.     u1v1 = mult16(u1,v1);
  307.     u1u0_v1v0 = mult16((u1-u0),(v1-v0));
  308.     
  309.     r0 = u0v0;
  310.     r1 = u1v1;
  311.     
  312.     // take upper half on middle terms, shift them to the right, and add them
  313.     // to the lower part of the upper half of the result
  314.     t = (u1v1 >> 16) & 0x0000FFFF;
  315.     r1 += t;
  316.     t = (u0v0 >> 16) & 0x0000FFFF;
  317.     r1 += t;
  318.     t = (u1u0_v1v0 >> 16) & 0x0000FFFF;
  319.     r1 += t;
  320.     
  321.     // take lower half on middle terms, shift them to the left, and add them
  322.     // to the upper part of the lower half of the result
  323.     t = (u1v1 << 16) & 0xFFFF0000;
  324.     r0 += t;
  325.     t = (u0v0 << 16) & 0xFFFF0000;
  326.     r0 += t;
  327.     t = (u1u0_v1v0 << 16) & 0xFFFF0000;
  328.     r0 += t;
  329.         
  330.     result.u = r1;
  331.     result.l = r0;
  332.     return(result);}
  333.  
  334.  
  335. // multiply 2 64-bit integers and return a 128 bit result
  336. // (13OCT93)
  337. uint128
  338. mult64(uint64 u,uint64 v)
  339.    {int128 result;
  340.  
  341.     int32 u1,u0;
  342.     int32 v1,v0;
  343.     int64 u1v1,u0v0,u1u0_v1v0,t;
  344.     int64 r1,r0;
  345.     
  346.     u1 = u.u;
  347.     u0 = u.l;
  348.     v1 = v.u;
  349.     v0 = v.l;
  350.     
  351.     u0v0 = mult32(u0,v0);
  352.     u1v1 = mult32(u1,v1);
  353.     u1u0_v1v0 = mult32((u1-u0),(v1-v0));
  354.     
  355.     r0 = u0v0;
  356.     r1 = u1v1;
  357.     
  358.     // take upper half on middle terms, and add them
  359.     // to the lower part of the upper half of the result
  360.     t.u = 0;
  361.     t.l = u1v1.u;
  362.     addto64(&r1,t);
  363.     t.l = u0v0.u;
  364.     addto64(&r1,t);
  365.     t.l = u1u0_v1v0.u;
  366.     addto64(&r1,t);
  367.     
  368.     // take lower half on middle terms, and add them
  369.     // to the upper part of the lower half of the result
  370.     t.l = 0;
  371.     t.u = u1v1.l;
  372.     addto64(&r0,t);
  373.     t.u = u0v0.l;
  374.     addto64(&r0,t);
  375.     t.u = u1u0_v1v0.l;
  376.     addto64(&r0,t);
  377.     
  378.     result.uu = r1.u;
  379.     result.ul = r1.l;
  380.     result.lu = r0.u;
  381.     result.ll = r0.l;
  382.  
  383.     return(result);}
  384.  
  385. // ********
  386. // DIVISION
  387. // ********
  388.  
  389. // divide a 64-bit number by a 32-bit number and return a 64-bit quotient
  390. // and a 32-bit remainder
  391. // this operation is:
  392. //    dividend / divisor
  393. // the return values are such that
  394. //    dividend = (divisor x quotient) + remainder
  395. // (09JUN93 - 13OCT93)
  396. void
  397. divide64(uint64 dividend, uint32 divisor,
  398.         uint64 *quotient, uint32 *remainder)
  399.    {int neg_divisor=0,neg_dividend=0;
  400.     uint32 mask,x;
  401.  
  402.     // check if the divisor is negative
  403.     if(divisor & SIGN)
  404.        {neg_divisor = 1;
  405.         // negate the 32-bit divisor so that we deal with + numbers
  406.         divisor = ~divisor + 1;}
  407.     
  408.     // check if the dividend is negative
  409.     if(dividend.u & SIGN)
  410.        {neg_dividend = 1;
  411.         negate64(÷nd);}
  412.         
  413.     // calculate the upper and lower parts of the quotient
  414.     // if the upper part is non-zero, we have an overflow condition
  415.     mask = SIGN;
  416.     x = 0;
  417.     quotient->u = 0;
  418.     while(mask)
  419.        {x <<= 1;
  420.         x += ((dividend.u & mask)?1:0);
  421.         quotient->u <<= 1;
  422.         if(divisor <= x)
  423.            {x -= divisor;
  424.             quotient->u |= 1;}
  425.         mask >>= 1;}
  426.     mask = SIGN;
  427.     quotient->l = 0;
  428.     while(mask)
  429.        {if(x & SIGN)
  430.            {// overflow
  431.             quotient->u = SIGN;
  432.             quotient->l = 0;
  433.             return;}
  434.         x <<= 1;
  435.         x += ((dividend.l & mask)?1:0);
  436.         quotient->l <<= 1;
  437.         if(divisor <= x)
  438.            {x -= divisor;
  439.             quotient->l |= 1;}
  440.         mask >>= 1;}
  441.     *remainder = x;
  442.     
  443.     // we need to make sure that the sign of the result makes sense
  444.     // the remainder should have the same sign as the dividend
  445.     if(neg_dividend && ((*remainder & SIGN) != SIGN))
  446.         *remainder = ~*remainder + 1;
  447.     if(neg_dividend != neg_divisor)
  448.         negate64(quotient);}
  449.  
  450. +++++++++++++++++++++++++++
  451.  
  452. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  453. Date: Thu, 5 May 1994 18:05:17 +1200 (NZST)
  454. Organization: (none)
  455.  
  456. dmc@leland.Stanford.EDU (David M. Cannon) writes:
  457. > I need routines which will multiply 2 32-bit integers to get a 64 bit
  458. > signed integer, and then to divide that 64-bit integer by a 32 bit
  459. > signed integer.  There is a 64-bit multiply in the GG code, but it
  460. > appears to be designed for intel chips (?), and my attempts to modify
  461. > it don't weem to work for signed integers; my divde routine is even
  462. > more pathetic.
  463.  
  464. The work of a moment, if you're running on a 68020 or better :-)
  465.  
  466. - --------------------- lm.a -----------------------
  467.     case on
  468.     machine mc68020
  469.     
  470. muldiv64 proc export  ; long muldiv64(long mul1, long mul2, long div)
  471.     move.l 4(sp),d0
  472.     muls.l 8(sp),d1:d0
  473.     divs.l 12(sp),d1:d0
  474.     rts
  475.     endproc
  476.     end
  477. - --------------------- test.c -----------------------
  478. #include <stdio.h>
  479.  
  480. long muldiv64(long mul1, long mul2, long div);
  481.  
  482. int main(){
  483.     long a,b,c;
  484.     scanf("%d %d %d",&a,&b,&c);
  485.     printf("%d\n", muldiv64(a,b,c));
  486.     return 0;
  487. }
  488. - -----------------------------------------------------
  489.  
  490. That's enough to let you build and test it in MPW (it works).
  491. Uhhh -- you don't say whether you wanted the quotient or the
  492. remainder from the division -- I assumed the quotient.  If you
  493. want the remainder then swap d0 with d1 everywhere.
  494.  
  495. The object code output from lm.a is...
  496.  
  497. 00000000: 202F 0004      ' /..'            MOVE.L     $0004(A7),D0
  498. 00000004: 4C2F 0C01 0008 'L/....'          MULS.L     $0008(A7),D1:D0
  499. 0000000A: 4C6F 0C01 000C 'Lo....'          DIVS.L     $000C(A7),D1:D0
  500. 00000010: 4E75           'Nu'              RTS        
  501.  
  502. ... so you could make a C inline something like this (not tested)...
  503.  
  504. long muldiv64(long mul1, long mul2, long div)
  505.    = {0x202F, 0x0004, 0x4C2F, 0x0C01, 0x0008, 0x4C6F, 0x0C01, 0x000C};
  506.  
  507.  
  508. Happy coding :-)
  509.  
  510. -- Bruce
  511.  
  512. ---------------------------
  513.  
  514. >From pottier@goelette.ens.fr (Francois Pottier)
  515. Subject: A KON&BAL Puzzle Page of my own
  516. Date: 28 Apr 1994 11:18:55 GMT
  517. Organization: Ecole Normale Superieure, PARIS, France
  518.  
  519.  
  520. I had a hell of a debugging session last night... I had to single-step
  521. through the Palette Manager in order to understand what was wrong with my
  522. code. After solving the problem I thought the story was amusing, so I turned
  523. it into a KON & BAL Puzzle Page. Here it is. I hope you like it...
  524.  
  525. [This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  526.  real KON & BAL...]
  527.  
  528.  
  529. KON I have this cool application I'm writing which does some drawing in an
  530.     offscreen GWorld.
  531.         
  532. BAL Yeah, what about it?
  533.  
  534. KON Well, after I launch it, SetDepth becomes unreliable, and the machine
  535.     often crashes while trying to change the screen's pixel depth.
  536.         
  537. BAL You must have some slimy code in there mucking with Quickdraw's internals.
  538.  
  539. KON No, nothing of the sort, I just create an offscreen GWorld, draw a picture
  540.     into it and CopyBits it to the screen. Really innocuous.
  541.         
  542. BAL Okay, where does the crash occur ?
  543.  
  544. KON Always in the same place, somewhere in the System Heap. Must be the Layer
  545.     Manager or the Palette Manager or something. The code crashes with a bus
  546.     error because A4 contains an invalid pointer.
  547.         
  548. BALOkay, let's disassemble around the place and figure where the value in A4
  549.     comes from.
  550.         
  551. KON Apparently it comes from an array which was obtained from a low
  552.     memory global named PortList.
  553.         
  554. BAL PortList? Never heard of that one. We're lucky that Macsbug knows its
  555.     name. It's probably a list of all open grafports.
  556.         
  557. KON Yeah, SetDepth must be walking all ports and changing a few things in them.
  558.  
  559. BAL Fine. Let's have a look at the port that was being checked when the machine
  560.     crashed. Typing 'dm <addr> CGrafPort' will tell us lots of things about it.
  561.         
  562. KON Hey, that's one of my GWorlds! I recognize its bounds rect. That's funny, I
  563.     thought I had disposed of it, what's it doing in the port list?
  564.         
  565. BAL Hmm, exactly how did you dispose of it?
  566.  
  567. KON Well, I came up with a super KON kluge. All of my objects are allocated
  568.     within a custom heap zone created with InitZone. This way I don't need to
  569.     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  570.         
  571. BAL Yech.
  572.  
  573. KON Oh, it works fine, I never had a single memory leak.
  574.  
  575. BAL Sure, but you can't kill a GWorld this way. It actually releases the
  576.     memory, but since Quickdraw doesn't know about it, you're left with a
  577.     stale pointer in the port list. That's why your code crashes. Just call
  578.     DisposeGWorld properly before zapping your custom heap.
  579.         
  580. KON Oops - nasty.
  581.  
  582. BAL Yeah.
  583.  
  584. -- 
  585. Francois Pottier
  586. pottier@dmi.ens.fr
  587.  
  588. +++++++++++++++++++++++++++
  589.  
  590. >From Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter)
  591. Date: 29 Apr 1994 16:28:23 GMT
  592. Organization: Berkeley Systems
  593.  
  594. In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois
  595. Pottier) wrote:
  596.  
  597. > KON Well, I came up with a super KON kluge. All of my objects are allocated
  598. >     within a custom heap zone created with InitZone. This way I don't need to
  599. >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  600.  
  601. This is on ok thing to do but you have to be really careful about what get
  602. allocated in it.  If you are set to the heap and you do font stuff then
  603. some font related structures and resources will get loaded into it.  When
  604. you nuke the heap things get flaky.  We just had a problem with with
  605. PlotSuiteIcon() calling ReallocHandle() into our heap and when we nuked the
  606. heap all the icons on the desktop would go weird.
  607.  
  608. The reason to create a heap like this is not so you don't have to free
  609. individual blocks.  That is just sloppy programming.  We use it for
  610. allocating MultiFinder temp mem and turning it into a heap so we can use
  611. standard memory manager and resource calls with temp mem.
  612.  
  613. -- 
  614. Bruce Burkhalter
  615. Bruce_Burkhalter@inetlink.berksys.com
  616. All opinions are mine.
  617. Berkeley Systems Inc.
  618.  
  619. +++++++++++++++++++++++++++
  620.  
  621. >From dean@genmagic.com (Dean Yu)
  622. Date: 29 Apr 1994 18:03:16 GMT
  623. Organization: General Magic, Inc.
  624.  
  625. In article <Bruce_Burkhalter-290494092455@supercheese.berksys.com>,
  626. Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter) wrote:
  627. > In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois
  628. > Pottier) wrote:
  629. > > KON Well, I came up with a super KON kluge. All of my objects are allocated
  630. > >     within a custom heap zone created with InitZone. This way I don't need to
  631. > >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  632. > This is on ok thing to do but you have to be really careful about what get
  633. > allocated in it.  If you are set to the heap and you do font stuff then
  634. > some font related structures and resources will get loaded into it.  When
  635. > ...
  636. > The reason to create a heap like this is not so you don't have to free
  637. > individual blocks.  That is just sloppy programming.  We use it for
  638. > allocating MultiFinder temp mem and turning it into a heap so we can use
  639. > standard memory manager and resource calls with temp mem.
  640.  
  641.   When the Modern Memory Manager was being developed for Power Macs, about
  642. 20% of the time was spent actually coding it, then the rest of the time was
  643. spent going back in and adding compatability hacks to keep things that
  644. messed around with heaps and blocks working. In the end, it was much less
  645. cool than it could have been because too many things broke at first. The
  646. biggest headaches were programs that created their own heaps or walked the
  647. heaps themselves. If you're going to do either of these things, think long
  648. and hard about why and how you're doing it, what kind of assumptions about
  649. the structures you're making, and if possible, if there is any other way
  650. for you to do what you want to do.
  651.  
  652. -- Dean Yu
  653.    Negative Ethnic Role Model
  654.    General Magic, Inc.
  655.  
  656. +++++++++++++++++++++++++++
  657.  
  658. >From pottier@trimaran.ens.fr (Francois Pottier)
  659. Date: 30 Apr 1994 11:49:07 GMT
  660. Organization: Ecole Normale Superieure, PARIS, France
  661.  
  662. In article <dean-290494105850@dean_yu.genmagic.com>,
  663. Dean Yu <dean@genmagic.com> wrote:
  664.  
  665. >> > KON Well, I came up with a super KON kluge. All of my objects are allocated
  666. >> >     within a custom heap zone created with InitZone. This way I don't need to
  667. >> >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  668.  
  669. >> The reason to create a heap like this is not so you don't have to free
  670. >> individual blocks.  That is just sloppy programming.  We use it for
  671. >> allocating MultiFinder temp mem and turning it into a heap so we can use
  672. >> standard memory manager and resource calls with temp mem.
  673. >
  674. >If you're going to do either of these things, think long
  675. >and hard about why and how you're doing it, what kind of assumptions about
  676. >the structures you're making, and if possible, if there is any other way
  677. >for you to do what you want to do.
  678.  
  679. I know, and I have thought long and hard about it. My problem is the
  680. same as Bruce's : trying to make temporary memory behave the same way
  681. as normal memory.
  682.  
  683. I tried to think of other ways. For instance, since GetResource won't
  684. let you read a resource into temp mem, I figured I could create a block
  685. with TempNewHandle and then read into it with ReadPartialResource. This
  686. should work.
  687.  
  688. But I have another problem: the resource I want to load is a Quicktime
  689. compressed picture. Then I need to draw that picture. But Quicktime
  690. needs a lot of temporary storage for decompression, and apparently takes
  691. it from the current heap. So if the current heap is the System heap, or
  692. my own application heap, Quicktime runs out of memory and blows everything
  693. out of the water. That's why I had to create a heap in temporary memory.
  694.  
  695. I also thought of patching NewHandle of NewPtr in order to force Quicktime
  696. to use temp mem, but then I thought it was even skankier than creating my
  697. own zone.
  698.  
  699. If you have any ideas about that problem, I'd be really really glad to
  700. hear about them.
  701.  
  702. Thanks...
  703.  
  704. -- 
  705. Francois Pottier
  706. pottier@dmi.ens.fr
  707.  
  708. +++++++++++++++++++++++++++
  709.  
  710. >From slavins@psy.man.ac.uk (Simon Slavin)
  711. Date: 30 Apr 94 13:19:15 GMT
  712. Organization: Psychology Department, University of Manchester, England, UK
  713.  
  714. In article b0m@nef.ens.fr, pottier@goelette.ens.fr (Francois Pottier) writes:
  715. >
  716. >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  717. > real KON & BAL...]
  718.  
  719. Send it in !  develop will probably love it, and may publish it as a warning
  720. to treat memory allocation for the managers with care.  They'll especially
  721. like the way you used a de-bugger to figure out what was wrong.
  722. Actually, KON reads this group (very rarely) so he may see it.
  723. (KON co-wrote wonderprint, based on a column in an early develop.)
  724.  
  725. Glad you found you bug.
  726.  
  727. Simon.
  728. - -
  729. < "So I told her a couple of white lies, like I have friends and a life ..." >
  730. < - _Cheers_   A sub-Turing machine, and proud of it:  slavins@psy.man.ac.uk >
  731.  
  732.  
  733. +++++++++++++++++++++++++++
  734.  
  735. >From Reid Ellis <rae@alias.com>
  736. Date: Mon, 2 May 1994 23:22:57 GMT
  737. Organization: Alias Research, Inc., Toronto ON Canada
  738.  
  739. dean@genmagic.com (Dean Yu) writes:
  740. |  When the Modern Memory Manager was being developed for Power Macs, about
  741. |20% of the time was spent actually coding it, then the rest of the time was
  742. |spent going back in and adding compatability hacks to keep things that
  743. |messed around with heaps and blocks working.
  744.  
  745. Why weren't new memory manager calls created that didn't do the
  746. backwards-compatability hacks?  Then we could start using the new
  747. routines, and everyone's new apps are mondo cool.  We could even call
  748. it "Memory Manager GX"! :-)/2
  749.  
  750. Reid
  751.  
  752. --
  753. - -
  754. Reid Ellis, Alias Research Inc.
  755. +1 416 362 9181 <rae@Alias.com>
  756.  
  757. +++++++++++++++++++++++++++
  758.  
  759. >From 103t_english@west.cscwc.pima.edu
  760. Date: 3 May 94 15:13:05 MST
  761. Organization: (none)
  762.  
  763. In article <1994May2.232257.26544@alias.com>, Reid Ellis <rae@alias.com> writes:
  764. > dean@genmagic.com (Dean Yu) writes:
  765. > |  When the Modern Memory Manager was being developed for Power Macs, about
  766. > |20% of the time was spent actually coding it, then the rest of the time was
  767. > |spent going back in and adding compatability hacks to keep things that
  768. > |messed around with heaps and blocks working.
  769. > Why weren't new memory manager calls created that didn't do the
  770. > backwards-compatability hacks?  Then we could start using the new
  771. > routines, and everyone's new apps are mondo cool.  We could even call
  772. > it "Memory Manager GX"! :-)/2
  773. > Reid
  774. > --
  775. > ---
  776. > Reid Ellis, Alias Research Inc.
  777. > +1 416 362 9181 <rae@Alias.com>
  778.  
  779.  
  780. Great minds and all that...
  781.  
  782.  
  783. The could even have supplied New_and_Improved API's for it and started advanced
  784. notice on what will be required for protected memory and pre-emptive
  785. multi-tasking...
  786.  
  787.  
  788. Lawson
  789.  
  790. +++++++++++++++++++++++++++
  791.  
  792. >From dwareing@apanix.apana.org.au (David Wareing)
  793. Date: 2 May 94 15:53:15 GMT
  794. Organization: Apanix Public Access Unix, +61 8 373 5485 (5 lines)
  795.  
  796. pottier@goelette.ens.fr (Francois Pottier) writes:
  797.  
  798. >I had a hell of a debugging session last night... I had to single-step
  799. >through the Palette Manager in order to understand what was wrong with my
  800. >code. After solving the problem I thought the story was amusing, so I turned
  801. >it into a KON & BAL Puzzle Page. Here it is. I hope you like it...
  802.  
  803. >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  804. > real KON & BAL...]
  805.  
  806. <Puzzle involving the disposal of GWorlds, deleted>
  807.  
  808.  
  809. This is the first time I've ever solved one of KON & BAL'S puzzles :-)
  810. Does anyone else feel like a complete moron and utterly humiliated, after
  811. reading one of their puzzles?
  812.  
  813. :)
  814.  
  815. BTW, Francois - some nice tracing you did there. I would have scrapped any
  816. 5 or 6 routines at random, rewrote them and see how it worked :)
  817.  
  818. --
  819. David Wareing
  820. Adelaide, South Australia
  821. Mac Games & Multimedia Development        dwareing@apanix.apana.org.au
  822. - --------------------------------------------------------------------
  823.  
  824. +++++++++++++++++++++++++++
  825.  
  826. >From sparent@mv.us.adobe.com (Sean Parent)
  827. Date: Wed, 4 May 1994 19:14:53 GMT
  828. Organization: Adobe Systems Incorporated
  829.  
  830. In article <1994May2.232257.26544@alias.com>, Reid Ellis <rae@alias.com>
  831. wrote:
  832.  
  833. > Why weren't new memory manager calls created that didn't do the
  834. > backwards-compatability hacks?  Then we could start using the new
  835. > routines, and everyone's new apps are mondo cool.  We could even call
  836. > it "Memory Manager GX"! :-)/2
  837.  
  838. Because the heaps have different structures so the system would have to
  839. have a third set of calls that knew what to do with each heap slowing down
  840. the new mondo cool applications even more (and much of the speed win is
  841. coming from calls made within the system heap)! Your app would have to be
  842. very very careful about not making new calls on the system or process
  843. manager heaps. There where a couple of compatibility hacks where a shadow
  844. API would have been useful but not enough to worry about.
  845.  
  846. -- 
  847. Sean Parent
  848.  
  849. +++++++++++++++++++++++++++
  850.  
  851. >From u9119523@sys.uea.ac.uk (Graham Cox)
  852. Date: Thu, 5 May 1994 17:20:20 GMT
  853. Organization: School of Information Systems, UEA, Norwich
  854.  
  855. In article <dwareing.767893995@apanix.apana.org.au>,
  856. dwareing@apanix.apana.org.au (David Wareing) wrote:
  857.  
  858. > This is the first time I've ever solved one of KON & BAL'S puzzles :-)
  859. > Does anyone else feel like a complete moron and utterly humiliated, after
  860. > reading one of their puzzles?
  861.  
  862. Nope- I feel glad that I have a life, whereas those two obviously don't in
  863. spite of the fact I'm stuck in rainy old England while they live in Cal...
  864.  
  865.  
  866. - ------------------------------------------------------------------------
  867. Love & BSWK, Graham
  868.  
  869. -Everyone is entitled to their opinion, no matter how wrong they may be...
  870. - ------------------------------------------------------------------------
  871.  
  872. ---------------------------
  873.  
  874. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  875. Subject: Absoft C++
  876. Date: 05 May 1994 12:45:53 GMT
  877. Organization: L'AISON - Beverly Hills, Michigan
  878.  
  879. Jess M Holle (jess@ecn.purdue.edu) asks:
  880.  
  881.  > When does the C/C++ Absoft PPC compiler ship?
  882.  > Does it run only under MPW?
  883.  > Does it have templates, exceptions, namespaces, RTTI, etc?
  884.  > What's optimization going to be like as compared to Apple SDK,
  885.  > CodeWarrior, and Symantec's Cross-compiler?
  886.  
  887.  - The compiler will ship in July.
  888.  
  889.  - Yes, so far we are targetting it as an MPW Tool.  We may study
  890.  other possibilities; no immediate plans to change though.
  891.  
  892.  As for the features list, bear in mind that I am speaking unofficially
  893.  a couple of months before the product is released--things might change
  894.  before then (or even before I'm done typing these notes!):
  895.  
  896.   - Exceptions:  Probably not.
  897.  
  898.   - Namespaces: No.
  899.  
  900.   - RTTI: No.
  901.  
  902.   - Optimizations include but are not limited to:  Sophisticated
  903.  register allocation, working inliner, common sub-expression removal,
  904.  dead store removal, code scheduling, loop invariant removal, loop
  905.  unrolling, etc.  In a nutshell, I can say we'll be able to do mostly
  906.  the same optimizations that we do with our FORTRAN compilers.
  907.  
  908.  As for comparing it to Apple, Symantec, and other products, it's a
  909.  bit premature for that.  Maybe as we get through beta testing and
  910.  closer to release, we'll have some basis for comparisons.
  911.  
  912.  If you have any other technical questions, feel free
  913.  to contact me; either in the newsgroup or directly at
  914.  "support@absoft.com".  Thanks for your interest.
  915.  
  916.  
  917.  Lee David Rimar
  918.  Absoft Technical Support
  919.  (support@absoft.com, not the address in the message header)
  920.  
  921.  
  922.  DISCLAIMER:  Any opinions you find in this text are probably mine,
  923.  but you're welcome to share them.
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931. +++++++++++++++++++++++++++
  932.  
  933. >From rmah@panix.com (Robert S. Mah)
  934. Date: Fri, 06 May 1994 03:19:40 -0500
  935. Organization: One Step Beyond
  936.  
  937. Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote:
  938.  
  939. >  - The compiler [Absoft C/C++] will ship in July.
  940. > [...]
  941. >   - Exceptions:  Probably not.
  942. >   - Namespaces: No.
  943. >   - RTTI: No.
  944. >   - Optimizations include but are not limited to:  Sophisticated
  945. >     register allocation, working inliner, common sub-expression removal,
  946. > [...]
  947.  
  948. Thanks for the info...
  949.  
  950. How about templates?  Level of segmentation support?  Inline assembly 
  951. (68K and PPC)?  Will it generate both 68K and PPC code?  What provisions 
  952. are there for creating code resources (e.g. WDEF's and CDEF's)?
  953.  
  954. Cheers,
  955. Rob
  956. ___________________________________________________________________________
  957. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  958.  
  959. ---------------------------
  960.  
  961. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  962. Subject: Absoft on Power Mac
  963. Date: 02 May 1994 15:11:22 GMT
  964. Organization: L'AISON - Beverly Hills, Michigan
  965.  
  966.  Steve Ebstein (sebstein@netcom.com) asks:
  967.  
  968.  > Has Absoft's PowerPC native compiler shipped?
  969.  > Do you have any benchmark info comparing the 
  970.  > native compiler with the 68K versions ?
  971.  
  972.  Yes and Yes.  We starting shipping last week, and in general we
  973.  run between 4 to 8 times faster than a 68040.  It's hard to get
  974.  more detailed than that, because it depends a lot on specific
  975.  machine configurations and the kind of programs you're running.
  976.  
  977.  But that "4 to 8 times faster" comment is based on comparing
  978.  Whetstone and Linpack benchmarks on a couple of systems we
  979.  have here; a Power Mac 7100/66 and a Centris 650.  Whetstone
  980.  was about 4x faster on the Power Mac; Linpack about 8x.
  981.  
  982.  Remember: Your actual mileage may vary.
  983.  
  984.  
  985.  Lee D. Rimar
  986.  support@absoft.com
  987.  
  988.  Disclaimer:  Anything resembling an opinion probably is just that.
  989.  
  990.  
  991. +++++++++++++++++++++++++++
  992.  
  993. >From rmah@panix.com (Robert S. Mah)
  994. Date: Tue, 03 May 1994 02:15:57 -0500
  995. Organization: One Step Beyond
  996.  
  997. Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote:
  998.  
  999. >  Yes and Yes.  We starting shipping last week, and in general we
  1000. >  run between 4 to 8 times faster than a 68040.  It's hard to get
  1001. >  more detailed than that, because it depends a lot on specific
  1002. >  machine configurations and the kind of programs you're running.
  1003.  
  1004. So, could you give us a bit more info about the Absoft compiler?  The
  1005. level of ANSI conformance, environment support (I assume it needs MPW?),
  1006. retail price, etc.
  1007.  
  1008. Cheers,
  1009. Rob
  1010. ___________________________________________________________________________
  1011. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  1012.  
  1013. +++++++++++++++++++++++++++
  1014.  
  1015. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  1016. Subject: Absoft on Power Mac
  1017. Date: 05 May 1994 12:45:36 GMT
  1018. Organization: L'AISON - Beverly Hills, Michigan
  1019.  
  1020. Robert S. Mah (rmah@panix.com) asks:
  1021.  
  1022.  > Could you give us a bit more info about the Absoft compiler?  The
  1023.  > level of ANSI conformance, environment support (I assume it needs
  1024.  > MPW?), retail price, etc.
  1025.  
  1026.  I'd be glad to give you more info.  A little disclaimer up front though:
  1027.  I know many people are (justifiably) sensitive to any post that is even
  1028.  remotely "commercial" sounding, and my responses to your questions will
  1029.  probably qualify (especially since you asked the price).  But you *did*
  1030.  ask, so here I go...
  1031.  
  1032.  - The compiler is a full ANSI X3.9-1978 implementation, plus it offers
  1033.  lots of extensions (a good subset of VAX extensions, mostly).
  1034.  
  1035.  - Environment support:  Yes, this is an MPW tool.  We provide our own
  1036.  linker and debugger, but for editting, compiler control, etc., you use
  1037.  MPW.  Actually, I've played around with BBEdit and ToolServer, it works
  1038.  okay; and I'm told there are other text editors with AppleEvent and
  1039.  ToolServer support--so I suppose if you really *hated* MPW you could
  1040.  avoid using it.  But personally, I like MPW.
  1041.  
  1042.  - Retail price is $699, but there are good introductory offers going on
  1043.  now.  You should contact our sales department at 313-853-0050 for more
  1044.  details.
  1045.  
  1046.  If you have other questions, feel free to ask (either in the newsgroup,
  1047.  or write to me direct at "support@absoft.com").  Thanks for your interest.
  1048.  
  1049.  
  1050.  Lee D. Rimar
  1051.  Absoft Technical Support
  1052.  (support@absoft.com, not the address in the message header)
  1053.  
  1054.  
  1055.  DISCLAIMER:  Any opinions in this text are probably mine, but I don't
  1056.  know if anyone agrees with me.
  1057.  
  1058.  
  1059.  
  1060. ---------------------------
  1061.  
  1062. >From parkb@bigbang.Stanford.EDU (Brian Park)
  1063. Subject: Another BlockMove question
  1064. Date: 2 May 1994 17:48:35 GMT
  1065. Organization: Stanford University
  1066.  
  1067. Robert S. Mah <rmah@panix.com> wrote:
  1068. >It's not supposed to move memory.  The only problems that could occur
  1069. >is if someone patches BlockMove and the patch moves memory.
  1070.  
  1071. Thanks, something I've wondered myself.  Here's related question:
  1072.  
  1073. Which is more efficient, BlockMove() or standard ANSI memmove() 
  1074. (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1075. difference great enough that I should care at all?  I realize that
  1076. memmove() will usually be in another segment, so you have lock the
  1077. handle because the Segment Manager will move memory (took me a little
  1078. while to catch that bug...).  BlockMove() flushes the cache, so how much
  1079. penalty is that?  Does BlockMove() move one byte at a time, or does it
  1080. try to optimize by moving words or long words?
  1081.  
  1082. Brian Park
  1083.  
  1084. +++++++++++++++++++++++++++
  1085.  
  1086. >From jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~})
  1087. Date: 2 May 1994 20:50:27 GMT
  1088. Organization: University of California, Berkeley
  1089.  
  1090. In article <2q3edj$p56@nntp2.stanford.edu>,
  1091. Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1092. >
  1093. >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1094. >(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1095.  
  1096. I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1097. 5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1098. I don't have the numbers with me right now.  I think BlockMove() is 
  1099. almost twice as fast as memcpy().
  1100.  
  1101. I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160.
  1102. Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM.
  1103.  
  1104. -- Jiang
  1105.  
  1106.  
  1107.  
  1108.  
  1109. +++++++++++++++++++++++++++
  1110.  
  1111. >From jwbaxter@olympus.net (John W. Baxter)
  1112. Date: Mon, 02 May 1994 15:09:33 -0700
  1113. Organization: Internet for the Olympic Peninsula
  1114.  
  1115. In article <2q3edj$p56@nntp2.Stanford.EDU>, parkb@bigbang.Stanford.EDU
  1116. (Brian Park) wrote:
  1117.  
  1118. > Robert S. Mah <rmah@panix.com> wrote:
  1119. > >It's not supposed to move memory.  The only problems that could occur
  1120. > >is if someone patches BlockMove and the patch moves memory.
  1121. > Thanks, something I've wondered myself.  Here's related question:
  1122. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1123. > (coded in 680x0 assembly, both running on a 680x0 machine)?
  1124.  
  1125. Only testing will tell you for sure, and then only for the Mac models you
  1126. test on.  I'd expect that BlockMove () would be better.  [BlockMoveData (),
  1127. in fact, if there's no chance that what you are moving might be code, since
  1128. BlockMoveData () doesn't flush the '40 instruction cache, only the data
  1129. cache.]  BlockMove does pretty well about moving memory in chunks, rather
  1130. than byte at a time.  Either way will perform better if the data are
  1131. aligned well, particularly BlockMove ().  If the data are in handles, they
  1132. are aligned well.
  1133.  
  1134. In addition to moving in multi-byte chunks where possible, BlockMove () has
  1135. the advantage of being coded for the particular machine it's running on
  1136. (including PowerPC), whereas memmove () in a library is probably optimized
  1137. for only a particular member of the 680x0 family (and likely an old one
  1138. like an '020 at that).
  1139.  
  1140. -- 
  1141. John Baxter    Port Ludlow, WA, USA  [West shore, Puget Sound]
  1142.    jwbaxter@pt.olympus.net
  1143.  
  1144. +++++++++++++++++++++++++++
  1145.  
  1146. >From MorrisGC@ccmail.apldbio.com (George Morris)
  1147. Date: 2 May 94 23:30:02 GMT
  1148. Organization: Perkin Elmer, Applied Biosystems Div.
  1149.  
  1150. In article <2q3p2j$pt7@agate.berkeley.edu>, jiangwu@sickdog.CS.Berkeley.EDU
  1151. (Jiang Wu ~{Nb=-~}) wrote:
  1152.  
  1153. > In article <2q3edj$p56@nntp2.stanford.edu>,
  1154. > Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1155. > >
  1156. > >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1157. > >(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1158. > I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1159. > 5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1160. > I don't have the numbers with me right now.  I think BlockMove() is 
  1161. > almost twice as fast as memcpy().
  1162. > I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160.
  1163. > Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM.
  1164. > -- Jiang
  1165.  
  1166.  
  1167. Be careful!  When you say MUCH faster, what was your block size during the
  1168. tests?  BlockMove is more efficient but incurs the overhead of a trap call.
  1169.   A colleague at a previous company did some investiagtion into this and
  1170. found that for moves less than about 600 bytes (on a MacIIfx, MPW compiler
  1171. & linker) memcpy was faster because there was no trap call overhead.  I'm
  1172. not sure where the point will fall on todays systems but a IIfx is probably
  1173. above the median in performance of installed Macs and a good general
  1174. benchmark.  
  1175.  
  1176. George Morris
  1177. Applied Biosystems
  1178.  
  1179.  
  1180. +++++++++++++++++++++++++++
  1181.  
  1182. >From rmah@panix.com (Robert S. Mah)
  1183. Date: Mon, 02 May 1994 19:18:45 -0500
  1184. Organization: One Step Beyond
  1185.  
  1186. parkb@bigbang.Stanford.EDU (Brian Park) wrote:
  1187.  
  1188. > Robert S. Mah <rmah@panix.com> wrote:
  1189. > >It's not supposed to move memory.  The only problems that could occur
  1190. > >is if someone patches BlockMove and the patch moves memory.
  1191. > Thanks, something I've wondered myself.  Here's related question:
  1192. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1193. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1194. > difference great enough that I should care at all?  I realize that
  1195. > [...]
  1196.  
  1197. Because of various factors such as trap dispatcher and cache flushing
  1198. BlockMove is usually only faster when used with large blocks.  memmove()
  1199. and memcpy() are often faster if you're dealing with small blocks.
  1200.  
  1201. How large is "large" and how small is "small"?  It depends on the machine,
  1202. block alignment, whether it's executable code or not, etc.  I personally
  1203. use the rule of thumb that if I'm moving 256 bytes or less I use use my
  1204. own memory moving routine (similar to memmove) and if it's over 1024 bytes,
  1205. I use BlockMove.  Things in between depend on my mood.
  1206.  
  1207. Cheers,
  1208. Rob
  1209. ___________________________________________________________________________
  1210. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  1211.  
  1212. +++++++++++++++++++++++++++
  1213.  
  1214. >From sgl1@kimbark.uchicago.edu (Steven Lane)
  1215. Date: Mon, 2 May 1994 23:49:40 GMT
  1216. Organization: University of Chicago
  1217.  
  1218. jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~}) writes:
  1219. >In article <2q3edj$p56@nntp2.stanford.edu>,
  1220. >Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1221. >>
  1222. >>Which is more efficient, BlockMove() or standard ANSI memmove() 
  1223. >>(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1224. >
  1225. >I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1226. >5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1227. >I don't have the numbers with me right now.  I think BlockMove() is 
  1228. >almost twice as fast as memcpy().
  1229.  
  1230. I can confirm this for my own attempts to write a byte-copying routine
  1231. that would do short string copies faster than BlockMove. The
  1232. break-even point was around 20 characters. My assembly loop's
  1233. execution time rose *much* more rapidly than BlockMove's, which (in my
  1234. pretty extensive tests) had a very low time/block-size slope.
  1235. BlockMove, in other words, is pretty darn efficient.
  1236.  
  1237.  
  1238. -- 
  1239. - --
  1240. Steve Lane
  1241. University of Chicago, Department of History
  1242. sgl1@midway.uchicago.edu
  1243.  
  1244. +++++++++++++++++++++++++++
  1245.  
  1246. >From rang@winternet.mpls.mn.us (Anton Rang)
  1247. Date: 02 May 1994 23:04:17 GMT
  1248. Organization: Minnesota Angsters
  1249.  
  1250. In article <2q3edj$p56@nntp2.Stanford.EDU> parkb@bigbang.Stanford.EDU (Brian Park) writes:
  1251. >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1252. >(coded in 680x0 assembly, both running on a 680x0 machine)?
  1253.  
  1254.   Depends on how much data you're transferring.  Against a fairly
  1255. simple memory-move replacement I wrote, BlockMove was faster on chunks
  1256. of data bigger than 200-300 bytes or so; my routine was faster on
  1257. smaller chunks.
  1258.  
  1259. >Is the difference great enough that I should care at all?
  1260.  
  1261.   Is this happening in an inner loop somewhere?  Does your profiler
  1262. say that BlockMove() or memmove() is a bottleneck?  If not, why worry
  1263. about it?
  1264.  
  1265. >BlockMove() flushes the cache, so how much penalty is that?
  1266.  
  1267.   Can be quite a bit in a big loop, or on an '040.  Use the new
  1268. BlockMoveData() routine (aka "BlockMove with an extra bit set") if you
  1269. don't want the cache to be flushed on newer systems.  (Built in on the
  1270. Power Macintoshes, supposed to be included in a new system release for
  1271. older machines.)
  1272.  
  1273. >Does BlockMove() move one byte at a time, or does it
  1274. >try to optimize by moving words or long words?
  1275.  
  1276.   It may use move.b, move.w, move.l, or move16, depending on what
  1277. processor you're on and what the alignment is.  (I'm not sure whether
  1278. the current '040 BlockMove tries to use move16 or not...but it could.)
  1279. It's got some fairly large unrolled loops and various tricks to make
  1280. the last few bytes get transferred quickly.  Beating it for large
  1281. transfers could probably be done, but most likely isn't worth it.  For
  1282. small transfers, the trap dispatcher overhead (plus cache flush) can
  1283. be pretty expensive.
  1284.  
  1285.   It also makes a difference if the area of memory you're moving is
  1286. VM-locked or not, but unless you're doing drivers, you probably don't
  1287. need to worry about it.
  1288. --
  1289. Anton Rang (rang@winternet.mpls.mn.us)
  1290.  
  1291. +++++++++++++++++++++++++++
  1292.  
  1293. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  1294. Date: Tue, 3 May 1994 17:17:30 +1200 (NZST)
  1295. Organization: (none)
  1296.  
  1297. parkb@bigbang.Stanford.EDU (Brian Park) writes:
  1298. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1299. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1300. > difference great enough that I should care at all?
  1301.  
  1302. For really small blocks (like 10 bytes or smaller), memcpy or memmove
  1303. (always use memcpy if you're sure the memory areas don't overlap --
  1304. it's faster) are much faster than BlockMove.
  1305.  
  1306. For really big blocks (like a few KB or bigger), BlockMove is much
  1307. faster.
  1308.  
  1309. For blocks in between: test on your own machine, the tradeoff point
  1310. moves.
  1311.  
  1312.  
  1313. > Does BlockMove() move one byte at a time, or does it
  1314. > try to optimize by moving words or long words?
  1315.  
  1316. On most machines, it trys to use long words.  On 68040 machines it
  1317. trys to use the MOVE16 instruction, which speeds things up by 50%
  1318. over a byte, word, or longword move -- on 040's a memory move is
  1319. essentially memory bandwidth limited (on my Q700, anyway) and byte,
  1320. word and longword copying loops are all the same speed, but MOVE16
  1321. is faster.
  1322.  
  1323. This is because of the cache.
  1324.  
  1325. Suppose you execute MOVE.L (AO),(A1) where the memory pointed to by
  1326. both A0 and A1 is different and not in cache.  It goes like this
  1327. (only on an '040):
  1328.  
  1329. 1) read the 16 bytes around (A0)
  1330. 2) read the 16 bytes around (A1)
  1331. 3) modify the appropriate longword in the cache line
  1332. 4) (eventually) write the 16 bytes around (A1)
  1333.  
  1334. As you can see, that requires three memory transactions for each 16
  1335. bytes copied.
  1336.  
  1337. When you use MOVE16, the CPU knows that you're going to modify all
  1338. 16 bytes in a cache line, and so it doesn't need to read them from
  1339. memory before changing them, resulting in a 50% speedup.
  1340.  
  1341. -- Bruce
  1342.  
  1343. +++++++++++++++++++++++++++
  1344.  
  1345. >From bdiamand@netcom.com (Ben Diamand)
  1346. Date: Tue, 3 May 1994 17:50:27 GMT
  1347. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1348.  
  1349. Just to add my 2 cents, I once wrote an asm BlockMove like routine
  1350. that knew about my machine(Se/30) and messed with the CACR.  I was
  1351. unable to *beat* BlockMove consistantly.  I was faster on non-aligned
  1352. data, and it was faster on %4/%16 data, but only by a real
  1353. small amount either way.  What does this mean?  I don't have a clue,
  1354. but I use NGetTrapAddress, and always use BlockMove, having proved to
  1355. myself that It was useless to roll my own, considering that I 
  1356. would have to most likely re-write it for each new chip.  For the
  1357. same reason, I would suspect that a library routine would not
  1358. be optimized for all chips. 
  1359.  
  1360. Ben Diamand
  1361. bdiamand@netcom.com
  1362. ALINK:bdiamand
  1363.  
  1364. +++++++++++++++++++++++++++
  1365.  
  1366. >From Ron_Hunsinger@bmug.org (Ron Hunsinger)
  1367. Date: Fri,  6 May 94 07:41:37 PST
  1368. Organization: Berkeley Macintosh Users Group
  1369.  
  1370. > Robert S. Mah <rmah@panix.com> wrote:
  1371. > >It's not supposed to move memory.  The only problems that could occur
  1372. > >is if someone patches BlockMove and the patch moves memory.
  1373.  
  1374. This kind of error would be immediately apparent, since the memory manager
  1375. moves memory by calling BlockMove.
  1376.  
  1377. > Thanks, something I've wondered myself.  Here's related question:
  1378. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1379. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1380. > difference great enough that I should care at all?  I realize that
  1381. > [...]
  1382.  
  1383. If you've ever disassembled BlockMove(), you'll see that it's optimized
  1384. to within an inch of its life.  Even with the trap dispatch overhead, it's
  1385. pretty hard to beat.  On anything bigger than 10 or 20 bytes, the only
  1386. thing that is likely to beat BlockMove would be BlockMove minus the trap 
  1387. dispatch code.  (Call NGetTrapAddress, and then write your own routine
  1388. that jumps directly to that address without trapping.  That's what the
  1389. Memory Manager does, but Apple doesn't recommend it for us mere mortals.
  1390. Of course, the ROM knows how to do NGetTrapAddress on the fly without 
  1391. calling NGetTrapAddress.)
  1392.  
  1393. memmove() is more interested in portability than speed.  I doubt that
  1394. it can beat BlockMove(), even on very short blocks and even despite the
  1395. trap dispatch overhead.
  1396.  
  1397. -Ron Hunsinger
  1398.  
  1399. ---------------------------
  1400.  
  1401. >From mars@netcom.com (Darren Giles)
  1402. Subject: Async Disk Access
  1403. Date: Wed, 4 May 1994 04:26:15 GMT
  1404. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  1405.  
  1406. This may be hopeless, but is there any way to do an async read from a
  1407. volume while QuickDraw activity is going on?  I'm trying to read
  1408. from a CD-ROM volume while doing CopyBits and such.
  1409.  
  1410. I'd like to make it "real" async operation, so I can continue getting
  1411. events, etc...  but I'm willing to try anything.  I don't even need
  1412. a notification on completion; I can just poll the last byte of the
  1413. buffer.
  1414.  
  1415. Is there any way to do this?  With the new SCSI Manager & all, I'm
  1416. keeping my fingers crossed.
  1417.  
  1418. - Darren "no nickname" Giles
  1419. - wishing the async versions of the routines really worked!
  1420.  
  1421.  
  1422. +++++++++++++++++++++++++++
  1423.  
  1424. >From rang@winternet.mpls.mn.us (Anton Rang)
  1425. Date: 04 May 1994 13:07:14 GMT
  1426. Organization: Minnesota Angsters
  1427.  
  1428. In article <marsCp9GBr.B95@netcom.com> mars@netcom.com (Darren Giles) writes:
  1429. >This may be hopeless, but is there any way to do an async read from a
  1430. >volume while QuickDraw activity is going on?  I'm trying to read
  1431. >from a CD-ROM volume while doing CopyBits and such.
  1432.  
  1433.   Sure.  Just call _Read with the asynchronous bit of the trap set.
  1434. You'll get a call through IOCompletion when it finishes, or you can
  1435. test the IOResult field of the parameter block.  (Don't poll the
  1436. buffer, you never know for sure what might come into it, and there's
  1437. no guarantee that it's being filled in the order you expected.)
  1438.  
  1439. >Is there any way to do this?  With the new SCSI Manager & all, I'm
  1440. >keeping my fingers crossed.
  1441.  
  1442.   As you noted, the new SCSI manager will let this happen, assuming
  1443. that the driver you're using supports it.  (Offhand, I don't know
  1444. whether Apple's current CD drivers do or not.)  If you're on a machine
  1445. with the old SCSI manager, you're out of luck (unless you're using a
  1446. third-party SCSI card or something similar).
  1447. --
  1448. Anton Rang (rang@winternet.mpls.mn.us)
  1449.  
  1450. +++++++++++++++++++++++++++
  1451.  
  1452. >From kluev@jonathan.srcc.msu.su (Kluev)
  1453. Date: Fri, 6 May 94 14:54:31 +0400
  1454. Organization: (none)
  1455.  
  1456. In article <marsCp9GBr.B95@netcom.com> mars@netcom.com
  1457. (Darren Giles) wrote:
  1458. > This may be hopeless, but is there any way to do an async read from a
  1459. > volume while QuickDraw activity is going on?  I'm trying to read
  1460. > from a CD-ROM volume while doing CopyBits and such.
  1461. >  
  1462. > I'd like to make it "real" async operation, so I can continue getting
  1463. > events, etc...  but I'm willing to try anything.  I don't even need
  1464. > a notification on completion; I can just poll the last byte of the
  1465. > buffer.
  1466. > Is there any way to do this?  With the new SCSI Manager & all, I'm
  1467. > keeping my fingers crossed.
  1468.  
  1469. You can do a sort of this even with old SCSI Manager
  1470. (in genaral with any device driver). The key idea is to read small
  1471. chunks of data in paralel to other activity, thus it would be
  1472. pseudo-concurency.
  1473.  
  1474. Read       Read       Read...
  1475.      Draw       Draw...
  1476.  
  1477. 1. One way is to install VblTask (or whatever), read small chunk of
  1478. data from inside it, poll ioResult whithin next VblTask, if there is
  1479. noErr read next chunk, and so on. By varying chunk size and VblCount
  1480. parameters you will be able to set the speed of file operations.
  1481.  
  1482. 2. The alternate way is to use "call chaining", i.e. read a small
  1483. chunk of data with completion set, issue another read call from
  1484. inside completion and so on. This method lacks of adjusting of
  1485. speed (see above). Moreover sometimes it would crash your computer,
  1486. because "the first read terminated immediatly -> first
  1487. completion called -> second call issued -> it terminated immediatly
  1488. -> second compl called (on top of the first one: StackSpace
  1489. decreased), and ever and ever..". So your stack will grow into your
  1490. heap = crash. See Develop 15.
  1491.  
  1492. 3. You may combine the first and the second method: read ->
  1493. completion-> VInstall (or whatever, will break completion chain) ->
  1494. VblTask -> read... But this is a bit more complicated, I recommend to
  1495. use the latter approach if the speed is really critical.
  1496.  
  1497. See details about async. routines in Develop 13, 15.
  1498.  
  1499. Michael Kluev.
  1500.  
  1501. ---------------------------
  1502.  
  1503. >From ggrant@Emerald.tufts.edu (G. Grant)
  1504. Subject: ExtFS Development
  1505. Date: Fri, 29 Apr 1994 17:46:04 GMT
  1506. Organization: Tufts University - Medford, MA
  1507.  
  1508. The "Apple External File System docs" write:
  1509.  
  1510. >"Our reccomendation at this point is against writing an external file
  1511. > system if there is any way to avoid it..."
  1512.  
  1513. The gods have spoken! Funny; I didn't think the ExtFS stuff would be 
  1514. taboo, especially since it has such a nice icon! :)
  1515.  
  1516. Ah, well, on to the next project, I guess...
  1517.  
  1518. -George
  1519.  
  1520.  
  1521. +++++++++++++++++++++++++++
  1522.  
  1523. >From tzs@u.washington.edu (Tim Smith)
  1524. Date: 1 May 1994 06:09:50 GMT
  1525. Organization: University of Washington School of Law, Class of '95
  1526.  
  1527. Amanda Walker <amanda@intercon.com> wrote:
  1528. >> Can someone point me to documentation on how to develop an External 
  1529. >> File System extension? I just couldn't seem to find the right tome... 
  1530. >
  1531. >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1532. >you don't want to write an external file system.
  1533.  
  1534. It most certainly does exist.  It's called "FST Cookbook".  It even comes
  1535. with a diskette containing sample code.  My copy is beta 1988.  I don't
  1536. recall them ever coming out with a final version, so it may be hard
  1537. to track down, unless the first poster knows a developer who happened
  1538. to get a copy back then.
  1539.  
  1540. (Nope, mine is not for sale).
  1541.  
  1542. --Tim Smith
  1543.  
  1544. +++++++++++++++++++++++++++
  1545.  
  1546. >From Gavin@UMich.EDU (Gavin Eadie)
  1547. Date: Mon, 02 May 1994 10:42:55 -0400
  1548. Organization: Ramsay Consulting
  1549.  
  1550. In article <2pvh3e$hq4@news.u.washington.edu>, tzs@u.washington.edu (Tim
  1551. Smith) wrote:
  1552.  
  1553. > Amanda Walker <amanda@intercon.com> wrote:
  1554. > >> Can someone point me to documentation on how to develop an External 
  1555. > >> File System extension? I just couldn't seem to find the right tome... 
  1556. > >
  1557. > >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1558. > >you don't want to write an external file system.
  1559. > It most certainly does exist.  It's called "FST Cookbook".  It even comes
  1560. > with a diskette containing sample code.  My copy is beta 1988.
  1561.  
  1562.    Nonetheless, what Amanda says is correct -- "you don't want to write an
  1563. external file system", I know, I've been there too and it's not fun.  There
  1564. was a presentation on a File System Manager at the WWDC two (three?) years
  1565. ago which looked like a rational alternative but I've not seem it show up
  1566. over the horizon yet ... Gav
  1567.  
  1568. +++++++++++++++++++++++++++
  1569.  
  1570. >From jumplong@aol.com (Jump Long)
  1571. Date: 3 May 1994 15:22:02 -0400
  1572. Organization: America Online, Inc. (1-800-827-6364)
  1573.  
  1574. In article <9404281622.AA30631@fusion.intercon.com>, amanda@intercon.com
  1575. (Amanda Walker) writes:
  1576.  
  1577. >ggrant@Emerald.tufts.edu (G. Grant) writes:
  1578. >> Can someone point me to documentation on how to develop an External 
  1579. >> File System extension? I just couldn't seem to find the right tome... 
  1580. >
  1581. >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1582. >you don't want to write an external file system.
  1583.  
  1584. I'll agree that writing a foreign file system isn't an easy task - you can
  1585. expect to spend a minimum of several months on a simple read-only file system.
  1586.  
  1587. However...
  1588.  
  1589. Since I've spent many hours over the last year working on it, the "It doesn't
  1590. exist" statement is wrong.  At last year's WWDC (1993), Apple (re)announced
  1591. work on the File System Manager (known as FSM).  Since it was announced
  1592. publicly at the WWDC, FSM isn't secret information.  To prove how real it is,
  1593. Apple currently ships two foreign file systems based on FSM: the ProDOS File
  1594. System (part of the software that comes with the Apple IIe Card for the
  1595. Macintosh LC) and Macintosh PC Exchange.
  1596.  
  1597. At this time, only Developers in Apple's Partner's program have been seeded
  1598. with beta versions of FSM and draft documentation (if you aren't in the
  1599. Partner's program, don't ask for FSM because you WON'T get it until it ships to
  1600. all developers).  I'm working on a sample foreign file system but it may not be
  1601. available in complete working condition for some time (hey, I said it can take
  1602. months and I'm only able to work on it part time).
  1603.  
  1604. -- Jim Luther (one of those Apple DTS types)
  1605.  
  1606. P.S. Amanda Walker: InterCon Systems has been sent the FSM seed package (I
  1607. don't remember who I sent it to though).
  1608.  
  1609.  
  1610. +++++++++++++++++++++++++++
  1611.  
  1612. >From quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  1613. Date: Thu, 05 May 1994 10:06:15 +0800
  1614. Organization: Department of Computer Science, The University of Western Australia
  1615.  
  1616. In article <2q688q$6s1@search01.news.aol.com>, jumplong@aol.com (Jump
  1617. Long) wrote:
  1618.  
  1619. >At this time, only Developers in Apple's Partner's program have been seeded
  1620. >with beta versions of FSM and draft documentation [...]
  1621.  
  1622. Which begs the question... Why?  Lots of other beta managers make it out
  1623. to 'normal' developers.
  1624. -- 
  1625. Quinn "The Eskimo!"      <quinn@cs.uwa.edu.au>     "Support HAVOC!"
  1626. Department of Computer Science, The University of Western Australia
  1627.  
  1628. +++++++++++++++++++++++++++
  1629.  
  1630. >From amanda@intercon.com (Amanda Walker)
  1631. Date: Thu,  5 May 1994 16:21:40 -0500
  1632. Organization: InterCon Systems Corporation, Herndon, VA USA
  1633.  
  1634. jumplong@aol.com (Jump Long) writes:
  1635. > Since I've spent many hours over the last year working on it, the "It does
  1636. > n't exist" statement is wrong.  At last year's WWDC (1993), Apple (re)
  1637. > announced work on the File System Manager (known as FSM).
  1638.  
  1639. Yup.  Of course, it's been on-again/off-again since BEFORE SYSTEM 7 WENT 
  1640. ALPHA, so please excuse my skepticism about whether or not Apple "really means 
  1641. it" this time :).
  1642.  
  1643. > At this time, only Developers in Apple's Partner's program have 
  1644. > been seeded with beta versions of FSM and draft documentation (if 
  1645. > you aren't in the Partner's program, don't ask for FSM because you 
  1646. > WON'T get it until it ships to all developers).
  1647.  
  1648. We're a partner, we've got the draft docs, and we're sticking with ExtFSHook
  1649. since the FSM is not sufficient for our needs, and offers no benefits over 
  1650. doing it the "hard way".  Now, to be sure, the FSM will be useful for many 
  1651. developers, especially those trying to talk to physical devices instead of 
  1652. network servers (note that AppleShare doesn't use the FSM either, and won't be 
  1653. able to unless the FSM is revved severely).  It's not a general File System 
  1654. Manager, but I'll grant that if and when it's released it'll be useful to many 
  1655. developers.
  1656.  
  1657.  
  1658. Amanda Walker
  1659. InterCon Systems Corporation
  1660.  
  1661.  
  1662.  
  1663. +++++++++++++++++++++++++++
  1664.  
  1665. >From jumplong@aol.com (Jump Long)
  1666. Date: 6 May 1994 01:51:03 -0400
  1667. Organization: America Online, Inc. (1-800-827-6364)
  1668.  
  1669. In article <quinn-050594100615@eriodon.cs.uwa.oz.au>, quinn@cs.uwa.edu.au
  1670. (Quinn "The Eskimo!") writes:
  1671.  
  1672. >>At this time, only Developers in Apple's Partner's program have been seeded
  1673. >>with beta versions of FSM and draft documentation [...]
  1674. >
  1675. >Which begs the question... Why?  Lots of other beta managers make it out
  1676. >to 'normal' developers.
  1677.  
  1678. Why? Until a little over a month ago, all we had to send to developers with FSM
  1679. was an out-of-date ERS that didn't cover all of FSM and what it did cover had
  1680. lots of mistakes. With just the ERS, we expected (and received from seeded
  1681. developers) *lots* of questions that good documentation and sample code would
  1682. prevent.  Since Developer Support only takes questions from developers in the
  1683. Partners program, we didn't want to give a product with no documentation to
  1684. everyone.
  1685.  
  1686. OK, so the draft documentation is written so why are we waiting?  Because I'm
  1687. on sabbatical and don't feel like working of Apple business until I have to :-)
  1688.  
  1689. - Jim Luther
  1690.  
  1691.  
  1692. +++++++++++++++++++++++++++
  1693.  
  1694. >From jumplong@aol.com (Jump Long)
  1695. Date: 6 May 1994 02:07:02 -0400
  1696. Organization: America Online, Inc. (1-800-827-6364)
  1697.  
  1698. In article <9405051621.AA40138@fusion.intercon.com>, amanda@intercon.com
  1699. (Amanda Walker) writes:
  1700.  
  1701. >We're a partner, we've got the draft docs, and we're sticking with ExtFSHook
  1702. >since the FSM is not sufficient for our needs, and offers no benefits over 
  1703. >doing it the "hard way".
  1704.  
  1705. I'll agree that if you already have a working foreign file system that hangs
  1706. off the ToExtFS hook, you have little reason to rewrite your file system using
  1707. FSM.  Apple doesn't have plans to rewrite our non-FSM based forign file system
  1708. like AppleShare, High Sierra, ISO 9660, etc using FSM because they work OK with
  1709. the current File Manager (we, like you, don't have time to fix what isn't
  1710. broke).
  1711.  
  1712. >Now, to be sure, the FSM will be useful for many 
  1713. >developers, especially those trying to talk to physical devices instead of 
  1714. >network servers (note that AppleShare doesn't use the FSM either, and won't be
  1715.  
  1716. >able to unless the FSM is revved severely).  It's not a general File System 
  1717. >Manager, but I'll grant that if and when it's released it'll be useful to many
  1718.  
  1719. >developers.
  1720.  
  1721. AppleShare could be written using FSM.  FSM is *not* limited to file systems
  1722. that use only local physical devices. Amanda, I don't know why you think it has
  1723. to be revised.  We've done a lot of extra work to make sure FSM and the rest of
  1724. the file system related managers support calls like VolumeMount just to make it
  1725. easier.  If you want a more complete explanation of this, send me a Link at
  1726. DEVSUPPORT next week (when I'm back from sabbatical) and I'll be glad to
  1727. discuss this with you.
  1728.  
  1729. - Jim Luther
  1730.  
  1731.  
  1732. +++++++++++++++++++++++++++
  1733.  
  1734. >From amanda@intercon.com (Amanda Walker)
  1735. Date: Fri,  6 May 1994 14:14:32 -0500
  1736. Organization: InterCon Systems Corporation, Herndon, VA USA
  1737.  
  1738. jumplong@aol.com (Jump Long) writes:
  1739. > AppleShare could be written using FSM.  FSM is *not* limited to 
  1740. > file systems that use only local physical devices.
  1741.  
  1742. Hmm.  Perhaps I should rephrase this.  You are correct in that it is not 
  1743. limited to physical devices--my impression, though, is still that this is 
  1744. where it will be most useful.
  1745.  
  1746. > Amanda, I don't know why you think it has to be revised.
  1747.  
  1748. I'm not sure I can respond to this on the net without breaking my NDA... :)
  1749.  
  1750. > If you want a 
  1751. > more complete explanation of this, send me a Link at DEVSUPPORT next 
  1752. > week (when I'm back from sabbatical) and I'll be glad to discuss this 
  1753. > with you. 
  1754.  
  1755. I'll try and write up our comments an impressions.  We'll also be at the file 
  1756. system sessions at the WWDC; I'll try to have comments there as well.
  1757.  
  1758. Also, I'm sorry if I gave the impression that we don't appreciate the FSM and 
  1759. the work that has gone into it.  Far otherwise.  Even if we don't use it for 
  1760. NFS/Share (which is admittedly an extreme case as far as XFS's go :)), it's 
  1761. still an incredible improvement over rolling your own completely from scratch.
  1762.  
  1763. I hope it actually ships this time :).  Any word on the B-Tree Manager? 
  1764. (another thing that was originally planned for System 7...)
  1765.  
  1766.  
  1767. Amanda Walker
  1768. InterCon Systems Corporation
  1769.  
  1770.  
  1771.  
  1772. ---------------------------
  1773.  
  1774. >From adamnash@Xenon.Stanford.EDU (Adam Nash)
  1775. Subject: Help w- PPC and Time Tasks
  1776. Date: 6 May 1994 03:59:42 GMT
  1777. Organization: Computer Science Department, Stanford University.
  1778.  
  1779. Well, I'm making the jump to PPC with my previously unreleased animation
  1780. library.  I've run into one small problem.  I use a Time Manager task
  1781. to keep my animation running at the same speed on different machines.
  1782. However, my previous Time Task was a VERY simple bit of assembly,
  1783. and now I need to know what to do to get it to work, in C, on the PPC.
  1784.  
  1785. I'm using MW CodeWarrior Gold.
  1786.  
  1787. Basically, I have a structure declared as such:
  1788.  
  1789. struct myTimeTask {
  1790.     TMTask theTask;
  1791.     Boolean isTime;
  1792. };
  1793.  
  1794. I would then set the Boolean to false, and check it every loop.  My time
  1795. task just set it to true.  In THINK C, it looked like this:
  1796.  
  1797. void pascal PixieTimer(void)
  1798. {
  1799.     // on entry a pointer to our time task is in A1
  1800.     // TR 2.0 reference
  1801.     
  1802.     asm {
  1803.         move.b    #true, PixieTimeTask.isTime(A1)
  1804.     }
  1805. }
  1806.  
  1807. So, will some brave soul out there explain to me what I need to do to
  1808. 1) put this into C
  1809. 2) deal w/ all the UPP stuff?
  1810.  
  1811. Thanx,
  1812. Adam
  1813.  
  1814. +++++++++++++++++++++++++++
  1815.  
  1816. >From zstern@adobe.com (Zalman Stern)
  1817. Date: Fri, 6 May 1994 08:16:55 GMT
  1818. Organization: Adobe Systems Incorporated
  1819.  
  1820. Adam Nash writes
  1821. [Deleted.]
  1822. > So, will some brave soul out there explain to me what I need to do to
  1823. > 1) put this into C
  1824. > 2) deal w/ all the UPP stuff?
  1825.  
  1826. #ifdef __powerc
  1827.  
  1828. void PixelTimer(TMTask *theTask)
  1829. {
  1830.     struct myTimeTask *myTask = (struct myTimeTask *)theTask;
  1831.  
  1832.     myTask->isTime = true;
  1833. }
  1834.  
  1835. RoutineDescriptor PixelTimerRDS =
  1836.     BUILD_ROUTINE_DESCRIPTOR(uppTimerProcInfo, &PixelTimer);
  1837.  
  1838. #define PixelTimerRD (&PixelTimerRDS)
  1839.  
  1840. #else
  1841.  
  1842. /* 68K code from above. */
  1843.  
  1844. #define PixelTimerRD (&PixelTimer)
  1845.  
  1846. #endif
  1847.  
  1848. /* Somewhere else in your code. */
  1849.     myTask.tmAddr = PixelTimerRD;
  1850.  
  1851. --
  1852. Zalman Stern           zalman@adobe.com            (415) 962 3824
  1853. Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  1854.           There is no lust like the present.
  1855.  
  1856. +++++++++++++++++++++++++++
  1857.  
  1858. >From jberry@teleport.com (James D. Berry)
  1859. Date: Fri, 06 May 1994 08:58:15 -0700
  1860. Organization: Consultant
  1861.  
  1862. In article <2qcfbe$3dv@Times.Stanford.EDU>, adamnash@Xenon.Stanford.EDU
  1863. (Adam Nash) wrote:
  1864.  
  1865. > I would then set the Boolean to false, and check it every loop.  My time
  1866. > task just set it to true.  In THINK C, it looked like this:
  1867.  
  1868. If this is really all you need to do (and you can be assurred of the
  1869. extended time manager; a good bet these days), then you don't need to
  1870. bother with the assembly portion at all. The time manager will set bit 15
  1871. of the qType field in the tmTask when you call PrimeTime, and clear it when
  1872. the time period expires (it is also cleared when you call InsTime or
  1873. InsXTime).
  1874.  
  1875. So don't bother with the call-back or UPPs or any of that nonesense -- the
  1876. time manager is already doing for you essentially what you have been
  1877. redundantly doing in your callback.
  1878.  
  1879. This is documented in late time manager documentation (don't trust me on
  1880. the exact details!).
  1881. -- 
  1882. James Berry
  1883. jberry@teleport.com
  1884.  
  1885. ---------------------------
  1886.  
  1887. >From dlb@netcom.com (David Beauchesne)
  1888. Subject: How To Detect Screen Saver
  1889. Date: Thu, 5 May 1994 18:17:30 GMT
  1890. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1891.  
  1892. How can you detect (programmatically) that a screen saver, such as
  1893. After Dark, has become activated?
  1894.  
  1895. It doesn't seem to send a suspend event or anything.
  1896.  
  1897. Any help would be appreciated.
  1898.  
  1899.  
  1900. TIA
  1901. -- 
  1902. David L. Beauchesne                                    dlb@netcom.com
  1903. Santa Cruz, California, USA
  1904.  
  1905. +++++++++++++++++++++++++++
  1906.  
  1907. >From csuley@netcom.com (Christopher S. Suley)
  1908. Date: Fri, 6 May 1994 08:32:13 GMT
  1909. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1910.  
  1911. In article <dlbCpCDH7.8wE@netcom.com>, David Beauchesne <dlb@netcom.com> wrote:
  1912. >How can you detect (programmatically) that a screen saver, such as
  1913. >After Dark, has become activated?
  1914.  
  1915. Here's a routine I use to detect whether a screen saver is active:
  1916.  
  1917. Boolean
  1918. SaverOn( void )
  1919. {
  1920.   long  result;
  1921.  
  1922.   if ( GetMBarHeight() > 0 )
  1923.   {
  1924.     if ( Gestalt( 'SAVR', &result ) == noErr )
  1925.     {
  1926.       return( (result & 0x02) != 0 );
  1927.     }
  1928.     else
  1929.     {
  1930.       return( false );
  1931.     }
  1932.   }
  1933.  
  1934.   return( true );
  1935. }
  1936.  
  1937. I make use of two facts here. Most of the code floating around on the net
  1938. for hiding the menu bar sets the menu bar height to zero. If the menu bar
  1939. height is not zeroed, I try the way cool, modern Gestalt method pioneered
  1940. by the regrettably litigious Berkeley Systems.
  1941.  
  1942. Hope this helps!
  1943.  
  1944. -- 
  1945. Want some? <slap, thud>                                       csuley@netcom.com
  1946. Want some? <slap, thud>                                      ChrisSuley@aol.com
  1947.  
  1948. ---------------------------
  1949.  
  1950. >From tob@zardoz.ece.cmu.edu (Toby Smith)
  1951. Subject: Large device drivers: how to?
  1952. Date: 2 May 1994 20:54:40 GMT
  1953. Organization: Electrical and Computer Engineering
  1954.  
  1955. We're working on a device driver here which has quickly exceeded 32k in
  1956. size.  Now that we've reached that point (and spent a few days trimming
  1957. the fat), what do we do next?  I'm using THINK C, and in the Project
  1958. Type... dialog there is indeed an option for "Multi-segment" in the
  1959. device driver category, but when compiling with this option on (and our
  1960. code broken into two, <32k segments), I get a "resource too big" error
  1961. message when linking.  Is this a problem with THINK not knowing that the
  1962. main segment should be a DRVR and the others should be DCOD?  Instead of
  1963. working this way, must I instead have two separate projects, one for the
  1964. DRVR and another for the DCOD?
  1965.  
  1966. Assuming that this isn't a major problem (building the relevant
  1967. resources, that is), what's next?  We have an init which will load a
  1968. DRVR, but what do we do with the DCOD jobbies?  How do we set up the
  1969. jump table so the driver can find the routines it needs?
  1970.  
  1971. As you might guess, I'm a little confused on this whole topic.  If you
  1972. have experience with something like this, or can point me towards any
  1973. meaningful text on the subject, I'd be very appreciative. 
  1974.  
  1975. Thanks,
  1976. Tob
  1977.  
  1978.  
  1979. +++++++++++++++++++++++++++
  1980.  
  1981. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  1982. Date: Wed, 04 May 1994 20:27:01 -0500
  1983. Organization: University of Illinois at Urbana-Champaign
  1984.  
  1985. In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby
  1986. Smith) wrote:
  1987.  
  1988. >We're working on a device driver here which has quickly exceeded 32k in
  1989. >size.  Now that we've reached that point (and spent a few days trimming
  1990. >the fat), what do we do next?  I'm using THINK C, and in the Project
  1991. >Type... dialog there is indeed an option for "Multi-segment" in the
  1992. >device driver category, but when compiling with this option on (and our
  1993. >code broken into two, <32k segments), I get a "resource too big" error
  1994. >message when linking.
  1995.  
  1996. Remember that THINK C counts up the total sizes of everything you put in a
  1997. single segment, including MacTraps and other libraries. Make sure that the
  1998. amount of code in each segment is <32K. Multisegment drivers work just
  1999. fine.
  2000.  
  2001. >Assuming that this isn't a major problem (building the relevant
  2002. >resources, that is), what's next?  We have an init which will load a
  2003. >DRVR, but what do we do with the DCOD jobbies?  How do we set up the
  2004. >jump table so the driver can find the routines it needs?
  2005.  
  2006. The multi-segment switch tells THINK C to generate it's own jump table, so
  2007. it will take care of this on its own. Now, as far as loading at INIT time,
  2008. you will probably want to get my device driver code. I have been working
  2009. on a couple of bug fixes for it (the latest released version, 2.2, has
  2010. several bugs), but I have been working on several other things and have
  2011. not completed it. Feel free to berate me with e-mail so that I finish
  2012. cleaning it up and send it out.
  2013.  
  2014. pr
  2015. -- 
  2016. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  2017. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  2018. System manager - Cognitive Science Group, Beckman Institute, UIUC
  2019. Internet: resnick@cogsci.uiuc.edu
  2020.  
  2021. +++++++++++++++++++++++++++
  2022.  
  2023. >From leblonk@netcom.com (Marcel Blonk)
  2024. Date: Thu, 5 May 1994 08:39:09 GMT
  2025. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2026.  
  2027. Toby Smith (tob@zardoz.ece.cmu.edu) wrote:
  2028. : We're working on a device driver here which has quickly exceeded 32k in
  2029. [text about problems with DRVR and DCOD resources]
  2030.  
  2031. Quick description of driver loading:
  2032.  
  2033. Since the INIT file will be closed after the init completes, all 
  2034. resources should be loaded and detached before this happens. Since the 
  2035. DCOD segment loader depends on opening 'DCOD' resources it is necessary 
  2036. to load all segments at inittime, and never unload (or even unlock) them, 
  2037. since any such action would prompt the segloader code to go look for the 
  2038. 'DCOD' resources again. The best/easiest/most compatible way to load a 
  2039. segment, is to simply call a routine within that segment. The segment 
  2040. loader will load the resource, MoveHHi (ouch, more about that later), and 
  2041. fill in the jumptable. If that is done for each segment, all DCOD 
  2042. resources should be detached (and of course whatever other resource you 
  2043. would like to keep around) (note, they are locked, but again, more 
  2044. about it later). Also, even before any of this, a 'DATA' segment is 
  2045. loaded by the DRVR entry code and detached. Don't worry about that one.
  2046. Now for the MoveHHi catch. Since this init time, and the driver is loaded 
  2047. into the system heap, it is absolutely undesirable that anything is 
  2048. MoveHHi and locked, if it is going to remain there (since this will limit 
  2049. to where the systemheap can shrink, not to mention heap fragmentation). 
  2050. The obvious solution, is to make all DCOD resources resSysHeap and 
  2051. resLocked. This will ensure that when the resource is loaded, it will be 
  2052. loaded low in the heap, and it will be locked, so the MoveHHi doesn't do 
  2053. anything (btw. if you want, you can make them preload also). Since Think 
  2054. C doesn't give you the option to specify the resource attributes of the 
  2055. DCOD resources and since I am a basically lazy person who doesn't enjoy 
  2056. going into ResEdit after every build, the following code, contains a 
  2057. kludge, which works, works safe, but which I would NOT use if I were to 
  2058. build a commercial shrinkwrap product (change the resource attributes 
  2059. with ResEdit after every non-debug build and #if DEBUG the kludge).
  2060. The kludge, btw, checks the resource attributes, changes them if 
  2061. necessary (wherein lies the problem. One should not change its own 
  2062. resource file like that. Although the kludge is safe, in that it will 
  2063. only change the attributes the first time the driver is loaded.)
  2064.  
  2065. I hope the following code will be clear enough to get the appropiate 
  2066. ideas. It was never used with Think C 6, so I don't know if it works with 
  2067. that (not as if I would garantee any of this code to work, all I can say 
  2068. is, I used it and it never failed on me). Think C 4 (if I recall correct) 
  2069. had main() in the DRVR resource. Think C 5 puts main() in on of the DCOD 
  2070. recources. The code given here is meant for Think C 5, but should be 
  2071. easily adaptable for other versions.
  2072.  
  2073.  
  2074. - ----------------------------------------------------------
  2075. #define PROJECT 'DRVR' or whatever code resource or 'APPL' if you're
  2076. using a test application project
  2077.  
  2078. /*
  2079.  *    include this in your main.c:
  2080.  *
  2081.  *        #define MAIN
  2082.  *        #include <segmentloader.h>
  2083.  *
  2084.  *        SEGSTART
  2085.  *            SEG( _seg1)        /* one entry for each segment
  2086.  *            SEG( _seg2)
  2087.  *        SEGEND
  2088.  *        if ( ResError() )
  2089.  *            oops!
  2090.  *
  2091.  *
  2092.  *
  2093.  *    include this once for each segment:
  2094.  *
  2095.  *        #include <segmentloader.h>
  2096.  *
  2097.  *        SEGMENT( _seg1)
  2098.  */
  2099.  
  2100. // the PROJECTNAME is included in each segment, just for debug/recognition
  2101. // purposes, feel free to remove it
  2102. #define SEGMENT(x)    static noname(){asm{dc.b "Segment: " PROJECTNAME 
  2103. "," 
  2104. #x}}void x(void);void x( void){}
  2105.  
  2106. #if PROJECT == 'APPL'
  2107.  
  2108. #define SEGSTART
  2109. #define SEG(x)
  2110. #define SEGEND
  2111.  
  2112. #else
  2113.  
  2114. #ifdef MAIN
  2115.  
  2116. #if PROJECT == 'DRVR'
  2117.  #define RESTYPE    'DCOD'
  2118. #else
  2119.  #define RESTYPE    'CCOD'
  2120. #endif
  2121.  
  2122. // the PROJECTNAME is included in this segment, just for debug/recognition
  2123. // purposes, feel free to remove it
  2124. static noname(){asm{dc.b "Segment: " PROJECTNAME ",MainSeg"}}
  2125.  
  2126. typedef void (*VSeg)( void);
  2127.  
  2128. #define SEGSTART    {int i=0;VSeg procs[16];int LoadSegs( VSeg [], int);
  2129. #define SEG(x)        {void x(void);procs[i++]=x;}
  2130. #define SEGEND        ResErr = LoadSegs( procs, i);}
  2131.  
  2132.  
  2133.  
  2134.  
  2135. void UnloadA4Seg( ProcPtr);
  2136.  
  2137. static int LoadSegs( VSeg seg[], int count);
  2138.  
  2139.  
  2140. static int LoadSegs( VSeg seg[], int count)
  2141. {
  2142. short            i, attr, wrongsegs, index;
  2143. OSErr            err;
  2144. register Handle    h;
  2145. THz                oldZone;
  2146. Handle            segments[ 32], mainseg;
  2147. short            id, mainid;
  2148. OSType            type;
  2149. unsigned char            s[ 256];
  2150.  
  2151.     oldZone = GetZone();
  2152.     SetZone( SysZone);
  2153.  
  2154. #if PROJECT == 'DRVR'
  2155. /* think 5.0 puts DRVR's main() in seperate DCOD resource */
  2156.     count++;
  2157. #endif
  2158.  
  2159.     mainseg = Get1IndResource( PROJECT, 1);
  2160.     if ( mainseg == nil )
  2161.     {    DebugStr( "\pno main segment");
  2162.         return( ResError());
  2163.     }
  2164.     GetResInfo( mainseg, &mainid, &type, s);
  2165.     if ( err = ResError() )
  2166.     {    DebugStr( "\pcould not get main segment info");
  2167.         return( err);
  2168.     }
  2169.  
  2170.     wrongsegs = 0;
  2171.     i = 0;
  2172.     for( index = Count1Resources( RESTYPE); index > 0; index--)
  2173.     {
  2174.         SetResLoad( false);
  2175.         h = Get1IndResource( RESTYPE, index);
  2176.         SetResLoad( true);
  2177.         if ( h == nil )
  2178.             break;
  2179.         GetResInfo( h, &id, &type, s);
  2180.         if ( (id & 0xffe0) == (0xf800 + ((mainid & 0x3f) << 5)) )
  2181.         {
  2182.             segments[ i++] = h;
  2183.             attr = GetResAttrs( h);
  2184.             if ( err = ResError() )
  2185.             {    DebugStr( "\presource error checking flags");
  2186.                 return( err);
  2187.             }
  2188.             if ( (attr & (resSysHeap | resLocked)) != 
  2189. (resSysHeap | 
  2190. resLocked) )
  2191.             {    SetResAttrs( h, attr | resSysHeap | resLocked);
  2192.                 wrongsegs++;
  2193.             }
  2194.         }
  2195.     }
  2196.  
  2197.     if ( i != count )
  2198.     {    DebugStr( "\pnot all segments are indentified");
  2199.         return( -1);
  2200.     }
  2201.  
  2202.     if ( wrongsegs != 0 )        // not all resource were loaded right
  2203.     {
  2204.         UpdateResFile( CurResFile());
  2205.  
  2206. /* unload all segments (might be in ApplZone) */
  2207.  
  2208.         for ( i = 0; i < count; i++)
  2209.             UnloadA4Seg( seg[i]);
  2210.  
  2211. /* attributes were wrong, release 'm, so as to not have 'm remain in the 
  2212. ApplZone */
  2213.         for ( i = 0; i < count; i++)
  2214.         {    h = segments[i];
  2215.             if ( *h != 0L )
  2216.                 ReleaseResource( h);
  2217.         }
  2218.     }
  2219.  
  2220. /* load all segments (again) */
  2221.  
  2222.     for ( i = 0; i < count; i++)
  2223.         (*(seg[i]))();
  2224.  
  2225. /* detach all resources */
  2226.  
  2227.     for ( i = 0; i < count; i++)
  2228.     {    h = segments[i];
  2229.         DetachResource( h);
  2230.         if ( err = ResError() )
  2231.         {    DebugStr( "\presource error detaching resources");
  2232.             return( err);
  2233.         }
  2234.     }
  2235.  
  2236.     DetachResource( mainseg);
  2237.     if ( err = ResError() )
  2238.     {    DebugStr( "\presource error detaching main resource");
  2239.         return( err);
  2240.     }
  2241.  
  2242.     SetZone( oldZone);
  2243.     return( noErr);
  2244. }
  2245.  
  2246. #endif        // #ifdef MAIN
  2247.  
  2248. #endif        // #if PROJECT == 'APPL'
  2249.  
  2250.  
  2251. +++++++++++++++++++++++++++
  2252.  
  2253. >From tob@zardoz.ece.cmu.edu (Toby Smith)
  2254. Date: 6 May 1994 19:54:02 GMT
  2255. Organization: Electrical and Computer Engineering
  2256.  
  2257. Pete Resnick (resnick@cogsci.uiuc.edu) wrote:
  2258. : In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby
  2259. : Smith) wrote:
  2260.  
  2261. : >We're working on a device driver here which has quickly exceeded 32k in
  2262. : >size.  Now that we've reached that point (and spent a few days trimming
  2263. : >the fat), what do we do next?  I'm using THINK C, and in the Project
  2264. : >Type... dialog there is indeed an option for "Multi-segment" in the
  2265. : >device driver category, but when compiling with this option on (and our
  2266. : >code broken into two, <32k segments), I get a "resource too big" error
  2267. : >message when linking.
  2268.  
  2269. : Remember that THINK C counts up the total sizes of everything you put in a
  2270. : single segment, including MacTraps and other libraries. Make sure that the
  2271. : amount of code in each segment is <32K. Multisegment drivers work just
  2272. : fine.
  2273.  
  2274. Okay, maybe I have a magically stupid version of THINK C (or maybe I'm
  2275. the one who's magically stupid...).  The total size of my code is around
  2276. 34k at this point.  I'm using no libraries whatsoever.  I've split that
  2277. 34k of code up into, lessee, 5 segments now just to be spiteful towards
  2278. the "resource too big" error messages I continue to receive every time I
  2279. try to do "Build device driver."  None of my individual segments exceeds
  2280. 11k at this point, and I'm still receiving that error message (and I do
  2281. indeed have the multi-segment option checked in the Device Driver dialog
  2282. box).  I couldn't hope to be more frustrated here.  Any suggestions?
  2283.  
  2284. Tob
  2285.  
  2286.  
  2287.  
  2288. +++++++++++++++++++++++++++
  2289.  
  2290. >From leblonk@netcom.com (Marcel Blonk)
  2291. Date: Sat, 7 May 1994 12:01:52 GMT
  2292. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2293.  
  2294. Toby Smith (tob@zardoz.ece.cmu.edu) wrote:
  2295. : : >We're working on a device driver here which has quickly exceeded 32k in
  2296. []
  2297. : : >Type... dialog there is indeed an option for "Multi-segment" in the
  2298. : : >device driver category, but when compiling with this option on (and our
  2299. : : >code broken into two, <32k segments), I get a "resource too big" error
  2300. : : >message when linking.
  2301. []
  2302. : Okay, maybe I have a magically stupid version of THINK C (or maybe I'm
  2303. : the one who's magically stupid...).  The total size of my code is around
  2304. : 34k at this point.  I'm using no libraries whatsoever.  I've split that
  2305. : 34k of code up into, lessee, 5 segments now just to be spiteful towards
  2306. : the "resource too big" error messages I continue to receive every time I
  2307. : try to do "Build device driver."  None of my individual segments exceeds
  2308. : 11k at this point, and I'm still receiving that error message (and I do
  2309. : indeed have the multi-segment option checked in the Device Driver dialog
  2310. : box).  I couldn't hope to be more frustrated here.  Any suggestions?
  2311.  
  2312. Maybe it's the DATA segment that's being too big. When you made the 
  2313. driver into a multi segment project, suddenly all the intersegment calls 
  2314. are adding their 6 bytes each to the jumptable, which resides in the DATA 
  2315. resource. So, the solution might be to remove static alloctated data 
  2316. and change it to dynamically allocated.
  2317.  
  2318. mb
  2319.  
  2320.  
  2321. ---------------------------
  2322.  
  2323. >From kidwell@wam.umd.edu (Christopher Bruce Kidwell)
  2324. Subject: Taxes on shareware fees
  2325. Date: 13 Apr 1994 21:29:10 GMT
  2326. Organization: University of Maryland, College Park
  2327.  
  2328. As tax time for us US folks rolls around, I was curious about what to do
  2329. about shareware payments received. Do small-time shareware authors out
  2330. there report their income? What about foreign income?
  2331.  
  2332. Chris Kidwell
  2333. kidwell@wam.umd.edu
  2334.  
  2335. +++++++++++++++++++++++++++
  2336.  
  2337. >From ellens@bnr.ca (Chris Ellens)
  2338. Date: Wed, 13 Apr 1994 18:06:49 -0400
  2339. Organization: BNR
  2340.  
  2341. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2342. (Christopher Bruce Kidwell) wrote:
  2343.  
  2344. > As tax time for us US folks rolls around, I was curious about what to do
  2345. > about shareware payments received. Do small-time shareware authors out
  2346. > there report their income? What about foreign income?
  2347. > Chris Kidwell
  2348. > kidwell@wam.umd.edu
  2349.  
  2350. I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2351. I did, I'd declare the shareware fees as business income, and then write
  2352. off my mailing expenses, my development software, and depreciation on my
  2353. new PowerMac (and maybe a few business lunches) as expenses and claim the
  2354. loss against my regular income.
  2355. -- 
  2356. Chris Ellens
  2357. ellens@bnr.ca
  2358.  
  2359. +++++++++++++++++++++++++++
  2360.  
  2361. >From omh@cs.brown.edu (Owen M. Hartnett)
  2362. Date: Thu, 14 Apr 1994 03:58:11 GMT
  2363. Organization: Brown University Department of Computer Science
  2364.  
  2365. In article <1994Apr14.025106.6190@news.yale.edu> owenc@minerva.cis.yale.edu (Christopher Owen) writes:
  2366. >Chris Ellens (ellens@bnr.ca) wrote:
  2367. >
  2368. >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2369. >: I did, I'd declare the shareware fees as business income, and then write
  2370. >: off my mailing expenses, my development software, and depreciation on my
  2371. >: new PowerMac (and maybe a few business lunches) as expenses and claim the
  2372. >: loss against my regular income.
  2373. >
  2374. >Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2375. >the shareware your loses are limited to your income from the activity. 
  2376. >Still you can write all you shareware income off pretty easily though.
  2377.  
  2378.  
  2379. This is correct. If you have any "outside" income over a certain very
  2380. minimal amount, you must report it either as miscellaneous income or file
  2381. a Schedule C - sole proprietorship. You report both domestic and foreign
  2382. income. You can report it as miscellaneous if you don't want to bother
  2383. with a schedule C, but you can't write off anything against it.
  2384.  
  2385. Filing a schedule C is a definite advantage to you, as you can write off
  2386. your expenses incurred against the income you made. If you show a definite
  2387. business intent (meant by the IRS as "you really truly intended to make
  2388. a profit" and you show a profit for 3 out of 5 years (this may have been
  2389. broadened a bit)) then in your loss years you can write off your losses
  2390. vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2391. income and your expenses can only be written off against the hobby income.
  2392.  
  2393. There are definite advantages to filing a schedule C and you may want to
  2394. consider them. Also consider the fact that, while you must report all
  2395. your income, you plan your own purchases, so you do
  2396. control whether or not your venture is profitable for a given year.
  2397.  
  2398. -Owen
  2399.  
  2400. -- 
  2401. Owen Hartnett                omh@cs.brown.edu
  2402. "FAITH, n. Belief without evidence in what is told by one who speaks
  2403.         without knowledge, of things without parallel."
  2404.             -Ambrose Bierce - The Devil's Dictionary
  2405.  
  2406. +++++++++++++++++++++++++++
  2407.  
  2408. >From Scott_Gruby@hmc.edu (Scott Gruby)
  2409. Date: Wed, 13 Apr 1994 19:22:11 -0700
  2410. Organization: Harvey Mudd College, Claremont CA
  2411.  
  2412. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2413. (Christopher Bruce Kidwell) wrote:
  2414.  
  2415. > As tax time for us US folks rolls around, I was curious about what to do
  2416. > about shareware payments received. Do small-time shareware authors out
  2417. > there report their income? What about foreign income?
  2418. > Chris Kidwell
  2419. > kidwell@wam.umd.edu
  2420.  
  2421. Unfortunately I don't have a direct answer to this question and I don't
  2422. plan on doing research until next year at tax time (I just started this
  2423. year); but I do have some information on state sales tax in
  2424. California...basically you don't have to collect it and people don't have
  2425. to pay it. That's what the Board of Equalization told me yesterday.
  2426.  
  2427. Something California shareware authors may want to note.
  2428.  
  2429. -- 
  2430. Scott Allen Gruby                         (Scott_Gruby@hmc.edu)
  2431. Macintosh Student System Manager
  2432. Academic Computing, Harvey Mudd College
  2433. Claremont, CA
  2434.          Finger ripem_public@eagle.st.hmc.edu for public key
  2435.  
  2436. +++++++++++++++++++++++++++
  2437.  
  2438. >From owenc@minerva.cis.yale.edu (Christopher Owen)
  2439. Date: Thu, 14 Apr 1994 02:51:06 GMT
  2440. Organization: Yale Center for International and Area Studies
  2441.  
  2442. Chris Ellens (ellens@bnr.ca) wrote:
  2443.  
  2444. : I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2445. : I did, I'd declare the shareware fees as business income, and then write
  2446. : off my mailing expenses, my development software, and depreciation on my
  2447. : new PowerMac (and maybe a few business lunches) as expenses and claim the
  2448. : loss against my regular income.
  2449.  
  2450. Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2451. the shareware your loses are limited to your income from the activity. 
  2452. Still you can write all you shareware income off pretty easily though.
  2453.  
  2454. Chris
  2455.  
  2456. --
  2457. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2458. 27 Bishop           ~  Voice: (203) 772-3382  ~  owenc@minerva.cis.yale.edu
  2459. New Haven CT 06511  ~  Data : (203) 772-4485  ~      finger for PGP key
  2460. - -------------------------------------------------------------------------
  2461.                      Different _can_ mean inferior
  2462. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2463.  
  2464.  
  2465. +++++++++++++++++++++++++++
  2466.  
  2467. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  2468. Date: Thu, 14 Apr 1994 00:02:18 -0500
  2469. Organization: University of Illinois at Urbana-Champaign
  2470.  
  2471. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2472. (Christopher Bruce Kidwell) wrote:
  2473.  
  2474. >As tax time for us US folks rolls around, I was curious about what to do
  2475. >about shareware payments received. Do small-time shareware authors out
  2476. >there report their income? What about foreign income?
  2477.  
  2478. I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2479. Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2480. also depreciate my computer and programming tools (compiler, Inside Mac,
  2481. etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2482. in the butt to figure out, but that's where you can take off part of the
  2483. cost of equipment, etc.
  2484.  
  2485. pr
  2486. -- 
  2487. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  2488. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  2489. System manager - Cognitive Science Group, Beckman Institute, UIUC
  2490. Internet: resnick@cogsci.uiuc.edu
  2491.  
  2492. +++++++++++++++++++++++++++
  2493.  
  2494. >From gdl@stlawrence.maths (Greg Landweber)
  2495. Date: 14 Apr 1994 10:53:44 GMT
  2496. Organization: (none)
  2497.  
  2498. In article <resnick-140494000218@ruger-6.slip.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2499.    In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2500.    (Christopher Bruce Kidwell) wrote:
  2501.  
  2502.    >As tax time for us US folks rolls around, I was curious about what to do
  2503.    >about shareware payments received. Do small-time shareware authors out
  2504.    >there report their income? What about foreign income?
  2505.  
  2506.    I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2507.    Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2508.    also depreciate my computer and programming tools (compiler, Inside Mac,
  2509.    etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2510.    in the butt to figure out, but that's where you can take off part of the
  2511.    cost of equipment, etc.
  2512.  
  2513. I do the same thing, except that on form 4562, I declare all my
  2514. computer-related expenses as Section 179 deductions.  That way, you
  2515. deduct the entire cost the first year and don't have to worry about
  2516. the various percentages for depreciation.  The limit for Section 179
  2517. deductions is $17,500.  Is there any reason why I shouldn't do this
  2518. (my shareware income is higher than the total cost of the hardware I
  2519. buy, so declaring Section 179 doesn't give me a loss)?
  2520.  
  2521. -- Greg Landweber
  2522.    gdl@maths.ox.ac.uk
  2523.  
  2524. +++++++++++++++++++++++++++
  2525.  
  2526. >From giles@med.cornell.edu (Aaron Giles)
  2527. Date: Thu, 14 Apr 1994 09:10:20 -0500
  2528. Organization: Cornell University Medical College
  2529.  
  2530. In article <1994Apr14.025106.6190@news.yale.edu>,
  2531. owenc@minerva.cis.yale.edu (Christopher Owen) wrote:
  2532.  
  2533. > Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2534. > the shareware your loses are limited to your income from the activity. 
  2535. > Still you can write all you shareware income off pretty easily though.
  2536.  
  2537. Actually, beginning this year that restriction has been lifted.  As long
  2538. as you have other income, you can end up with a loss for your business and
  2539. subtract that from your net income for purposes of calculating your taxes.
  2540.  
  2541. Aaron
  2542. -- 
  2543. Aaron Giles
  2544. Power Macintosh & Newton Developer
  2545. Cornell University Medical College
  2546. giles@med.cornell.edu
  2547.  
  2548. +++++++++++++++++++++++++++
  2549.  
  2550. >From ari@world.std.com (Ari I Halberstadt)
  2551. Date: Thu, 14 Apr 1994 16:29:42 GMT
  2552. Organization: The World Public Access UNIX, Brookline, MA
  2553.  
  2554. In article <2oho76$7mq@cville-srv.wam.umd.edu>,
  2555. Christopher Bruce Kidwell <kidwell@wam.umd.edu> wrote:
  2556. >As tax time for us US folks rolls around, I was curious about what to do
  2557. >about shareware payments received. Do small-time shareware authors out
  2558. >there report their income? What about foreign income?
  2559. >
  2560. >Chris Kidwell
  2561. >kidwell@wam.umd.edu
  2562.  
  2563. You have to pay taxes on just about all income you receive. You may
  2564. have to pay both state and federal taxes on your income. I think that
  2565. this would fall under the tax rules for self employed individuals or
  2566. small businesses.  This means that if you earned more than about $400
  2567. dollars, then you will have to pay federal income tax, social
  2568. security, medicaid and medicare, and state income tax. If you received
  2569. shareware payments from people within your state of business, then you
  2570. will also have to pay any state sales tax. At any rate, you will
  2571. certainly have to report your income to the government. You may be
  2572. able to take certain deductions on your taxes if they relate to your
  2573. work, such as computer books, hardware, and software. Unforuntately,
  2574. home office deductions are not too easy to take these days.
  2575.  
  2576. It isn't especially difficult to get all the relevant forms and fill
  2577. them out, but it can be a pain, especially if you've already got a job
  2578. and already had to fill out forms for it. Considering the late date,
  2579. you can always file an ammended return, but of course you'll owe any
  2580. interest on unpaid taxes. If you actually got a significant amount of
  2581. money in shareware fees, it may push your income into a heigher income
  2582. bracket; this may not have been what you wanted to happen... What you
  2583. really don't want to have to do (since it can be a bit of a pain) is
  2584. have to file estimated taxes for each year, but you may have no choice
  2585. in the matter.
  2586.  
  2587. You may not have to pay taxes if you earned less than a certain amount
  2588. on your shareware fees, or if your activity is considered a hobby (by
  2589. IRS and/or state tax rules).
  2590.  
  2591. I'm crossposting this to alt.computer.consultants, since, as I recall,
  2592. that was a good forum for discussing this sort of stuff. I haven't
  2593. read that group in a while though, so if this topic is inappropriate
  2594. please forgive me.
  2595.  
  2596. Disclaimer: I'm not a CPA, just a self-employed programmer. As usual,
  2597. don't trust any legal or tax advice you get on the net. Find the
  2598. relevant IRS documentation and read it. The IRS publishes several
  2599. books for small businesses that make figuring this all out much
  2600. simpler. There are also plenty of good tax guides out there for small
  2601. businesses, but always read the IRS literature, just to be sure.
  2602. -- 
  2603. Ari Halberstadt    ari@world.std.com     #include <std/disclaimer.h>
  2604. "These beetles were long considered to be very rare because very few
  2605. entomologists look for beetles in the mountains, in winter, at night,
  2606. during snow storms." -- Purves W. K., et al, "Life: The Science of
  2607.  
  2608. +++++++++++++++++++++++++++
  2609.  
  2610. >From jvp@tools1.ee.iastate.edu (Jim Van Peursem)
  2611. Date: 14 Apr 94 18:32:47 GMT
  2612. Organization: Iowa State University, Ames, Iowa
  2613.  
  2614. In <GDL.94Apr14115344@stlawrence.maths> gdl@stlawrence.maths (Greg Landweber) writes:
  2615.  
  2616. >I do the same thing, except that on form 4562, I declare all my
  2617. >computer-related expenses as Section 179 deductions.  That way, you
  2618. >deduct the entire cost the first year and don't have to worry about
  2619. >the various percentages for depreciation.  The limit for Section 179
  2620. >deductions is $17,500.  Is there any reason why I shouldn't do this
  2621. >(my shareware income is higher than the total cost of the hardware I
  2622. >buy, so declaring Section 179 doesn't give me a loss)?
  2623.  
  2624.   Slight clarification. The limit is the lesser of $17,500 and your
  2625. net income without the 179 deduction. This basically means that you
  2626. can't show a loss from any 179 deductions.
  2627.  
  2628. +---------------------------------------------------------------+
  2629. | Jim Van Peursem - Ph.D. Candidate      (Ham Radio -> KE0PH)   |
  2630. | Department of Electrical Engineering and Computer Engineering |
  2631. | Iowa State University - Ames, IA 50011 : (515) 294-8339       |
  2632. | internet - jvp@iastate.edu  -or-  jvp@cpre1.ee.iastate.edu    |
  2633. +---------------------------------------------------------------+
  2634.  
  2635. +++++++++++++++++++++++++++
  2636.  
  2637. >From sbill@informix.com (Bill Stackhouse)
  2638. Date: 14 Apr 1994 18:20:55 GMT
  2639. Organization: Informix Software, Inc.
  2640.  
  2641. >>As tax time for us US folks rolls around, I was curious about what to do
  2642. >>about shareware payments received. Do small-time shareware authors out
  2643. >>there report their income? What about foreign income?
  2644. >
  2645. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2646. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2647. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2648. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2649. >in the butt to figure out, but that's where you can take off part of the
  2650. >cost of equipment, etc.
  2651.  
  2652. Something to keep in mind is hardware purchases up to 17,500 can be
  2653. written off in the year of purchase using section 179 of form 4562. Software
  2654. does not fall into this areas and must be depreciated over 3 years. A good
  2655. tax program helps alot tracking all of this. Calling software purchases
  2656. an office expense is an idea but not proper. Don't forget Home business
  2657. use but make sure that you have the area solely for business. Look at
  2658. the form C to find what catagories of expenses you need to track during
  2659. the year. Time you spend developing the software cannot be treated as
  2660. an expense, only if you contract someone else to develop it. 
  2661.  
  2662. Bill
  2663.  
  2664.  
  2665.  
  2666. +++++++++++++++++++++++++++
  2667.  
  2668. >From wdh@netcom.com (Bill Hofmann)
  2669. Date: Fri, 15 Apr 1994 01:24:21 GMT
  2670. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2671.  
  2672. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2673.  
  2674. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2675. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2676. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2677. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2678. >in the butt to figure out, but that's where you can take off part of the
  2679. >cost of equipment, etc.
  2680. You may already be doing it, but you should be aware that you can convert
  2681. a certain amount of capital equipment (computer, software, "library") to
  2682. expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2683. way you can avoid depreciation.  Also, according to my accountant,
  2684. software is a 3-year depreciation item.
  2685. -- 
  2686. -Bill Hofmann                    wdh@netcom.COM
  2687.  Fresh Software and Instructional Design    +1 510 524 0852
  2688.  
  2689. +++++++++++++++++++++++++++
  2690.  
  2691. >From gdl@stlawrence.maths (Greg Landweber)
  2692. Date: 15 Apr 1994 00:54:11 GMT
  2693. Organization: (none)
  2694.  
  2695. In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  2696.    Something to keep in mind is hardware purchases up to 17,500 can be
  2697.    written off in the year of purchase using section 179 of form 4562. Software
  2698.    does not fall into this areas and must be depreciated over 3 years.
  2699.  
  2700. Really?  Where does it say this about software?  I deducted my
  2701. software purchases using section 179.  I hope that wasn't a mistake.
  2702. I seem to recall there being something in the tax instructions about
  2703. expenses for developing software can be deducted as current expenses.
  2704. And I read it all so carefully, too...
  2705.  
  2706. What about software upgrades?  If I shell out money for a new compiler
  2707. upgrade each year, do I have to depreciate all these purchases over
  2708. three years?
  2709.  
  2710. -- Greg "Buttons" Landweber
  2711.    gdl@maths.ox.ac.uk
  2712.  
  2713. +++++++++++++++++++++++++++
  2714.  
  2715. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  2716. Date: Thu, 14 Apr 1994 03:24:06 GMT
  2717. Organization: Syracuse University, CIS Dept.
  2718.  
  2719. In article <2oho76$7mq@cville-srv.wam.umd.edu> kidwell@wam.umd.edu (Christopher Bruce Kidwell) writes:
  2720.  
  2721. >As tax time for us US folks rolls around, I was curious about what to do
  2722. >about shareware payments received. Do small-time shareware authors out
  2723. >there report their income? What about foreign income?
  2724.  
  2725. I do.  If you're a shareware author who has received income, I hate to
  2726. say it, but you're a bit late in considering this question!
  2727.  
  2728. Dealing with the income requires that you file a Schedule C (sole
  2729. proprietorship income), which also means you'll have to file a form 1040 (long
  2730. form).  You'll almost certainly want to deduct relevant business expenses,
  2731. which is a nontrivial task, and requires depreciating many expenses.  (Some
  2732. expenses can be deducted at one time.)
  2733.  
  2734. This is all complicated, to the say the least, and is certainly not something
  2735. a novice is likely to get done right in two days.  If you're in this situation,
  2736. you should seriously consider filing for an extension, and enlisting the
  2737. aid of a competent professional.
  2738.  
  2739. Personally, I found I was able to handle my own returns (the last two years)
  2740. using TaxCut--but I left myself plenty of time to research depreciation
  2741. schedules and other related items.
  2742.  
  2743. As for foreign income, I treat shareware fees received from foreign users
  2744. exactly the same as those received from domestic users.
  2745.  
  2746.  
  2747. Good luck.
  2748.  
  2749.  
  2750. -- 
  2751. J. S. Greenfield                                         greeny@top.cis.syr.edu
  2752. (I like to put 'greeny' here, 
  2753. but my d*mn system wants a 
  2754. *real* name!)                        "What's the difference between an orange?"
  2755.  
  2756. +++++++++++++++++++++++++++
  2757.  
  2758. >From sbill@informix.com (Bill Stackhouse)
  2759. Date: 15 Apr 1994 16:27:31 GMT
  2760. Organization: Informix Software, Inc.
  2761.  
  2762. In article <wdhCoA18M.B6t@netcom.com- wdh@netcom.com (Bill Hofmann) writes:
  2763. -resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2764. -
  2765. --I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2766. --Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2767. --also depreciate my computer and programming tools (compiler, Inside Mac,
  2768. --etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2769. --in the butt to figure out, but that's where you can take off part of the
  2770. --cost of equipment, etc.
  2771. -You may already be doing it, but you should be aware that you can convert
  2772. -a certain amount of capital equipment (computer, software, "library") to
  2773. -expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2774. -way you can avoid depreciation.  Also, according to my accountant,
  2775. -software is a 3-year depreciation item.
  2776. - - 
  2777. --Bill Hofmann                    wdh@netcom.COM
  2778. - Fresh Software and Instructional Design    +1 510 524 0852
  2779.  
  2780. Software and books cannot be included as a section 179 expense. Software
  2781. must be depreciated over 3 years and books over 7 years.
  2782.  
  2783. Bill
  2784.  
  2785.  
  2786.  
  2787. +++++++++++++++++++++++++++
  2788.  
  2789. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  2790. Date: Thu, 14 Apr 1994 14:56:54 GMT
  2791. Organization: Syracuse University, CIS Dept.
  2792.  
  2793. Chris Ellens (ellens@bnr.ca) wrote:                                        
  2794.  
  2795. >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2796. >: I did, I'd declare the shareware fees as business income, and then write
  2797. >: off my mailing expenses, my development software, and depreciation on my
  2798. >: new PowerMac (and maybe a few business lunches) as expenses and claim the
  2799. >: loss against my regular income.
  2800. >
  2801. >Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2802. >the shareware your loses are limited to your income from the activity.
  2803.  
  2804. This is not correct.  As long as you treat the venture as a business (i.e.,
  2805. you make a genuine effort to turn a profit) rather than as a hobby, your
  2806. losses are not limited to your income.
  2807.  
  2808. There is no specific requirement as to how much time you must spend on
  2809. the activity.
  2810.  
  2811.  
  2812. Owen M. Hartnett (omh@cs.brown.edu) writes:
  2813.  
  2814. >Filing a schedule C is a definite advantage to you, as you can write off
  2815. >your expenses incurred against the income you made. If you show a definite
  2816. >business intent (meant by the IRS as "you really truly intended to make
  2817. >a profit" and you show a profit for 3 out of 5 years (this may have been
  2818. >broadened a bit)) then in your loss years you can write off your losses
  2819. >vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2820. >income and your expenses can only be written off against the hobby income.
  2821.  
  2822. The 3 out of 5 rule is no longer law.  Under current law, you need only
  2823. treat the activity as a genuine business (intended to turn a profit).
  2824. Don't ask me how you would prove this if you consistently show a loss
  2825. (or more to the point, how the IRS would prove the activity was not a
  2826. business).
  2827.  
  2828.  
  2829. >There are definite advantages to filing a schedule C and you may want to
  2830. >consider them. Also consider the fact that, while you must report all
  2831. >your income, you plan your own purchases, so you do
  2832. >control whether or not your venture is profitable for a given year.
  2833.  
  2834. Maybe, maybe not.  Unexpected expenses can always change things.
  2835.  
  2836.  
  2837. -- 
  2838. J. S. Greenfield                                         greeny@top.cis.syr.edu
  2839. (I like to put 'greeny' here, 
  2840. but my d*mn system wants a 
  2841. *real* name!)                        "What's the difference between an orange?"
  2842.  
  2843. +++++++++++++++++++++++++++
  2844.  
  2845. >From rba26@cas.org (Brad Andrews)
  2846. Date: Fri, 15 Apr 1994 17:57:53 GMT
  2847. Organization: Chemical Abstracts Service
  2848.  
  2849. In article B6t@netcom.com, wdh@netcom.com (Bill Hofmann) writes:
  2850. ]resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2851. ]
  2852. ]>I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2853. ]>Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2854. ]>also depreciate my computer and programming tools (compiler, Inside Mac,
  2855. ]>etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2856. ]>in the butt to figure out, but that's where you can take off part of the
  2857. ]>cost of equipment, etc.
  2858. ]You may already be doing it, but you should be aware that you can convert
  2859. ]a certain amount of capital equipment (computer, software, "library") to
  2860. ]expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2861. ]way you can avoid depreciation.  Also, according to my accountant,
  2862. ]software is a 3-year depreciation item.
  2863.  
  2864. With nearly yearly upgrades, something is wrong with a 3 year depreciation
  2865. of software.
  2866.  
  2867. Where is the Sec 179 info supposed to go?  Right on the Schedule C, or
  2868. somewhere else?
  2869.  
  2870. - -
  2871.  
  2872. Brad Andrews
  2873. Brad.Andrews@cas.org
  2874. All opinions are strictly mine
  2875.  
  2876.  
  2877. +++++++++++++++++++++++++++
  2878.  
  2879. >From omh@cs.brown.edu (Owen M. Hartnett)
  2880. Date: Fri, 15 Apr 1994 19:38:11 GMT
  2881. Organization: Brown University Department of Computer Science
  2882.  
  2883. In article <1994Apr14.145654.16454@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  2884. >Owen M. Hartnett (omh@cs.brown.edu) writes:
  2885. >
  2886. >>Filing a schedule C is a definite advantage to you, as you can write off
  2887. >>your expenses incurred against the income you made. If you show a definite
  2888. >>business intent (meant by the IRS as "you really truly intended to make
  2889. >>a profit" and you show a profit for 3 out of 5 years (this may have been
  2890. >>broadened a bit)) then in your loss years you can write off your losses
  2891. >>vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2892. >>income and your expenses can only be written off against the hobby income.
  2893. >
  2894. >The 3 out of 5 rule is no longer law.  Under current law, you need only
  2895. >treat the activity as a genuine business (intended to turn a profit).
  2896. >Don't ask me how you would prove this if you consistently show a loss
  2897. >(or more to the point, how the IRS would prove the activity was not a
  2898. >business).
  2899. >
  2900. The 3 out of 5 was never law, it was an IRS ruling that they would 
  2901. consider a business to be non-hobby given that the business made a
  2902. profit for 3 out of 5 years. You could always, then and now, made a
  2903. point that the business was truly a business based on other factors.
  2904.  
  2905. Consider the business, newly started, which loses money tremendously in
  2906. a year and ends up getting closed down. Certainly this wouldn't meet the
  2907. 3 out of 5 rule, but the IRS wouldn't consider it a hobby. However, you
  2908. can probably be assured that if you show a profit 3 out of 5 years, you
  2909. won't be considered a hobby.
  2910.  
  2911. >
  2912. >>There are definite advantages to filing a schedule C and you may want to
  2913. >>consider them. Also consider the fact that, while you must report all
  2914. >>your income, you plan your own purchases, so you do
  2915. >>control whether or not your venture is profitable for a given year.
  2916. >
  2917. >Maybe, maybe not.  Unexpected expenses can always change things.
  2918.  
  2919. Even so, the timing of those expenses is under your control.
  2920.  
  2921. -Owen
  2922.  
  2923. -- 
  2924. Owen Hartnett                omh@cs.brown.edu
  2925. "FAITH, n. Belief without evidence in what is told by one who speaks
  2926.         without knowledge, of things without parallel."
  2927.             -Ambrose Bierce - The Devil's Dictionary
  2928.  
  2929. +++++++++++++++++++++++++++
  2930.  
  2931. >From gdl@stlawrence.maths (Greg Landweber)
  2932. Date: 16 Apr 1994 03:15:28 GMT
  2933. Organization: (none)
  2934.  
  2935. In article <1994Apr15.175753.3639@chemabs.uucp> rba26@cas.org (Brad Andrews) writes:
  2936.    With nearly yearly upgrades, something is wrong with a 3 year depreciation
  2937.    of software.
  2938.  
  2939. I counted my software purchases as a Section 179 deduction.  Is this wrong?
  2940.  
  2941.    Where is the Sec 179 info supposed to go?  Right on the Schedule C, or
  2942.    somewhere else?
  2943.  
  2944. Section 179 info goes on form 4562.  It is all explained (rather
  2945. poorly) in the instructions for that form.
  2946.  
  2947. -- Greg Landweber
  2948.    gdl@maths.ox.ac.uk
  2949.  
  2950. +++++++++++++++++++++++++++
  2951.  
  2952. >From hall_j@sat.mot.com (Joseph Hall)
  2953. Date: Thu, 14 Apr 1994 22:06:25 GMT
  2954. Organization: Motorola Inc., Satellite Communications
  2955.  
  2956. Seems it was resnick@cogsci.uiuc.edu (Pete Resnick) who said:
  2957. >In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2958. >(Christopher Bruce Kidwell) wrote:
  2959. >
  2960. >>As tax time for us US folks rolls around, I was curious about what to do
  2961. >>about shareware payments received. Do small-time shareware authors out
  2962. >>there report their income? What about foreign income?
  2963. >
  2964. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2965. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2966. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2967. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2968. >in the butt to figure out, but that's where you can take off part of the
  2969. >cost of equipment, etc.
  2970.  
  2971. If you're like me, you pay enough for software tools, computer-related 
  2972. books and professional dues to wipe out any self-employment income 
  2973. arising from small-time shareware fees.  My expenditures in that area
  2974. are at least $2K per year (probably twice that last year).  You still
  2975. need to report the income and offsetting expenses, of course.  The
  2976. nice thing is that expenses come right out of self-employment income 
  2977. and you don't have to get over the standard deduction hump.  Just keep 
  2978. those receipts and don't deduct games (unless you're writing them).  :-)
  2979.  
  2980. So far I haven't bothered keeping track of capital expenditures, but
  2981. then again my self-employment income has been very small.
  2982.  
  2983. -- 
  2984. Joseph Nathan Hall | Joseph's Law of Interface Design: Never give your users
  2985. Software Architect | a choice between the easy way and the right way.
  2986. Gorca Systems Inc. |                 joseph@joebloe.maple-shade.nj.us (home)
  2987. (on assignment)    | (602) 732-2549 (work)  Joseph_Hall-SC052C@email.mot.com
  2988.  
  2989. +++++++++++++++++++++++++++
  2990.  
  2991. >From robertl@netcom.com (Robert L Mathews)
  2992. Date: Sat, 16 Apr 1994 08:55:41 GMT
  2993. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2994.  
  2995. Scott Gruby (Scott_Gruby@hmc.edu) wrote:
  2996. : Unfortunately I don't have a direct answer to this question and I don't
  2997. : plan on doing research until next year at tax time (I just started this
  2998. : year); but I do have some information on state sales tax in
  2999. : California...basically you don't have to collect it and people don't have
  3000. : to pay it. That's what the Board of Equalization told me yesterday.
  3001.  
  3002. : Something California shareware authors may want to note.
  3003.  
  3004. Whoa! This is only true if you don't mail the purchaser ANYTHING AT ALL
  3005. in return for the shareware payment. If you do paper mail them anything -
  3006. disk, manual, confirmation letter, anything - then it is taxable. This
  3007. is true even if the shareware user sends you a blank disk to put a copy
  3008. of the program on.
  3009.  
  3010. In front of me I have a copy of Regulation 1502: Sales Tax and Use
  3011. Regulations; Computers, Programs, and Data Processing.
  3012.  
  3013. "(c1) The transfer of title, for a consideration, of tangible personal
  3014. property, including property on which or into which information has
  3015. been recorded or incorporated, is a sale subject to tax."
  3016.  
  3017. Also, 
  3018. "(f1a) Tax applies whether title to the storage media on which the program
  3019. is recorded...passes to the customer, or the program is recorded...on
  3020. storage media furnished by the customer."
  3021.  
  3022. It goes on to say, though, that
  3023. "(f1d) The sale or lease of a prewritten program is NOT a taxable
  3024. transaction if the program is transferred by remote telecommunications
  3025. from the seller's place of business, to or through the purchaser's
  3026. computer and the purchaser does not obtain posession of ANY tangible
  3027. personal property, such as storage media, in the transaction." It also
  3028. mentions that the transfer of any written information, including
  3029. documentation of any form, would make the sale taxable.
  3030.  
  3031. So. If you're doing EVERYTHING by e-mail, or you don't send people
  3032. anything when they pay you, you don't have to pay sales tax. However,
  3033. if you send them a disk or manual, or a letter including a serial
  3034. number or a registration code (which counts as documentation, according
  3035. to the definitions), you gotta pay the tax.
  3036.  
  3037. Anyone can get a copy of this pamphlet by contacting the State Board of
  3038. "Equalization" at 450 N Street, Sacramento CA 95814. Ask for regulation
  3039. 1502. It gets very detailed, and it's all about computer businesses.
  3040.  
  3041. Mileage in other states may vary. However, you should check it out;
  3042. the penalties for not paying the tax are, as you would expect, nasty.
  3043.  
  3044. By the way, the best advice I have for filling out all those annoying
  3045. forms at the end of the year: marry a CPA. She (or he)'ll handle it.
  3046. --
  3047. Robert L Mathews
  3048.  
  3049. +++++++++++++++++++++++++++
  3050.  
  3051. >From jvp@tools1.ee.iastate.edu (Jim Van Peursem)
  3052. Date: 16 Apr 94 16:12:14 GMT
  3053. Organization: Iowa State University, Ames, Iowa
  3054.  
  3055. In <GDL.94Apr15015412@stlawrence.maths> gdl@stlawrence.maths (Greg Landweber) writes:
  3056.  
  3057. >In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  3058. >   Something to keep in mind is hardware purchases up to 17,500 can be
  3059. >   written off in the year of purchase using section 179 of form 4562. Software
  3060. >   does not fall into this areas and must be depreciated over 3 years.
  3061.  
  3062. >Really?  Where does it say this about software?  I deducted my
  3063. >software purchases using section 179.  I hope that wasn't a mistake.
  3064. >I seem to recall there being something in the tax instructions about
  3065. >expenses for developing software can be deducted as current expenses.
  3066. >And I read it all so carefully, too...
  3067.  
  3068.   I called the IRS on this point and they said software CAN be used
  3069. as a 179 deduction.
  3070.  
  3071. +---------------------------------------------------------------+
  3072. | Jim Van Peursem - Ph.D. Candidate      (Ham Radio -> KE0PH)   |
  3073. | Department of Electrical Engineering and Computer Engineering |
  3074. | Iowa State University - Ames, IA 50011 : (515) 294-8339       |
  3075. | internet - jvp@iastate.edu  -or-  jvp@cpre1.ee.iastate.edu    |
  3076. +---------------------------------------------------------------+
  3077.  
  3078. +++++++++++++++++++++++++++
  3079.  
  3080. >From tzs@u.washington.edu (Tim Smith)
  3081. Date: 18 Apr 1994 04:44:10 GMT
  3082. Organization: University of Washington School of Law, Class of '95
  3083.  
  3084. Owen M. Hartnett <omh@cs.brown.edu> wrote:
  3085. >The 3 out of 5 was never law, it was an IRS ruling that they would 
  3086. >consider a business to be non-hobby given that the business made a
  3087. >profit for 3 out of 5 years. You could always, then and now, made a
  3088. >point that the business was truly a business based on other factors.
  3089.  
  3090. I call your attention to paragraph (d) of section 183 of the Internal
  3091. Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3092. rule was indeed law (and still is, as far as I can tell, unless there
  3093. was a change I missed after Clinton's tax bill).
  3094.  
  3095. --Tim Smith
  3096.  
  3097. Sec. 183. Activities not engaged in for profit
  3098.  
  3099. (a) General rule
  3100.   In the case of an activity engaged in by an individual or an S
  3101. corporation, if such activity is not engaged in for profit, no
  3102. deduction attributable to such activity shall be allowed under this
  3103. chapter except as provided in this section.
  3104. (b) Deductions allowable
  3105.   In the case of an activity not engaged in for profit to which
  3106. subsection (a) applies, there shall be allowed -
  3107.     (1) the deductions which would be allowable under this chapter
  3108.   for the taxable year without regard to whether or not such
  3109.   activity is engaged in for profit, and
  3110.     (2) a deduction equal to the amount of the deductions which
  3111.   would be allowable under this chapter for the taxable year only
  3112.   if such activity were engaged in for profit, but only to the
  3113.   extent that the gross income derived from such activity for the
  3114.   taxable year exceeds the deductions allowable by reason of
  3115.   paragraph (1).
  3116. (c) Activity not engaged in for profit defined
  3117.   For purposes of this section, the term 'activity not engaged in
  3118. for profit' means any activity other than one with respect to which
  3119. deductions are allowable for the taxable year under section 162 or
  3120. under paragraph (1) or (2) of section 212.
  3121. (d) Presumption
  3122.   If the gross income derived from an activity for 3 or more of the
  3123. taxable years in the period of 5 consecutive taxable years which
  3124. ends with the taxable year exceeds the deductions attributable to
  3125. such activity (determined without regard to whether or not such
  3126. activity is engaged in for profit), then, unless the Secretary
  3127. establishes to the contrary, such activity shall be presumed for
  3128. purposes of this chapter for such taxable year to be an activity
  3129. engaged in for profit.  In the case of an activity which consists
  3130. in major part of the breeding, training, showing, or racing of
  3131. horses, the preceding sentence shall be applied by substituting '2'
  3132. for '3' and '7' for '5'.
  3133. (e) Special rule
  3134.   (1) In general
  3135.     A determination as to whether the presumption provided by
  3136.   subsection (d) applies with respect to any activity shall, if the
  3137.   taxpayer so elects, not be made before the close of the fourth
  3138.   taxable year (sixth taxable year, in the case of an activity
  3139.   described in the last sentence of such subsection) following the
  3140.   taxable year in which the taxpayer first engages in the
  3141.   activity.  For purposes of the preceding sentence, a taxpayer
  3142.   shall be treated as not having engaged in an activity during any
  3143.   taxable year beginning before January 1, 1970.
  3144.   (2) Initial period
  3145.     If the taxpayer makes an election under paragraph (1), the
  3146.   presumption provided by subsection (d) shall apply to each
  3147.   taxable year in the 5-taxable year (or 7-taxable year) period
  3148.   beginning with the taxable year in which the taxpayer first
  3149.   engages in the activity, if the gross income derived from the
  3150.   activity for 3 (or 2 if applicable) or more of the taxable years
  3151.   in such period exceeds the deductions attributable to the
  3152.   activity (determined without regard to whether or not the
  3153.   activity is engaged in for profit).
  3154.   (3) Election
  3155.     An election under paragraph (1) shall be made at such time and
  3156.   manner, and subject to such terms and conditions, as the
  3157.   Secretary may prescribe.
  3158.   (4) Time for assessing deficiency attributable to activity
  3159.     If a taxpayer makes an election under paragraph (1) with
  3160.   respect to an activity, the statutory period for the assessment
  3161.   of any deficiency attributable to such activity shall not expire
  3162.   before the expiration of 2 years after the date prescribed by law
  3163.   (determined without extensions) for filing the return of tax
  3164.   under chapter 1 for the last taxable year in the period of 5
  3165.   taxable years (or 7 taxable years) to which the election
  3166.   relates.  Such deficiency may be assessed notwithstanding the
  3167.   provisions of any law or rule of law which would otherwise
  3168.   prevent such an assessment.
  3169.  
  3170.  
  3171. +++++++++++++++++++++++++++
  3172.  
  3173. >From tzs@u.washington.edu (Tim Smith)
  3174. Date: 18 Apr 1994 04:59:02 GMT
  3175. Organization: University of Washington School of Law, Class of '95
  3176.  
  3177. Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3178. >  I called the IRS on this point and they said software CAN be used
  3179. >as a 179 deduction.
  3180.  
  3181. If I were going to try this, I think I'd call them two or three times
  3182. and make sure I got the same answer.  Section 179 says that it only
  3183. applies to tangible property, and at first blush I'd expect software
  3184. to be intangible property.  The regulations for section 179 do not
  3185. clarify things.
  3186.  
  3187. --Tim Smith
  3188.  
  3189. +++++++++++++++++++++++++++
  3190.  
  3191. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  3192. Date: Mon, 18 Apr 1994 00:08:33 -0500
  3193. Organization: University of Illinois at Urbana-Champaign
  3194.  
  3195. In article <2ot42m$eng@news.u.washington.edu>, tzs@u.washington.edu (Tim
  3196. Smith) wrote:
  3197.  
  3198. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3199. >>  I called the IRS on this point and they said software CAN be used
  3200. >>as a 179 deduction.
  3201. >
  3202. >If I were going to try this, I think I'd call them two or three times
  3203. >and make sure I got the same answer.  Section 179 says that it only
  3204. >applies to tangible property, and at first blush I'd expect software
  3205. >to be intangible property.  The regulations for section 179 do not
  3206. >clarify things.
  3207.  
  3208. When I called in '92 to ask about THINK C (I just said "software tools"),
  3209. they not only said that I couldn't take a 179, but also that it should be
  3210. depreciated over 5 years (which according to some folks here is wrong and
  3211. should be 3). Lovely folks manning the phones at the IRS. :-)
  3212.  
  3213. pr
  3214. -- 
  3215. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  3216. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  3217. System manager - Cognitive Science Group, Beckman Institute, UIUC
  3218. Internet: resnick@cogsci.uiuc.edu
  3219.  
  3220. +++++++++++++++++++++++++++
  3221.  
  3222. >From wdh@netcom.com (Bill Hofmann)
  3223. Date: Mon, 18 Apr 1994 17:20:54 GMT
  3224. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  3225.  
  3226. tzs@u.washington.edu (Tim Smith) writes:
  3227.  
  3228. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3229. >>  I called the IRS on this point and they said software CAN be used
  3230. >>as a 179 deduction.
  3231.  
  3232. >If I were going to try this, I think I'd call them two or three times
  3233. >and make sure I got the same answer.  Section 179 says that it only
  3234. >applies to tangible property, and at first blush I'd expect software
  3235. >to be intangible property.  The regulations for section 179 do not
  3236. >clarify things.
  3237.  
  3238. Well, my accountant (who's an "Enrolled Agent," which means that she takes
  3239. lots of continuing education about tax law) who has lots of computer geeks
  3240. as customers, says that software is a 3 year item (which *is* a recent
  3241. change), and that it can be Section 179'd.  There is also a distinction
  3242. between software you *use* and software you use (eg) for testing--so your
  3243. THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo
  3244. Write you bought to test your automatic spell checker system extension
  3245. against could actually be expensed.  Of course, unless you spend more than
  3246. 17,500 or so, you should probably just take it as section 179.
  3247. -- 
  3248. -Bill Hofmann                    wdh@netcom.COM
  3249.  Fresh Software and Instructional Design    +1 510 524 0852
  3250.  
  3251. +++++++++++++++++++++++++++
  3252.  
  3253. >From sbill@informix.com (Bill Stackhouse)
  3254. Date: 18 Apr 1994 17:19:48 GMT
  3255. Organization: Informix Software, Inc.
  3256.  
  3257. In article <jvp.766512734@tools1.ee.iastate.edu- jvp@tools1.ee.iastate.edu (Jim Van Peursem) writes:
  3258. -In <GDL.94Apr15015412@stlawrence.maths- gdl@stlawrence.maths (Greg Landweber) writes:
  3259. -
  3260. --In article <2ok1i7$hpa@infmx.informix.com- sbill@informix.com (Bill Stackhouse) writes:
  3261. --   Something to keep in mind is hardware purchases up to 17,500 can be
  3262. tten off in the year of purchase using section 179 of form 4562. Software
  3263. -
  3264. --Really?  Where does it say this about software?  I deducted my
  3265. --software purchases using section 179.  I hope that wasn't a mistake.
  3266. --I seem to recall there being something in the tax instructions about
  3267. --expenses for developing software can be deducted as current expenses.
  3268. --And I read it all so carefully, too...
  3269. -
  3270. -  I called the IRS on this point and they said software CAN be used
  3271. -as a 179 deduction.
  3272. -
  3273. -+---------------------------------------------------------------+
  3274.  
  3275.  
  3276. Read the booklet that the IRS has on depreciation and it is very clear
  3277. about software not allowed under section 179. I also asked in person 
  3278. at the IRS and at first they also said that it COULD be a 179 item. I
  3279. then showed them the paragraph in the booklet and they said that was
  3280. the first they knew about that. It was that way in both 1992 and 1993.
  3281. It is also explained in the booklet on small business expenses.
  3282.  
  3283.  
  3284.  
  3285. +++++++++++++++++++++++++++
  3286.  
  3287. >From gdl@stlawrence.maths (Greg Landweber)
  3288. Date: 18 Apr 1994 22:53:49 GMT
  3289. Organization: (none)
  3290.  
  3291. In article <wdhCoGtIv.H9G@netcom.com> wdh@netcom.com (Bill Hofmann) writes:
  3292.    Well, my accountant (who's an "Enrolled Agent," which means that she takes
  3293.    lots of continuing education about tax law) who has lots of computer geeks
  3294.    as customers, says that software is a 3 year item (which *is* a recent
  3295.    change), and that it can be Section 179'd.  There is also a distinction
  3296.    between software you *use* and software you use (eg) for testing--so your
  3297.    THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo
  3298.    Write you bought to test your automatic spell checker system extension
  3299.    against could actually be expensed.  Of course, unless you spend more than
  3300.                              ^^^^^^^^
  3301.    17,500 or so, you should probably just take it as section 179.
  3302.  
  3303. What does it mean to "expense" something?  If I decide to "expense" my
  3304. copy of Whammo Write, where do I enter it on my tax forms?  I take it
  3305. that if I "expense" Whammo Write, then it is not depreciated, and so
  3306. it does not go on form 4562.  Do you put it on Schedule C under
  3307. Miscellaneous Expenses (writing out what it is), or does it fit into
  3308. one of the nice categories they provide for expenses?
  3309.  
  3310. BTW, for shareware authors with less than $2000 in expenses, you can
  3311. file Schedule C-EZ, where you simply enter your earnings, enter your
  3312. expenses, and subtract.  I'm not sure if you are allowed to do that if
  3313. your expenses include any property that should be depreciated.
  3314. However, with Schedule C-EZ, you don't have to provide a break-down of
  3315. your expenses, so the IRS would never know.  Also, you can feel safe,
  3316. realizing that had you filled out Schedule C, Form 4562, and taken the
  3317. Section 179 deduction, your taxes would have come out precisely the
  3318. same!
  3319.  
  3320. -- Greg
  3321.    gdl@maths.ox.ac.uk
  3322.  
  3323.  
  3324. +++++++++++++++++++++++++++
  3325.  
  3326. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3327. Date: Mon, 18 Apr 1994 01:51:31 GMT
  3328. Organization: Syracuse University, CIS Dept.
  3329.  
  3330. In article <1994Apr15.193811.14928@cs.brown.edu> omh@cs.brown.edu (Owen M. Hartnett) writes:
  3331. >>
  3332. >>The 3 out of 5 rule is no longer law.  Under current law, you need only
  3333. >>treat the activity as a genuine business (intended to turn a profit).
  3334. >>Don't ask me how you would prove this if you consistently show a loss
  3335. >>(or more to the point, how the IRS would prove the activity was not a
  3336. >>business).
  3337. >>
  3338. >The 3 out of 5 was never law, it was an IRS ruling that they would 
  3339. >consider a business to be non-hobby given that the business made a
  3340. >profit for 3 out of 5 years. You could always, then and now, made a
  3341. >point that the business was truly a business based on other factors.
  3342.  
  3343. You're right--I misspoke, and I realized it when I saw my post but
  3344. didn't figure it was worth cancelling the post.  But the former 3 out
  3345. of 5 rule is definitely no longer an IRS rule...
  3346.  
  3347.  
  3348. [...]
  3349.  
  3350. >>>There are definite advantages to filing a schedule C and you may want to
  3351. >>>consider them. Also consider the fact that, while you must report all
  3352. >>>your income, you plan your own purchases, so you do
  3353. >>>control whether or not your venture is profitable for a given year.
  3354. >>
  3355. >>Maybe, maybe not.  Unexpected expenses can always change things.
  3356. >
  3357. >Even so, the timing of those expenses is under your control.
  3358.  
  3359. How so?  I incurred substantial legal expenses last year related to a
  3360. trademark dispute.  I don't see where I had any choice but to deduct those
  3361. expenses on my return for last year.
  3362.  
  3363. (Not that I wanted to do otherwise.  My point is, simply, that expenses like
  3364. non-startup-related legal fees are not capital expenditures.  I wouldn't think
  3365. that they could be depreciated.)
  3366.  
  3367.  
  3368. -- 
  3369. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3370. (I like to put 'greeny' here, 
  3371. but my d*mn system wants a 
  3372. *real* name!)                        "What's the difference between an orange?"
  3373.  
  3374. +++++++++++++++++++++++++++
  3375.  
  3376. >From isbell@ai.mit.edu (Charles L Isbell)
  3377. Date: 19 Apr 94 08:52:22
  3378. Organization: MIT Artificial Intelligence Laboratory
  3379.  
  3380. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  3381. |>>  I called the IRS on this point and they said software CAN be used
  3382. |>>as a 179 deduction.
  3383. |>
  3384. |>If I were going to try this, I think I'd call them two or three times
  3385. |>and make sure I got the same answer.  Section 179 says that it only
  3386. |>applies to tangible property, and at first blush I'd expect software
  3387. |>to be intangible property.  The regulations for section 179 do not
  3388. |>clarify things.
  3389.  
  3390. |When I called in '92 to ask about THINK C (I just said "software tools"),
  3391. |they not only said that I couldn't take a 179, but also that it should be
  3392. |depreciated over 5 years (which according to some folks here is wrong and
  3393. |should be 3). Lovely folks manning the phones at the IRS. :-)
  3394.  
  3395. It is a known feature of the IRS that each time you call them to ask
  3396. about a particular question, you will get a different answer.  Given
  3397. that and an early enough start, it is reasonable to keep calling until
  3398. you get the answer you want to hear.  At that time, record the time
  3399. and date of the call and write down the name of the person giving you
  3400. the answer.  This might help at audit time, should it ever come up.
  3401.  
  3402. :)
  3403. --
  3404. Peace.
  3405.                            "If I could find a way to get [Saddam Hussein] out
  3406.                             of there, even putting a contract out on him, if
  3407.                             the CIA still did that sort of a thing, assuming
  3408.                             it ever did, I would be for it."
  3409.                                            -- Richard Nixon
  3410.                                 -\--/-
  3411.  Don't just adopt opinions     |  \/  |       Some of you are homeboys
  3412.        develop them.           |  /\  | but only I am The Homeboy From hell
  3413.                                 -/--\-
  3414.  
  3415.  
  3416. +++++++++++++++++++++++++++
  3417.  
  3418. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3419. Date: Mon, 18 Apr 1994 14:26:51 GMT
  3420. Organization: Syracuse University, CIS Dept.
  3421.  
  3422. In article <2ot42m$eng@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3423.  
  3424. >>  I called the IRS on this point and they said software CAN be used
  3425. >>as a 179 deduction.
  3426. >
  3427. >If I were going to try this, I think I'd call them two or three times
  3428. >and make sure I got the same answer.  Section 179 says that it only
  3429. >applies to tangible property, and at first blush I'd expect software
  3430. >to be intangible property.  The regulations for section 179 do not
  3431. >clarify things.
  3432.  
  3433. How do you figure that it's intangible?  You must think that shrinkwrap
  3434. licenses--which specify that you purchase only a license to use the
  3435. software--are valid contracts.
  3436.  
  3437. I'd maintain that what you purchase (in almost all cases) is a *copy*
  3438. of the software (along with manuals, etc.).  That copy of the software
  3439. is most certainly tangible.
  3440.  
  3441.  
  3442. -- 
  3443. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3444. (I like to put 'greeny' here, 
  3445. but my d*mn system wants a 
  3446. *real* name!)                        "What's the difference between an orange?"
  3447.  
  3448. +++++++++++++++++++++++++++
  3449.  
  3450. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3451. Date: Mon, 18 Apr 1994 14:36:28 GMT
  3452. Organization: Syracuse University, CIS Dept.
  3453.  
  3454. In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3455.  
  3456. >>The 3 out of 5 was never law, it was an IRS ruling that they would 
  3457. >>consider a business to be non-hobby given that the business made a
  3458. >>profit for 3 out of 5 years. You could always, then and now, made a
  3459. >>point that the business was truly a business based on other factors.
  3460. >
  3461. >I call your attention to paragraph (d) of section 183 of the Internal
  3462. >Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3463. >rule was indeed law (and still is, as far as I can tell, unless there
  3464. >was a change I missed after Clinton's tax bill).
  3465. >
  3466. >
  3467. >Sec. 183. Activities not engaged in for profit
  3468. >
  3469. >[text omitted]
  3470.  
  3471. I just scanned the text quickly, but it appeared to me that all it said
  3472. was that making a profit in 3 out of 5 years creates a presumption that
  3473. the activity is for profit.  In other words, it is a *sufficient*
  3474. condition to be considered a business rather than a hobby.
  3475.  
  3476. This is quite different from requiring 3 out of 5 years of profit as a
  3477. *necessary* condition to be considered a business.
  3478.  
  3479. The latter seems to have been an IRS rule, which I'm quite sure is no
  3480. longer in effect.  I believe the rule was overturned as the result of
  3481. litigation.
  3482.  
  3483.  
  3484. -- 
  3485. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3486. (I like to put 'greeny' here, 
  3487. but my d*mn system wants a 
  3488. *real* name!)                        "What's the difference between an orange?"
  3489.  
  3490. +++++++++++++++++++++++++++
  3491.  
  3492. >From omh@cs.brown.edu (Owen M. Hartnett)
  3493. Date: Tue, 19 Apr 1994 23:14:29 GMT
  3494. Organization: Brown University Department of Computer Science
  3495.  
  3496. In article <1994Apr18.143628.14657@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  3497. >In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3498. >
  3499. >>>The 3 out of 5 was never law, it was an IRS ruling that they would 
  3500. >>>consider a business to be non-hobby given that the business made a
  3501. >>>profit for 3 out of 5 years. You could always, then and now, made a
  3502. >>>point that the business was truly a business based on other factors.
  3503. >>
  3504. >>I call your attention to paragraph (d) of section 183 of the Internal
  3505. >>Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3506. >>rule was indeed law (and still is, as far as I can tell, unless there
  3507. >>was a change I missed after Clinton's tax bill).
  3508. >>
  3509. >>
  3510. >>Sec. 183. Activities not engaged in for profit
  3511. >>
  3512. >>[text omitted]
  3513. >
  3514. >I just scanned the text quickly, but it appeared to me that all it said
  3515. >was that making a profit in 3 out of 5 years creates a presumption that
  3516. >the activity is for profit.  In other words, it is a *sufficient*
  3517. >condition to be considered a business rather than a hobby.
  3518. >
  3519. >This is quite different from requiring 3 out of 5 years of profit as a
  3520. >*necessary* condition to be considered a business.
  3521. >
  3522. You are quite correct. I remember reading a CCH Tax article which said
  3523. just the above. You could still get a business deduction if you met
  3524. other "reasonable man" types of conditions, even when 3 out of 5 was in
  3525. effect. There were several court cases which validated this.
  3526.  
  3527. >The latter seems to have been an IRS rule, which I'm quite sure is no
  3528. >longer in effect.  I believe the rule was overturned as the result of
  3529. >litigation.
  3530.  
  3531. I don't think it was for a particular litigation, rather the court cases
  3532. which have been taking place. I think that the IRS instruction was to
  3533. allow its agents more broader authority in determining business vs. hobby.
  3534. Particularly when you consider businesses that go broke before 5 years,
  3535. which often happens, this ruling needed to be broader. 
  3536.  
  3537. -Owen
  3538.  
  3539.  
  3540. -- 
  3541. Owen Hartnett                omh@cs.brown.edu
  3542. "FAITH, n. Belief without evidence in what is told by one who speaks
  3543.         without knowledge, of things without parallel."
  3544.             -Ambrose Bierce - The Devil's Dictionary
  3545.  
  3546. +++++++++++++++++++++++++++
  3547.  
  3548. >From oster@netcom.com (David Phillip Oster)
  3549. Date: Wed, 20 Apr 1994 06:38:47 GMT
  3550. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  3551.  
  3552.  
  3553. Has anyone succeeded in claiming the (Federal) Research and
  3554. Development Investment Tax Credit? I have not been able to
  3555. find a definition of this that I can 
  3556.  
  3557. +++++++++++++++++++++++++++
  3558.  
  3559. >From sbill@informix.com (Bill Stackhouse)
  3560. Date: 20 Apr 1994 20:56:37 GMT
  3561. Organization: Informix Software, Inc.
  3562.  
  3563. In article <1994Apr18.142651.14458@newstand.syr.edu- greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  3564. -In article <2ot42m$eng@news.u.washington.edu- tzs@u.washington.edu (Tim Smith) writes:
  3565. -
  3566. - -  I called the IRS on this point and they said software CAN be used
  3567. - -as a 179 deduction.
  3568. --
  3569. --If I were going to try this, I think I'd call them two or three times
  3570. --and make sure I got the same answer.  Section 179 says that it only
  3571. --applies to tangible property, and at first blush I'd expect software
  3572. --to be intangible property.  The regulations for section 179 do not
  3573. --clarify things.
  3574. -
  3575. -How do you figure that it's intangible?  You must think that shrinkwrap
  3576. -licenses--which specify that you purchase only a license to use the
  3577. -software--are valid contracts.
  3578. -
  3579. -I'd maintain that what you purchase (in almost all cases) is a *copy*
  3580. -of the software (along with manuals, etc.).  That copy of the software
  3581. -is most certainly tangible.
  3582. -
  3583.  
  3584. Sorry but the IRS booklet on depreciation specifically says that software
  3585. is intangible and cannot not be included with section 179 expenses.
  3586.  
  3587.  
  3588.  
  3589. +++++++++++++++++++++++++++
  3590.  
  3591. >From peirce@outpost.SF-Bay.org (Michael Peirce)
  3592. Date: 20 Apr 94 23:47:27 GMT
  3593. Organization: Peirce Software, Inc.
  3594.  
  3595.  
  3596. In article <Scott_Gruby-130494192212@eagle.st.hmc.edu> (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes:
  3597. > In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  3598. > (Christopher Bruce Kidwell) wrote:
  3599. > > As tax time for us US folks rolls around, I was curious about what to do
  3600. > > about shareware payments received. Do small-time shareware authors out
  3601. > > there report their income? What about foreign income?
  3602. > > 
  3603. > > Chris Kidwell
  3604. > > kidwell@wam.umd.edu
  3605. > Unfortunately I don't have a direct answer to this question and I don't
  3606. > plan on doing research until next year at tax time (I just started this
  3607. > year); but I do have some information on state sales tax in
  3608. > California...basically you don't have to collect it and people don't have
  3609. > to pay it. That's what the Board of Equalization told me yesterday.
  3610. > Something California shareware authors may want to note.
  3611.  
  3612. Humm, I was told the exact opposite.  I've been filing annual sales
  3613. tax reports for the last couple of years for my shareware sales to
  3614. to California folks (I live in CA).
  3615.  
  3616. It possible that things have changed, but I already have to file a
  3617. sales tax report for other products and people seem to expect to pay
  3618. the sales tax...
  3619.  
  3620.  
  3621. __ Michael Peirce        __ peirce@outpost.sf-bay.org
  3622. __ Peirce Software, Inc. __ 719 Hibiscus Place, Suite 301
  3623. __                       __ San Jose, California USA 95117-1844
  3624. __ Makers of: Smoothie & __ voice: +1.408.244.6554 fax: +1.408.244.6882
  3625. __    Peirce Print Tools __ AppleLink: peirce & AOL: AFC Peirce
  3626.  
  3627. +++++++++++++++++++++++++++
  3628.  
  3629. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3630. Date: Thu, 21 Apr 1994 13:32:36 GMT
  3631. Organization: Syracuse University, CIS Dept.
  3632.  
  3633. In article <2p44u5$6ik@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  3634.  
  3635. >--If I were going to try this, I think I'd call them two or three times
  3636. >--and make sure I got the same answer.  Section 179 says that it only
  3637. >--applies to tangible property, and at first blush I'd expect software
  3638. >--to be intangible property.  The regulations for section 179 do not
  3639. >--clarify things.
  3640. >-
  3641. >-How do you figure that it's intangible?  You must think that shrinkwrap
  3642. >-licenses--which specify that you purchase only a license to use the
  3643. >-software--are valid contracts.
  3644. >-
  3645. >-I'd maintain that what you purchase (in almost all cases) is a *copy*
  3646. >-of the software (along with manuals, etc.).  That copy of the software
  3647. >-is most certainly tangible.
  3648. >
  3649. >Sorry but the IRS booklet on depreciation specifically says that software
  3650. >is intangible and cannot not be included with section 179 expenses.
  3651.  
  3652. In that case, I'd have to conclude that the IRS does not understand the
  3653. meaning of the word "intangible."
  3654.  
  3655.  
  3656. -- 
  3657. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3658. (I like to put 'greeny' here, 
  3659. but my d*mn system wants a 
  3660. *real* name!)                        "What's the difference between an orange?"
  3661.  
  3662. +++++++++++++++++++++++++++
  3663.  
  3664. >From rba26@cas.org (Brad Andrews)
  3665. Date: Fri, 22 Apr 1994 19:33:09 GMT
  3666. Organization: Chemical Abstracts Service
  3667.  
  3668. In article 6ik@infmx.informix.com, sbill@informix.com (Bill Stackhouse) writes:
  3669. ]
  3670. ]Sorry but the IRS booklet on depreciation specifically says that software
  3671. ]is intangible and cannot not be included with section 179 expenses.
  3672. ]
  3673. ]
  3674.  
  3675.  
  3676. But what kind of "software" is it referring to?  I would guess they might have
  3677. been thinking of the kind you buy for a mainframe.  I could be wrong though.
  3678.  
  3679. - -
  3680.  
  3681. Brad Andrews
  3682. Brad.Andrews@cas.org
  3683. All opinions are strictly mine
  3684.  
  3685.  
  3686. +++++++++++++++++++++++++++
  3687.  
  3688. >From jfw@ksr.com (John F. Woods)
  3689. Date: 18 Apr 1994 19:38:09 GMT
  3690. Organization: Kendall Square Research
  3691.  
  3692. tzs@u.washington.edu (Tim Smith) writes:
  3693. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3694. >>  I called the IRS on this point and they said software CAN be used
  3695. >>as a 179 deduction.
  3696. >If I were going to try this, I think I'd call them two or three times
  3697. >and make sure I got the same answer.  Section 179 says that it only
  3698. >applies to tangible property, and at first blush I'd expect software
  3699. >to be intangible property.  The regulations for section 179 do not
  3700. >clarify things.
  3701.  
  3702. Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses
  3703. make it pretty clear that you have purchased, at most, some small squares
  3704. of plastic and iron oxide and a badly written manual which isn't guaranteed
  3705. to have anything to do with any program that might, through sheer negligence,
  3706. have accidently been recorded on the piece of plastic.  That sounds pretty
  3707. tangible to me; maybe software licenses have a use after all ;-).
  3708.  
  3709.  
  3710. [WARNING:  THE ABOVE IS INTENDED AS HUMOR.  I FORMALLY GUARANTEE, WITH THE
  3711. SAME FIRMNESS OF COMMITMENT AT COMMERCIAL SOFTWARE PUBLISHERS, THAT THE IRS
  3712. DO *NOT* CONCUR WITH THAT REASONING (I.E. IF IT TURNS OUT THAT THEY DO, 
  3713. RETURN THIS ARTICLE TO WHERE YOU PURCHASED IT WITHIN THE NEXT 90 MILLISECONDS
  3714. FOR A FULL REFUND OF YOUR PURCHASE PRICE :-) ) ]
  3715.  
  3716. +++++++++++++++++++++++++++
  3717.  
  3718. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3719. Date: Sun, 24 Apr 1994 03:31:55 GMT
  3720. Organization: Syracuse University, CIS Dept.
  3721.  
  3722. In article <2ounj1$njg@hopscotch.ksr.com> jfw@ksr.com (John F. Woods) writes:
  3723.  
  3724. >>>I called the IRS on this point and they said software CAN be used
  3725. >>>as a 179 deduction.
  3726. >>
  3727. >>If I were going to try this, I think I'd call them two or three times
  3728. >>and make sure I got the same answer.  Section 179 says that it only
  3729. >>applies to tangible property, and at first blush I'd expect software
  3730. >>to be intangible property.  The regulations for section 179 do not
  3731. >>clarify things.
  3732. >
  3733. >Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses
  3734. >make it pretty clear that you have purchased, at most, some small squares
  3735. >of plastic and iron oxide and a badly written manual which isn't guaranteed
  3736. >to have anything to do with any program that might, through sheer negligence,
  3737. >have accidently been recorded on the piece of plastic.  That sounds pretty
  3738. >tangible to me; maybe software licenses have a use after all ;-).
  3739. >
  3740. >
  3741. >[WARNING:  THE ABOVE IS INTENDED AS HUMOR....
  3742.  
  3743. Actually, I'd say you have it backwards.  Most shrinkwrap licenses suggest
  3744. that you have not bought a *copy* of the software, but rather, you have
  3745. only purchased a license to use the software.  The shrinkwrap license
  3746. maintains that the copy you are given remains the property of the
  3747. publisher.
  3748.  
  3749. Since shrinkwrap licenses are almost universally considered to be
  3750. unenforceable, as a matter of law, you actually do purchase a *copy* of
  3751. the software.
  3752.  
  3753. Now, a license is intangible, but an actual copy of the software is
  3754. tangible.  That the IRS apparently defines software as intangible (regardless
  3755. of the actual circumstances of its purchase) suggests that they don't give
  3756. a damn whether their rules have anything to do with law or reality.
  3757.  
  3758. (That is, their definition of "tangible" has nothing to do with either the
  3759. legal or common definition of that word.)
  3760.  
  3761.  
  3762. -- 
  3763. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3764. (I like to put 'greeny' here, 
  3765. but my d*mn system wants a 
  3766. *real* name!)                        "What's the difference between an orange?"
  3767.  
  3768. +++++++++++++++++++++++++++
  3769.  
  3770. >From Rick_Holzgrafe@taligent.com (Rick Holzgrafe)
  3771. Date: Mon, 25 Apr 1994 18:55:52 GMT
  3772. Organization: Semicolon Software
  3773.  
  3774. In article <CNjbKKKX.tlvoe1@outpost.SF-Bay.org>, peirce@outpost.SF-Bay.org
  3775. (Michael Peirce) wrote:
  3776.  
  3777. > In article <Scott_Gruby-130494192212@eagle.st.hmc.edu> (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes:
  3778. > > 
  3779. > > [...] but I do have some information on state sales tax in
  3780. > > California...basically you don't have to collect it and people don't have
  3781. > > to pay it. That's what the Board of Equalization told me yesterday.
  3782. > > 
  3783. > > Something California shareware authors may want to note.
  3784. > Humm, I was told the exact opposite.  I've been filing annual sales
  3785. > tax reports for the last couple of years for my shareware sales to
  3786. > to California folks (I live in CA).
  3787.  
  3788. My discussions with the CA State Board of Equalization and my reading of
  3789. their rules and regs (sorry, can't quote a source just now) indicate that
  3790. you must pay sales tax if and only if your customers receive some sort of
  3791. material goods from you as part of the exchange. If the goods are delivered
  3792. entirely by electronic means (e.g., the customer downloaded the product
  3793. from a BBS and you send no disks or manual in exchange for their payment),
  3794. then sales tax is not involved.
  3795.  
  3796. Accordingly I report sales tax on my mail-order product (for which the
  3797. customer receives a labeled disk and printed manual) but not for my
  3798. shareware products which are complete and self-contained when the customer
  3799. downloads them.
  3800.  
  3801. A nit: the customer is not required to pay sales tax in any case. The
  3802. SELLER is required to pay the tax, which may be collected from the customer
  3803. (i.e., added to the product's base price) or simply paid out of the
  3804. seller's gross.
  3805.  
  3806. -- Rick Holzgrafe
  3807.    Semicolon Software
  3808.    rmh@taligent.com
  3809.  
  3810. +++++++++++++++++++++++++++
  3811.  
  3812. >From tzs@u.washington.edu (Tim Smith)
  3813. Date: 7 May 1994 11:56:37 GMT
  3814. Organization: University of Washington School of Law, Class of '95
  3815.  
  3816. >How do you figure that it's intangible?  You must think that shrinkwrap
  3817. >licenses--which specify that you purchase only a license to use the
  3818. >software--are valid contracts.
  3819.  
  3820. Non sequitur.  Why would my guess that software is intangible for tax
  3821. purposes have anything to do with what I think of shrinkwrap licenses?
  3822.  
  3823. --Tim Smith
  3824.  
  3825. +++++++++++++++++++++++++++
  3826.  
  3827. >From rmah@panix.com (Robert S. Mah)
  3828. Date: Sat, 07 May 1994 15:11:13 -0500
  3829. Organization: One Step Beyond
  3830.  
  3831. tzs@u.washington.edu (Tim Smith) wrote:
  3832.  
  3833. > >How do you figure that it's intangible?  You must think that shrinkwrap
  3834. > >licenses--which specify that you purchase only a license to use the
  3835. > >software--are valid contracts.
  3836. > Non sequitur.  Why would my guess that software is intangible for tax
  3837. > purposes have anything to do with what I think of shrinkwrap licenses?
  3838.  
  3839. Software is copyrightable.  Only tanglible things can be copyrighted.
  3840. Copyrighted items, when sold (or licensed or whatever) are usually taxed.
  3841. In some places even services (i.e. non tangibles) have a sales tax 
  3842. associated with them.
  3843.  
  3844. In other words, whether you have to pay sales taxes is not a philosophical
  3845. question or a question of logical deduction.  Simply follow the appropriate
  3846. laws.  No one ever said laws have to make sence.  If you disagree you can
  3847. challenge the law in court.  But until you win, you must still pay your 
  3848. taxes if that's what the law says.
  3849.  
  3850. Cheers,
  3851. Rob
  3852. ___________________________________________________________________________
  3853. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  3854.  
  3855. ---------------------------
  3856.  
  3857. >From taihou@iss.nus.sg (Tng Tai Hou)
  3858. Subject: Thread Mgr Native PPC NOT - why?
  3859. Date: 8 May 1994 08:43:27 +0800
  3860. Organization: Institute Of Systems Science, NUS
  3861.  
  3862. In the readme of the new native Thread Mgr 2.01, it was emphasized that
  3863. there are no pre-emptive threads for the PPC - never has and never
  3864. will  !!!    This from a official free Apple product!!!
  3865.  
  3866. No reasons were given. But I think everyone would like to know
  3867. why this is so. Is there something about the PPC that makes
  3868. it unable to perform pre-emptive threads?!!! Is it the software
  3869. or hardware? If it is true for all (now and future) PowerMacs,
  3870. then we can end the debate about pre-emptive threads once
  3871. and for all - there won't be any.
  3872.  
  3873. Please, can someone, esp someone from Apple clarify this in technical
  3874. details.
  3875.  
  3876. I can only venture a guess - that the PPC in hardware has only one
  3877. level of interrupt, and that makes in very tough. That the System Software
  3878. in 68k has a lot more interrupts, and this has be emulated, which it is.
  3879.  
  3880. Please, this isn't a flame or a criticism. I need to know.
  3881.  
  3882. Tai Hou TNG
  3883. Singapore
  3884.  
  3885.  
  3886. +++++++++++++++++++++++++++
  3887.  
  3888. >From chewy@shell.portal.com (Paul F. Snively)
  3889. Date: 8 May 1994 14:12:10 GMT
  3890. Organization: tumbolia.com
  3891.  
  3892. In article <2qhcjf$1gd@ghost.iss.nus.sg>
  3893. taihou@iss.nus.sg (Tng Tai Hou) writes:
  3894.  
  3895. > In the readme of the new native Thread Mgr 2.01, it was emphasized that
  3896. > there are no pre-emptive threads for the PPC - never has and never
  3897. > will  !!!    This from a official free Apple product!!!
  3898. > No reasons were given. But I think everyone would like to know
  3899. > why this is so.
  3900.  
  3901. There was a fairly sizable thread about this earlier.  The problem
  3902. stems from the fact that the 68K emulator uses a pretty simple runtime
  3903. model for the interrupts that the Thread Manager uses to schedule
  3904. preemptive threads.  That is, if an interrupt occurred in the middle of
  3905. emulating a 68K instruction, and a thread context-switch occurred, the
  3906. emulator isn't written in such a way as to handle that gracefully, and
  3907. to rewrite the emulator to allow thread context switching in the middle
  3908. of emulating a 68K instruction would introduce significant overhead
  3909. into the emulator, so they're not prepared to do it.
  3910.  
  3911. Apple's conventional wisdom on the subject is that they're working on a
  3912. preemptively-multitasked future version of the OS, so "wait for it." 
  3913. This, of course, conveniently ignores the installed base plus the
  3914. amount of time between when Apple releases a new system and the time
  3915. that a statistically significant portion of Apple's 13% of the market
  3916. trusts it.
  3917.  
  3918. Does it sound like I feel pretty cynical about Apple these days?  It
  3919. should.
  3920.  
  3921. - ---------------------------------------------------------------------
  3922. Paul F. Snively          "Just because you're paranoid, it doesn't mean
  3923. chewy@shell.portal.com    that there's no one out to get you."
  3924.  
  3925. ---------------------------
  3926.  
  3927. >From knop@duteca8.et.tudelft.nl (Peter Knoppers)
  3928. Subject: updated list of bizarre key combos on the mac
  3929. Date: 2 May 1994 21:52:34 GMT
  3930. Organization: Delft University of Technology, Dept. of Electrical Engineering
  3931.  
  3932. It has been quite a while since I last updated the list below. It is
  3933. about double the size of the previous version. Recently I got a few
  3934. requests for the "current" version, so I decided to create a "current"
  3935. version.
  3936.  
  3937. Enjoy!
  3938.  
  3939. List of bizarre, useful keyboard combinations, version 1.2, May 2, 1994.
  3940. - ---------------------------------------------------------------------------
  3941. Effect:        Rebuild the desktop file.
  3942. How to obtain:    Hold COMMAND+OPTION during startup.
  3943. Restrictions:    None.
  3944. Why use this:    When your icons are suddenly lost, to reduce the size of the
  3945.         desktop file (and probably in some other cases).
  3946. Learned from:    Comp.sys.mac.faq, July 22, 1992.
  3947. - ---------------------------------------------------------------------------
  3948. Effect:        Don't mount the internal SCSI disk (ID=0) on startup.
  3949. How to obtain:    Hold OPTION+COMMAND+SHIFT+BACKSPACE during startup.
  3950. Restrictions:    Only on ADB keyboard.
  3951. Why use this:    To by-pass (not boot from) a corrupt internal hard disk.
  3952. Learned from:    Posting by Daniel Mueller <muller_d@elgc.epfl.ch>.
  3953. - ---------------------------------------------------------------------------
  3954. Effect:        Startup with a minimal ROM-disk containing System 6.0.3,
  3955.         Finder 6.1x and AppleShare.
  3956. How to obtain:    Hold COMMAND+OPTION+X+O during startup.
  3957. Restrictions:    Only on the Mac Classic; this version of the System is NOT
  3958.         recommended to run the Classic under.
  3959. Why use this;    Probably for emergency repairs.
  3960. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  3961. - ---------------------------------------------------------------------------
  3962. Effect:        Zap the PRAM (Parameter RAM).
  3963. How to obtain:    Hold COMMAND+OPTION+P+R during startup.
  3964. Restrictions:    Only on System 7 and your timing seems to be critical...
  3965. Why use this:    This sometimes cures weird problems.
  3966. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  3967. - ---------------------------------------------------------------------------
  3968. Effect:        Don't load extensions and don't execute startup items.
  3969. How to obtain:    Hold SHIFT during startup.
  3970. Restrictions:    System 7.
  3971. Why use this:    To start a Macintosh with a conflicting collection of
  3972.         extensions and startup items.
  3973. Learned from:    Rene G.A. Ros rgaros@bio.vu.nl>,
  3974.         or <rgaros@nikhefk.nikhef.nl>
  3975. - ---------------------------------------------------------------------------
  3976. Effect:        Don't execute startup items.
  3977. How to obtain:    Press and hold SHIFT after the last extension has loaded, but
  3978.         before the finder is completely started.
  3979. Restrictions:    System 7.
  3980. Why use this:    To start a Macintosh that has a conflicting collection of
  3981.         startup items.
  3982. Learned from:    Rene G.A. Ros rgaros@bio.vu.nl>,
  3983.         or <rgaros@nikhefk.nikhef.nl>
  3984. - ---------------------------------------------------------------------------
  3985. Effect:        Eject floppy disk before looking for a boot disk.
  3986. How to obtain:    Hold MOUSEBUTTON during startup.
  3987. Restrictions:    None.
  3988. Why use this:    If you have a boot disk in the floppy drive, but don't want
  3989.         to boot from it.
  3990. Learned from:    Michael Grabenstein <grabenst@umbc3.umbc.edu>
  3991.         or <ZMEG@AACC.bitnet>.
  3992. - ---------------------------------------------------------------------------
  3993. Effect:        Kill the current foreground process.
  3994. How to obtain:    Type COMMAND+OPTION+ESCAPE.
  3995. Restrictions:    Only on System 7.
  3996. Why use this:    After an application has crashed this might regain you
  3997.         control of the machine in order to save work done in other
  3998.         applications before restarting. Restart as soon as possible
  3999.         afterwards because some things may have been clobbered by
  4000.         the crashed application.
  4001. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4002. - ---------------------------------------------------------------------------
  4003. Effect:        Rebuild the desktop.
  4004. How to obtain:    Type COMMAND+OPTION+ESCAPE while in the Finder, then (at the
  4005.         dialog "Force Finder to quit?") select Force Quit and then
  4006.         immediately hold OPTION+COMMAND.
  4007. Restrictions:    Only on System 7.
  4008. Why use this:    When your icons are suddenly lost, to reduce the size of the
  4009.         desktop file (and probably in some other cases).
  4010. Learned from:    Mark Noda <nodam@amaterasu.sbi.com>.
  4011. - ---------------------------------------------------------------------------
  4012. Effect:        Reset.
  4013. How to obtain:    Type COMMAND+CONTROL+POWER
  4014.         (power is the key with the triangle on it).
  4015. Restrictions:    Macintosh LC or Macintosh IIsi (which don't have a restart
  4016.         button).
  4017. Why use this:    To restart a hung system.
  4018. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4019. - ---------------------------------------------------------------------------
  4020. Effect:        Restart the Mac.
  4021. How To Obtain:    Type COMMAND-SHIFT-POWER.
  4022.         (power is the key with the triangle on it).
  4023. restrictions:    Must have programmer's key installed.
  4024. Why use this:    To restart a hung system.
  4025. Learned from:    Joshua Rabinowitz <joshr@ptolemy.arc.nasa.gov>.
  4026. - ---------------------------------------------------------------------------
  4027. Effect:        Interrupt; enter the debugger.
  4028. How to obtain:    Type COMMAND+POWER.
  4029.         (power is the key with the triangle on it).
  4030. Restrictions:    Macintosh LC or Macintosh IIsi (which don't have an interrupt
  4031.         button).
  4032. Why use this:    To enter the debugger (if installed, else to crash the
  4033.         computer).
  4034. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4035. - ---------------------------------------------------------------------------
  4036. Effect:        Eject the floppy disk in the internal drive immediately.
  4037. How to obtain:    Hold COMMAND+SHIFT+1.
  4038. Restrictions:    None (known).
  4039. Why use this:    To save yourself one bent paper clip. This works even while
  4040.         _in_ the format dialog, thus enabling you to replace the
  4041.         floppy in the drive by one with an unrepairable desktop file.
  4042. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4043. - ---------------------------------------------------------------------------
  4044. Effect:        Eject the floppy disk in the external (or second internal)
  4045.         drive immediately.
  4046. How to obtain:    Hold COMMAND+SHIFT+2.
  4047. Restrictions:    None (known).
  4048. Why use this:    To save yourself one bent paper clip. This works even while
  4049.         _in_ the format dialog, thus enabling you to replace the
  4050.         floppy in the drive by one with an unrepairable desktop file.
  4051. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4052. - ---------------------------------------------------------------------------
  4053. Effect:        Create a screen dump in MacPaint format.
  4054. How to obtain:    Type COMMAND+SHIFT+3.
  4055. Restrictions:    None.
  4056. Why use this:    To create documentation of a Macintosh product. The screen
  4057.         dump files are created in the root directory of the drive
  4058.         and are assigned unique names starting with "screen".
  4059. Learned from:    Posting by Matt Georgy <mgeorgy@vmsclst1.sc.csuopmona.edu>.
  4060. - ---------------------------------------------------------------------------
  4061. Effect:        Zap the PRAM (Parameter RAM).
  4062. How to obtain:    Hold COMMAND+OPTION+SHIFT while activating the control panel
  4063.         with the mouse.
  4064. Restrictions:    System 6.
  4065. Why use this:    This sometimes cures weird problems.
  4066. Learned from:    Walter <boodlums@aol.com>
  4067. - ---------------------------------------------------------------------------
  4068. Effect:        Cycle keyboard mappings.
  4069. How to obtain:    Hold COMMAND+OPTION+SPACE.
  4070. Restrictions:    System 7.
  4071. Why use this:    To switch to the appropriate keyboard mapping when you use
  4072.         several languages.
  4073.         To show the current keyboard in the menu bar edit the 'itlc'
  4074.         resource with ResEdit and turn "Show Keyboard Menu" on.
  4075. Learned from:    Paul Savage <paul.savage@carbon.chem.csiro.au>
  4076. - ---------------------------------------------------------------------------
  4077. Effect:        Format a floppy disk that has an un-repairable desktop file.
  4078. How to obtain:    Hold COMMAND+OPTION+SHIFT+TAB while inserting the floppy
  4079.         disk.
  4080. Restrictions:    None (known).
  4081. Why use this:    To re-use the floppy (and destroy all information currently
  4082.         stored on it).
  4083. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4084. - ---------------------------------------------------------------------------
  4085.  
  4086. Please MAIL additions/corrections/suggestions to knop@duteca.et.tudelft.nl
  4087.  
  4088. If there is interest, I will maintain, correct and extend this list. I expect
  4089. that the "Restrictions:" lines are not 100% correct...
  4090.  
  4091. -- 
  4092.   _____       __  __  __  __   ____   _____   _____   ______  _____    _____ 
  4093.  |  _  \     |  |/  ||  \|  | /    \ |  _  \ |  _  \ |   ___||  _  \  /  ___|
  4094.  |   __/ _   |     < |      ||  ||  ||   __/ |   __/ |   >__ |     <  \__  \
  4095.  |__|   |_|  |__|\__||__|\__| \____/ |__|    |__|    |______||__|\__||_____/
  4096.   Delft University of Technology, The Netherlands, knop@duteca.et.tudelft.nl
  4097.  
  4098. +++++++++++++++++++++++++++
  4099.  
  4100. >From Frank Manshande <frankm@and.nl>
  4101. Date: Tue, 3 May 1994 07:07:15 GMT
  4102. Organization: AND Software BV
  4103.  
  4104. In article <2q3sn2$lj4@liberator.et.tudelft.nl> Peter Knoppers,
  4105. knop@duteca8.et.tudelft.nl writes:
  4106. >Effect:        Reset.
  4107. >How to obtain:    Type COMMAND+CONTROL+POWER
  4108. >                (power is the key with the triangle on it).
  4109. >Restrictions:    Macintosh LC or Macintosh IIsi (which don't have a restart
  4110. >                button).
  4111. >Why use this:    To restart a hung system.
  4112. >Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4113.  
  4114. My Centris 660AV does the same, and I suspect all new Macintoshes can
  4115. do a restart using this key combination.
  4116.  
  4117. I missed pressing the POWER key seperately. On the Centris 660AV this
  4118. brings up a dialog asking the user if he or she wants to shutdown the
  4119. computer. This is the same with the Color Classic, and probably some
  4120. more Macs. It is also very logical to use the same key for starting up
  4121. a Mac as for shutting down (although you can't start up a Centris 660AV
  4122. this way, because it has a real power switch :( ).
  4123.  
  4124. The first computer I saw which used a key on the keyboard to shutdown
  4125. the computer was the NeXT.
  4126.  
  4127. Frank Manshande
  4128. frankm@and.nl
  4129. AND Software BV
  4130. Rotterdam, The Netherlands
  4131.  
  4132. +++++++++++++++++++++++++++
  4133.  
  4134. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  4135. Date: Fri, 6 May 1994 15:07:25 +1200 (NZST)
  4136. Organization: (none)
  4137.  
  4138. Frank Manshande <frankm@and.nl> writes:
  4139. > The first computer I saw which used a key on the keyboard to shutdown
  4140. > the computer was the NeXT.
  4141.  
  4142. It's not on the keyboard, but perhaps you never saw the Apple Lisa?
  4143.  
  4144. You hit the power switch, and it shut down all the applications and turned
  4145. off.  When you turned it back on, it opened all the applications and
  4146. documents again, just the way you left them...
  4147.  
  4148. +++++++++++++++++++++++++++
  4149.  
  4150. >From rarachel@poly.edu (Arsen Ray Arachelian)
  4151. Date: Fri, 6 May 1994 04:13:34 GMT
  4152. Organization: Polytechnic University, New York
  4153.  
  4154.  
  4155. : The first computer I saw which used a key on the keyboard to shutdown
  4156. : the computer was the NeXT.
  4157.  
  4158. Of course there was the Lisa with the Power switch inside the alcove where
  4159. the keyboard sat.  Not exactly on the keyboard, but certainly a soft-power
  4160. on/off switch.   First computer I ever saw that could shut itself off! :-)
  4161.  
  4162.  
  4163. +++++++++++++++++++++++++++
  4164.  
  4165. >From epenneba@ux1.cso.uiuc.edu (I never )
  4166. Date: 6 May 1994 18:01:27 GMT
  4167. Organization: University of Illinois at Urbana
  4168.  
  4169. Could someone please mail me the original updated list?  I must have missed 
  4170. it......
  4171.  
  4172. Thanks:)
  4173.  
  4174. -Erik
  4175.  
  4176. -- 
  4177. "Really ain't no use in me hanging around.... <><><> epenneba@ux1.cso.uiuc.edu
  4178.  Feeling sweet feelin', wish I could caress and kiss..."
  4179. These are not the opinions of CCSO.  I am the mouthpiece of Satan.
  4180.  
  4181. ---------------------------
  4182.  
  4183. End of C.S.M.P. Digest
  4184. **********************
  4185.  
  4186.  
  4187.