home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / assembler / thesource / volume2 / source / system / asmmacros.lha / GetPrefs.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  1.3 KB  |  39 lines

  1.      NOLIST
  2. GetPrefs    MACRO              ; 14 Jan 88
  3. *------------------------------; Start of GetPrefs macro.
  4.      NOLIST
  5.      IFC '\1','D'              ; If <BufferStartAddr> is specified, then
  6.      LIST
  7.                                ; Make A0 point to the start of the buffer.
  8.      MOVE.L \2,A0
  9.      NOLIST
  10.      IFEQ NARG-2               ; If <BufferSize> is given, then
  11.      LIST
  12.                                ; Put <BufferSize> in D0.
  13.      MOVE.L #\3,D0
  14.      NOLIST
  15.      ENDC
  16.      IFEQ NARG-2               ; If there is no third argument, then
  17.      LIST
  18.                                ; Calculate buffer size as
  19.                                ;  <BufferStartAddr>End minus
  20.                                ;  <BufferStartAddr>. Put it in D0.
  21.      MOVE.L \2End-\2,D0
  22.      NOLIST
  23.      ENDC
  24.      IFNC '\1','I'             ; If <MemBlockName> is specified, then
  25.      LIST
  26.                                ; Get the buffer start address from
  27.                                ;  <MemBlockName>.Adr
  28.      MOVE.L \2.Adr,A0
  29.                                ; Get the buffer size from <MemBlockName>.Size
  30.      MOVE.L \2.Size,D0
  31.      NOLIST
  32.      ENDC
  33.      LIST
  34.                                ; Call GetPrefs.
  35.      CallLib GetPrefs,intuition
  36. *------------------------------; End of GetPrefs macro.
  37.      ENDM
  38.      LIST
  39.