[futurebasic] Re: selectors & traps

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 1998 : Group Archive : Group : All Groups

From: Chris <staz@...>
Date: Mon, 30 Mar 98 10:47:25 -0500
>I have seen assembly versions of trap calls in FutureBasic that require
>selectors, where the selector has been declared inline before the trap 
>number:
>
>'   DC.W   selector
>'   DC.W   trap
>
>and where the selector has been put into DO before the trap is declared
>inline:
>
>'   move.w   #selector,d0
>'   dc.w	 trap
>
>Experiments seem to show that it works either way. Is this correct? Is 
>there a
>preferred (Apple approved) way?


FB uses D0 as an accumulator, so values are put there almost as a matter 
of course.

Some toolboxes require that the selector be put in D0. This is usually a 
long integer. Some require that it be placed on the stack. This is 
usually a word. The two are not interchangeable.

If the toolbox is already built in to FB, the selector is automatically 
placed in the proper location, so there is no need to do it manually.

Pizza, Pizza,

-STAZ   ~)~

--------------------------------------------------------------
STAZ Software * 4387 Leisure Time Dr * Diamondhead, MS 39525
--------------------------------------------------------------
Orders: 800-348-2623      EMail http: //www.stazsoftware.com
  Tech: 601-255-7085             FAX: 601-255-7086     
--------------------------------------------------------------