home *** CD-ROM | disk | FTP | other *** search
- Nntp-Posting-Host: holmenkollen.ifi.uio.no
- Newsgroups: alt.sys.amiga.demos
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!larshaug
- From: larshaug@ifi.uio.no (Lars Haugseth)
- Subject: Re: Writing a StarField. Which method is best?
- Message-ID: <1992Nov13.152639.28756@ifi.uio.no>
- Sender: larshaug@ifi.uio.no (Lars Haugseth)
- Organization: Dept. of Informatics, University of Oslo, Norway
- References: <1992Nov7.104910.60476@cc.usu.edu> <1992Nov11.131803.1276@ifi.uio.no> <1948@lysator.liu.se> <erlebach.721646577@unknown>
- Date: Fri, 13 Nov 1992 15:26:39 GMT
- Lines: 52
- Originator: larshaug@holmenkollen.ifi.uio.no
-
-
- In article <erlebach.721646577@unknown>, erlebach@Informatik.TU-Muenchen.DE (Thomas Erlebach) writes:
- > marvil@lysator.liu.se (Martin Vilcans) writes:
- >
- > >larshaug@ifi.uio.no (Lars Haugseth) writes:
- >
- >
- > >> move.l a7,SAVEA7
- > >> lea $1000.w,a7
- >
- > >Hey, DON'T DO THAT! You will probably destroy some OS structures or buffers.
- > >If you really want to create your own stack for some reason, do it like this:
- >
- > > move.l a7,savea7
- > > lea stacke,a7
- > > .
- > > .
- > > .
- > > section stack,data
- > >stack:
- > > ds.b stacksize ;A few hundred bytes is more than enough for
- > > ;assembler programs
- > >stacke:
- >
- > Martin, if you don't understand other programmers' code, then you
- > should not critisize it. Lars doesn't want to create his own stack,
- > he just uses a7 to store the value $1000 for a while, because then
- > he can use
- > sub.w a7,d0
- > and
- > sub.w a7,d1
- > instead of
- > subi.w #$1000,d0
- > and
- > subi.w #$1000,d1
- > which of course makes Lars's code faster.
- > Before he uses the stack again, he restores the original stack pointer.
- > This programming technique is perfectly allright.
- >
- > E.T.
-
- As long as I have turn off all interrupts, than is...
-
- +-----------------------------------------------------------+
- | Lars Haugseth +-+
- | Dept. of Informatics, <larshaug@ifi.uio.no> | |
- | University of Oslo, Norway | |
- | | |
- | If idiots could fly, this would be an airport... | |
- +-+---------------------------------------------------------+ |
- +-----------------------------------------------------------+
-
-