Chuck Guzis wrote:
On 6/29/2006 at 11:39 PM Don Y wrote:
CALL SOMETHING
DB <parameters_for_something>
LABEL: <do_something_else>
That's actually very common; in particular, stuff like:
CALL SHOW_MESSAGE
DB "Any old blather here",0
The nice part of this sort of thing is that you don't need the calling code
to load the address of the string to be displayed in a register. Saves a
few bytes here and there.
Or, in my case:
CALL APPLICATION_SPECIFIC_LANGUAGE
<asl_opcode>
<asl_opcode>
<asl_opcode>
...
Makes it easy to use the MACRO capabilities of the assembler
(oops, I forgot... we don't use assembler! :> ) to do things
like:
INVOKE_INTERPRETER ;"call application_specific_language"
COUNT 7
LOOP:
MOVE_RELATIVE X,Y
SPEED 100 RPM
DEPTH 1.2 INCHES
DECREMENT COUNT
JUMP_NON_ZERO LOOP
TIMER 25 SECONDS
POWER OFF
WAIT_TIMER
END
;return to normal assembly language
CALL <something_else>