Path: utzoo!attcan!uunet!portal!cup.portal.com!nop From: nop@cup.portal.com (Randy G Jouett) Newsgroups: comp.sys.amiga.tech Subject: Re: assembly lang questions: frame pointer, ROMWack, A68K, etc Message-ID: <11737@cup.portal.com> Date: 24 Nov 88 21:05:02 GMT References: <2206@kalliope.rice.edu> Organization: The Portal System (TM) Lines: 81 >I have a few questions regarding assembly language programming on the >Amiga. Mucho thankso to those who can take the time to answer them for me. Your welcome :) >On most other systems (such as Unix), there is a convention that a6 is the >"frame pointer". It always points to the last call frame. In other >words, most subroutines start out with "link a6,..." and end with >"unlk a6". But it seems that on the Amiga, a6 is conventionally used to >hold the library base address for library calls ("move.l _DOSBase,a6 ... >jsr _LVOUnLock(a6)"). Is there a convention used for the frame pointer? >Or is it just any register you want? You can use the "link An,#n" instruction on all of the address registers, except for a6 (Well, you could even use a6, but you better make damn sure that you unlk it and put a valid base pointer in a6 before making a system library call :>) and a7, of course. You will also have to make sure that you don't walk over a4 (global) or a5 (stack frame) when writing hybrid code using Manx; I'm not sure if this is true with Lattice, though. >Other than the "preserve d2-d7/a2-a7" convention, are there any other >assembly language conventions I should be paying attention to? Yes. Do not use the "move #n,SR" instruction. The 010 (68010) will blow groceries if it sees this :) >Are there any known bugs in ROMWack? [stuff rm'ed for bandwith.] I don't use ROMWack, myself -- can't help here. >Am I doing something wrong, or is A68K notoriously slow? I'm talking >upwards of 5 minutes for an assemble. Now, my program does include >'intuition.i', which is very large and includes about 50 other files, but >it still seems to take too long. Is there a shortcut I can use with >equivalence files or something? I don't use A68k, and you didn't mention your environment or source size, so I'll venture to say that this is way to long. If you have the memory, put the include dir in "rad:". You can also use a striped *copy* of intuition.i; that is, remove all of the equates and such that aren't being used (i.e, all the equ's that are absolutely, without a doubt, not being used) Also, try removing some of the include files (one at a time) inside of intuition.i and reassemble the program. If the assembler doesn't complain, then you are probably ok. >Why oh why are the definitions in 'exec/types.i' IN ALL UPPER CASE? >(I'm sure there's a good reason). Sounds like the author yanked it out of something else??? >I'm working on a little helper program for browser users. Stay tuned for >details. I hope to have it ready after thanksgiving break (when I'll have >some time to finish and polish). Maybe I can pay a little back to the >Amiga community that has given me so much (browser, Dmouse, DME, ConMan, >etc.). Send the details! > William LeFebvre > Department of Computer Science > Rice University > -- Randy Jouett sun!portal!cup.portal.com!nop or ...!killer!rgj