home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 594a.lha / IOPack_v1.04 / IOPackDefs.txt < prev    next >
Text File  |  1991-06-13  |  2KB  |  103 lines

  1. ;IOPackDefs.txt
  2.     nolist
  3.     opt    a+,c+,o-,d+
  4.  
  5.     incdir    "ainclude:"
  6.  
  7.     ;include    "graphics/gfxbase.i"    ;includes can go here
  8.     ;include    "graphics/graphics_lib.i"
  9.     ;include    "graphics/text.i"
  10.  
  11. ; EQU's here
  12.  
  13. ;GRAPHICS_REV    equ    31        ;v1.1, example
  14.  
  15. ;Exports
  16.     XDEF    _IntuitionBase
  17.     XDEF    IOPackWindow
  18.  
  19. ;Imports
  20.     XREF    MakeWindow
  21.     XREF    ClearWindow
  22.     XREF    GetWindowSize
  23.     XREF    WindowTitle
  24.     XREF    SetFont
  25.     XREF    GetC
  26.     XREF    CharOut
  27.     XREF    BackSpace
  28.     XREF    CStrin
  29.     XREF    CStrout
  30.     XREF    Strin
  31.     XREF    Strout
  32.     XREF    NewLine
  33.     XREF    Spaces
  34.     XREF    DecIn
  35.     XREF    DecIn_Long
  36.     XREF    DecOut
  37.     XREF    DecOut_Long
  38.     XREF    HexIn
  39.     XREF    HexIn_Long
  40.     XREF    HexOut
  41.     XREF    HexOut_Long
  42.     XREF    DivuLW
  43.     XREF    Rand
  44.     XREF    ResetRand
  45.     XREF    Seed
  46.     XREF    IOExit
  47.     XREF    WaitForEvent
  48.     XREF    AskYesNo
  49.     XREF    WrtIOInfo
  50.     XREF    startup
  51.  
  52. Start    jsr    startup        ;init
  53.     tst.l    d0
  54.     bne.s    startup_ok
  55. exit_iopack    jsr    IOExit
  56.  
  57. startup_ok    ;clr.l    _GfxBase
  58.     ;moveq    #GRAPHICS_REV,d0    ;open graphics library
  59.     ;lea    graf_name,a1    ;(or library needed)
  60.     ;CALLEXEC    OpenLibrary    ;intuition is already opened
  61.     ;move.l    d0,_GfxBase    ;with the base in _IntuitionBase
  62.     ;bne.s    d0_main
  63.     ;jsr    IOExit
  64.  
  65. do_main    jmp    main        ;execute the main code
  66.  
  67. ; an interface to the IOExit routine
  68.  
  69. Exit    ;tst.l    _GfxBase    ;add various cleanup routines
  70.     ;beq.s    end_exit    ;here
  71.     ;move.l    _GfxBase,a1
  72.     ;CALLEXEC    CloseLibrary
  73. end_exit    jmp    IOExit
  74.  
  75. ; Routines, put your own subroutines here
  76.  
  77. ;GetRPort    move.l    IOPackWindow,a0    ;example on getting the rastport
  78. ;    move.l    wd_RPort(a0),Rast    ;of the IOPackWindow (see
  79. ;    rts            ;Misc Variables below)
  80.  
  81. ;DC's here
  82.  
  83. ;graf_name    GRAFNAME            ;example
  84.  
  85. ;DS's here
  86.  
  87.     EVEN
  88.  
  89. ; This is a pointer to the IOPack Window structure for your use
  90.  
  91. IOPackWindow    ds.l    1
  92.  
  93. ; Library Bases
  94.  
  95. _IntuitionBase    ds.l    1
  96. ;_GfxBase    ds.l    1        ;example: put your own
  97.                 ;library bases here
  98.  
  99. ; Misc Variables, put your own variables here
  100.  
  101. ;Rast    ds.l    1        ;example (rastport of
  102.                 ;IOPackWindow)
  103.