🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6109

Assembly question from turnip

#6109
From: Dennis Francis Heffernan
Date: Sat, 27 Oct 1990 02:00
35 lines
2125 bytes
	Well, I've hit a good one.  I've finally gotten around to trying to l
learn assembly on this beast, and my first program crashes.  Not surprising.
WHERE it crashes is- the first call to AllocMem.
	Consider the following:

getvarmem     move #4,a6                    ;get memory for variables
              move.b #60,D0
              move.l #0,D1
              jsr _LVOAllocMem(A6)
              bne 1$
              jmp giveup                    ;didn't get 60 bytes?  SHEESH!
1$            move.l D0,vars                ;stash the address for variables

              move.l a4,tailadd(vars)       ;put tail in vars
              move.l d4,taillen(vars)

	'vars' has been EQUR'ed to a5.  The program never gets past the call to
AllocMem.  I've been using SRT, and it shows all the registers clear except
a6 (which is 4, like it should be), d0 (set to 60 up there) and a4 and d4 
(which hold the address and length of the command tail.  I deliberately cleared
all the other registers before this routine.)  SRT reports the PC is at 4,
which doesn't make any sense to me.  I did xref the offset for AllocMem (and
everything else- I'm using CAPE and it has an autoxref feature.  I even 
disassembled the executable to see if it had the right offset in there and it
does.)
	I must be missing something stupid.  If you know what it is, send 
email.  Or post it, if it's bad enough to warrant (more) public humiliation.

	PS- know any good PD debugging tools? ;-)

dfrancis@tronsbox.xei.com   ...uunet!tronsbox!dfrancis     GEnie: D.HEFFERNAN1
------------------------------------------------------------------------------
"I don't understand why you make such a big deal out of everything...haven't
you learned; if it's not happenning to me it's not important?" -Murphy Brown
Technical Details
Message-ID: <2728cc8d-a00comp.sys.amiga.tech@tronsbox.xei.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tronsbox!dfrancis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tronsbox!dfrancis
From: dfrancis@tronsbox.xei.com (Dennis Francis Heffernan)
Newsgroups: comp.sys.amiga.tech
Subject: Assembly question from turnip
Keywords: can allocmem crash?
Message-ID: <2728cc8d-a00comp.sys.amiga.tech@tronsbox.xei.com>
Date: 27 Oct 90 02:00:21 GMT
Lines: 35