home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!ukma!netsys!decwrl!concert!sas!mozart.unx.sas.com!jamie
- From: jamie@cdevil.unx.sas.com (James Cooper)
- Subject: Re: New assembly programmer, need help, Why wouldn't this work?
- Originator: jamie@cdevil.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <BxnvK4.Buw@unx.sas.com>
- Date: Fri, 13 Nov 1992 15:40:51 GMT
- References: <1992Nov13.060036.166761@zeus.calpoly.edu>
- Nntp-Posting-Host: cdevil.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 50
-
-
- In article <1992Nov13.060036.166761@zeus.calpoly.edu>, clin@zeus.calpoly.edu (Chihtsung Jeffrey Lin) writes:
- >Hi,
- >
- >I've just started taking a 68000 assembly language class. We do our class
- >works on Macs. Recently I've tried to do some assembly programming on my
- >Amiga but have not idea how to do it. I've tried some simple programs that
- >worked on the Macs assembler we use for our class, but none of them seems
- >to work. I have an A3000, and I've used A68K and asm for SAS C. The linker I
- >use is blink. Here's one I tried.
- >
- >
- >start: move.w #5,d0
- >
- > end
- >
- >
- >It seems to assemble and bind ok, but when I try to run it from CLI, it
- >gives me a Software Failure window, error #8000000B of #80000004. I know
- >that's silly program but I don't see any harm in doing that either. Are
- >there specific codes that are need for an Amiga program? (I did put a csect
- >directive for asm, btw). Oh yeah, I bound it with amiga.lib and lc.lib even
- >though I don't see any reason to.
- >
- >Any hint/ clue is appreciated.
-
- Make one small change:
-
- start: move.w #5,d0
- rts ; return!
-
- end
-
- and everything should work.
-
- When you create a program on the Amiga, it is essentially run as if it
- were one big subroutine, so putting an RTS (ReTurn from Subroutine)
- instruction is a proper way to exit.
-
- With your code the way you had it, it would do the "move" operation
- properly, then just start executing whatever happened to be in memory
- after that, because you didn't tell it when to stop.
-
- --
- ---------------
- Jim Cooper
- (jamie@unx.sas.com) bix: jcooper
-
- Any opinions expressed herein are mine (Mine, all mine! Ha, ha, ha!),
- and not necessarily those of my employer.
-