home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff257.lzh / ColorReq / basicilbm (.txt) < prev    next >
AmigaBASIC Source Code  |  1989-10-19  |  2KB  |  78 lines

  1.  'This code was written by Jeff Glatt of dissidents software, and has been
  2.  'placed in the public domain along with the ilbm and requester libraries.
  3.  'This program uses these 2 custom libraries to select an IFF ILBM file and
  4.  'display it. Documentation for the requester library appears on Fish #203.
  5.  
  6.  CLS
  7.  LOCATE 1,8
  8.  PRINT  "Demo AmigaBasic program using the requester and ilbm libraries."
  9.  LOCATE 2,11
  10.  PRINT  "Literally hacked together by Jeff Glatt (dissidents)"
  11.  
  12.  DEFLNG var0012-var0013  'IMPORTANT! All variables are longs (for the library calls)
  13.  
  14.  'requester.bmap, ilbm.bmap, exec.bmap, and intuition.bmap must be in the
  15.  'current directory, or prepend the appropriate path to the lib name.
  16.  LIBRARY "requester.library"
  17.  LIBRARY "ilbm.library"
  18.  LIBRARY "exec.library"
  19.  LIBRARY "intuition.library"
  20.  LIBRARY "color.library"
  21.  
  22.  DECLARE FUNCTION var0015() LIBRARY
  23.  DECLARE FUNCTION var00c2()   LIBRARY
  24.  DECLARE FUNCTION var00bf() LIBRARY
  25.  
  26.  DECLARE FUNCTION var0000() LIBRARY  'These are in the requester lib.
  27.  DECLARE FUNCTION var0004() LIBRARY 'Other functions in the lib do
  28.  DECLARE FUNCTION var0005() LIBRARY       'not return values, and so do not
  29.  DECLARE FUNCTION var0009() LIBRARY 'need declaring
  30.  DECLARE FUNCTION var0035() LIBRARY
  31.  DECLARE FUNCTION var003c() LIBRARY
  32.  DECLARE FUNCTION var003d() LIBRARY
  33.  DECLARE FUNCTION var003e() LIBRARY
  34.  DECLARE FUNCTION var003f() LIBRARY
  35.  DECLARE FUNCTION var0040() LIBRARY
  36.  
  37.  DECLARE FUNCTION var00a9() LIBRARY
  38.  DECLARE FUNCTION var00af() LIBRARY
  39.  
  40.  'First we must get a buffer for the pathname. The FileIO's DoFileIOWindow()
  41.  'will copy the complete pathname there. The complete path looks just like
  42.  'a CLI line:
  43.  
  44.  '  Diskname:TopDrawer/SubDrawer...etc...BottomDrawer/Filename
  45.  
  46.  'Of course, the user may only select a disk or drawer, but no filename, and
  47.  'so the final "/Filename" will not be there. Also, the Filename might not
  48.  'be in any drawers, and so it will appear directly after the diskname. If
  49.  'this format looks weird to you, you need to learn about the CLI.
  50.  'We'll get our buffer from Exec via AllocMem(). 
  51.   
  52.  var001f = 1 : var0020 = 65536 : var006a = 202
  53.  var001a=var0015(var006a,var001f+var0020) 'A buffer
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.