home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / sys / amiga / demos / 1600 < prev    next >
Encoding:
Text File  |  1992-11-13  |  2.3 KB  |  66 lines

  1. Nntp-Posting-Host: holmenkollen.ifi.uio.no
  2. Newsgroups: alt.sys.amiga.demos
  3. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!larshaug
  4. From: larshaug@ifi.uio.no (Lars Haugseth)
  5. Subject: Re: Writing a StarField. Which method is best?
  6. Message-ID: <1992Nov13.152639.28756@ifi.uio.no>
  7. Sender: larshaug@ifi.uio.no (Lars Haugseth)
  8. Organization: Dept. of Informatics, University of Oslo, Norway
  9. References: <1992Nov7.104910.60476@cc.usu.edu> <1992Nov11.131803.1276@ifi.uio.no> <1948@lysator.liu.se> <erlebach.721646577@unknown>
  10. Date: Fri, 13 Nov 1992 15:26:39 GMT
  11. Lines: 52
  12. Originator: larshaug@holmenkollen.ifi.uio.no
  13.  
  14.  
  15. In article <erlebach.721646577@unknown>, erlebach@Informatik.TU-Muenchen.DE (Thomas Erlebach) writes:
  16. > marvil@lysator.liu.se (Martin Vilcans) writes:
  17. > >larshaug@ifi.uio.no (Lars Haugseth) writes:
  18. > >>    move.l    a7,SAVEA7
  19. > >>    lea    $1000.w,a7
  20. > >Hey, DON'T DO THAT! You will probably destroy some OS structures or buffers.
  21. > >If you really want to create your own stack for some reason, do it like this:
  22. > >    move.l a7,savea7
  23. > >    lea    stacke,a7
  24. > >    .
  25. > >    .
  26. > >    .
  27. > >    section stack,data
  28. > >stack:
  29. > >    ds.b    stacksize    ;A few hundred bytes is more than enough for
  30. > >                ;assembler programs
  31. > >stacke:
  32. > Martin, if you don't understand other programmers' code, then you
  33. > should not critisize it. Lars doesn't want to create his own stack,
  34. > he just uses a7 to store the value $1000 for a while, because then
  35. > he can use
  36. >           sub.w a7,d0
  37. >     and
  38. >           sub.w a7,d1
  39. > instead of
  40. >           subi.w #$1000,d0
  41. >     and
  42. >           subi.w #$1000,d1
  43. > which of course makes Lars's code faster.
  44. > Before he uses the stack again, he restores the original stack pointer.
  45. > This programming technique is perfectly allright.
  46. >             E.T.
  47.  
  48. As long as I have turn off all interrupts, than is...
  49.  
  50. +-----------------------------------------------------------+
  51. | Lars Haugseth                                             +-+
  52. | Dept. of Informatics,               <larshaug@ifi.uio.no> | |
  53. | University of Oslo, Norway                                | |
  54. |                                                           | |
  55. |          If idiots could fly, this would be an airport... | |
  56. +-+---------------------------------------------------------+ |
  57.   +-----------------------------------------------------------+
  58.  
  59.