Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!kth.se!sunic!mcsun!ukc!warwick!csuwr From: csuwr@warwick.ac.uk (Derek Hunter) Newsgroups: comp.sys.acorn Subject: Saving the old pc in APCS || Shareware comments Summary: Why bother? || Worth it? Message-ID: <+?R&L0#@warwick.ac.uk> Date: 26 Mar 91 21:51:48 GMT Article-I.D.: warwick.+?R&L0# Sender: news@warwick.ac.uk (Network news) Distribution: eunet Organization: Computing Services, Warwick University, UK Lines: 35 Nntp-Posting-Host: lily Why, in the APCS section of the PRMs, does the example code suggest saving the /old/ pc onto the stack? # Mov ip,sp \ This is all from memory # StmFD sp!,{a1-a4} \ please forgive mistakes. # StmFD sp!,{v1-v6,fp,ip,lr,pc} # Sub fp,ip,#20 # # ... other bits # # LdmDB fp,{v1-v6,fp,sp,pc}^ Does LdmXX Rn,{...,pc}^ restore the flags from the next word, and not from the pc word, or is this a sneaky way of setting up some traceback block-type-thing (If so, where is the traceback word that describes which registers have been saved)? Also, if we can access the parameters relative to fp, why the distinction with the local variables? (If an answer to this involves stack segmentation, please feel free. I was confused by that concept.) It's a shame that Basic attempts to interpret sp! as the first half of a word indirection, rather than noting that it's inside assembly, and checking sp! type things for a following comma. Derek Hunter. +------------------------------------------------------------------------+ | Can someone who has actually done it, mail me (or post here) a piece | | describing the trouble that initiating shareware involves - amount of | | time spent in distributing upgrades to registered users, maintainance, | | answering fan/hate mail, evaluating bugfixes etc. Ta. | +------------------------------------------------------------------------+ .------------------------------------+---------------------------------------. | `Osmosis is an absorbing hobby.' | Derek Hunter csuwr@cu.warwick.ac.uk |