Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ m.v — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

MACRO -- Defines a sequence of DEBUG commands that you can invoke using a
debugger-name.


FORMAT

  Macro debugger-name action-list


REQUIRED ARGUMENTS

  debugger-name  Any legal DEBUG name.  All such symbols begin with an accent
                 grave (`).

  action-list    Any legal DEBUG action-list.  See the "action-list" listing
                 earlier in this encyclopedia for details.


OPTIONAL ARGUMENTS

  None.


DESCRIPTION

  Use the MACRO command to create a macro (i.e., script) of DEBUG commands.
  For instance, you might create a macro that examines the values of several
  variables.  Such a macro might be defined as follows:

      > MACRO `m1 [EXAMINE ponce; PRINT ponts, BREAKPOINT r3\]

  You can invoke a macro anywhere you could use a normal DEBUG command.  To
  invoke the macro, simply specify its name, for instance:

      > `m1

  Note that you cannot abbreviate a macro name.  Also, don't forget that a
  macro name must begin with an accent grave (`).  The name you choose cannot
  duplicate that of an existing debugger variable or debugger definition, though
  it can be the name of an existing macro.  By picking the name of an existing
  macro, you delete the old definition.

  DEBUG does not check macro definitions for illegal commands until you actually
  invoke the macro.

  You can use macros as part of other macro definitions, but you cannot create a
  recursive macro (i.e., a macro that calls itself).

  By default, macro definitions disappear when the DEBUG session ends.  Such a
  pity when you've written a long macro.  Therefore, you might consider storing
  the macro definitions in a DEBUG startup file.


The Special `CR Macro

  When you press the <RETURN> key on a blank DEBUG input line, DEBUG
  automatically invokes a special macro named `CR if it is defined.  By
  default, `CR is not defined and pressing the <RETURN> key is a no-op;
  however, you may specify a definition for it.  For example, the most
  common use of `CR is to cause DEBUG to STEP when you input a blank line.
  To accomplish that, simply define the following macro:

      > MACRO `CR [STEP]

  For full details, see Chapter 3 of the DOMAIN Language Level Debugger
  Reference manual.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026