🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Assembly question from turnip

#6136
From: Larry Phillips
Date: Sat, 27 Oct 1990 01:09
31 lines
1849 bytes
In <15433@cbmvax.commodore.com>, valentin@cbmvax.commodore.com (Valentin Pepelea) writes:
>In article <2728cc8d-a00comp.sys.amiga.tech@tronsbox.xei.com>
>dfrancis@tronsbox.xei.com (Dennis Francis Heffernan) writes:
>>
>>	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.
>>
>>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
>
>The first problem is with the first instruction. What is the data width of
>that instruction? What data width does your assembler default to? Replace
>that instruction with "move.l #4,a6".

Wooooooops! That should be 'move.l 4,a6', and not the immediate operation.

-larry

--
It is not possible to both understand and appreciate Intel CPUs.
    -D.Wolfskill
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+
Technical Details
Message-ID: <2162@lpami.wimsey.bc.ca>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!van-bc!

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!van-bc!
From: lphillips@lpami.wimsey.bc.ca (Larry Phillips)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Assembly question from turnip
Keywords: can allocmem crash?
Message-ID: <2162@lpami.wimsey.bc.ca>
Date: 27 Oct 90 01:09:39 GMT
Lines: 31
Return-Path: <lpami!lphillips>
To: van-bc!rnews