home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / here / simbug / docs / libfile.doc < prev    next >
Text File  |  1995-02-27  |  4KB  |  111 lines

  1.  
  2.  
  3. LibFile.doc
  4. ===========
  5.  
  6.  
  7. PostSIM  and  SIMBug both can load a definition file containing information
  8. about  symbols  to  be  created in general, i.e.  library functions, system
  9. variables  and  hardware  registers.   The  definition file is written in a
  10. simple  script language enabling easy adding of further libraries or custom
  11. data   by   the  user.   It  must  be  stored  in  the  'S:'  directory  as
  12. 'bug.libfile'.
  13.  
  14. PostSIM  and  SIMBug will compile the definitions to a symbol list that can
  15. be  used  by SIM.  The compiler uses an accumulator for the address that is
  16. used  for  the  value  of the next symbol to be defined.  Strings beginning
  17. with  a  dollar  sign  are  concidered  to  be  commands, other strings are
  18. concidered  to be symbol names.  One command or symbol name is accepted per
  19. line.
  20.  
  21. Symbols  can  consist  of  any characters except '$' characters, spaces and
  22. periods.  If a symbol name ends on a space, a symbol with that name and the
  23. value  currently  stored in the accumulator is added to the symbol list and
  24. the  default  size  is  added  to the accumulator.  If the symbol ends on a
  25. period, what is after the period is interpreted as hexadecimal number which
  26. will be added to the accumulator instead of the default size I.e.:
  27.  
  28.  
  29.           ExecBase.22     ;This is ExecBase
  30.           SoftVer         ;Softver
  31.  
  32.  
  33. Commands  begin with a '$' character.  The following commands are currently
  34. known:
  35.  
  36.  
  37.  
  38.         $ADDR [addr]            Directly sets the accumulator to [addr].
  39.  
  40.  
  41.         $JUMP [offset]          Adds [offset] to the accumulator.
  42.  
  43.  
  44.         $END                    Ends  symbol  definition.   The rest of the
  45.                                 file will be ignored.
  46.  
  47.  
  48.         $ENDNODE                Ends  a  symbol  node.   This is useful for
  49.                                 optimisation.    Before  changing  to  i.e.
  50.                                 another library, insert this command.
  51.  
  52.  
  53.         $APTR                   Reads  the  longword  at the address in the
  54.                                 accumulator    and   stores   it   in   the
  55.                                 accumulator.
  56.  
  57.  
  58.         $BCPL                   Same  as  $APTR  but  the  pointer  at that
  59.                                 address  is concidered to be a BCPL pointer
  60.                                 and multiplied with four.
  61.  
  62.  
  63.         $SIZE [size]            Sets  the  default  size  which is added to
  64.                                 symbols without size.
  65.  
  66.  
  67.         $SAVE [num]             Stores  the  accumulator  in  memory [num].
  68.                                 [num] can vary from 1 to 8.
  69.  
  70.  
  71.         $LOAD [num]             Loads memory [num] to accumulator.
  72.  
  73.  
  74.         $LIST                   The memory the accumulator points currently
  75.                                 to  is  interpreted  as  a list and symbols
  76.                                 with  the  names  of  all  nodes  and their
  77.                                 addresses  are created.  The accumulator is
  78.                                 then increased by the default size.
  79.  
  80.  
  81.         $NODE                   The memory the accumulator currently points
  82.                                 to is interpreted as a node structure and a
  83.                                 symbol  with  the node address and its name
  84.                                 is   created.    The   accumulator  is  not
  85.                                 changed.
  86.  
  87.  
  88.         $LIBRARY [name]         Tests  if a node with the name [name] is in
  89.         $DEVICE [name]          the  system  list named by the command.  If
  90.         $RESOURCE [name]        it  is,  the accumulator is loaded with the
  91.         $MEMORY [name]          node  address.   If  it  isn't,  all symbol
  92.         $INTERRUPT [name]       definitions  are  ignored  until  a  $ADDR,
  93.         $PORT [name]            $ENDTYPE   or  one  of  these  commands  is
  94.                                 encountered.   This  is  useful if you only
  95.                                 want  to  define symbols for such an object
  96.                                 if it is there.
  97.  
  98.         $LOADLIB [name]         Opens  and closes a library once to load it
  99.                                 if it hasn't been loaded yet.
  100.  
  101.  
  102.         $ENDTYPE                Enables symbol definition again.
  103.  
  104.  
  105.  
  106. In  the  distribution  of  SIM you will find definition files for KickStart
  107. 1.3,  2.0  and  3.0.  You are welcome to add your own definitions, i.e.  of
  108. your own libraries and such.
  109.  
  110.  
  111.