home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 103.lha / ColRequest / screens.asm < prev   
Assembly Source File  |  1986-11-21  |  1KB  |  80 lines

  1.  
  2.  
  3.  
  4.  
  5.     XREF    ColourReq
  6.  
  7.  
  8. LINKLIB    MACRO
  9.     move.l    \2,a6
  10.     jsr    \1(a6)
  11.     ENDM
  12.  
  13.  
  14. WBENCHSCREEN    EQU    $00000001
  15. CUSTOMSCREEN    EQU    $F
  16. V_HIRES        EQU    $8000
  17.  
  18.  
  19. * Forget about linking with amiga.lib
  20.  
  21. _LVOOpenLibrary EQU    $fffffdd8
  22. _LVOCloseLibrary    EQU    $fffffe62
  23. _AbsExecBase    EQU    $00000004
  24. _LVOCloseScreen    EQU    $ffffffbe
  25. _LVOOpenScreen    EQU    $ffffff3a
  26.  
  27. * my definitions
  28.  
  29.  
  30. *    none today
  31.  
  32.  
  33. _main:
  34.  
  35.     lea    INTUIT.NAME,a1    Open Intuition
  36.     clr.l    d0
  37.     LINKLIB    _LVOOpenLibrary,_AbsExecBase    Macro, save typing
  38.     move.l    d0,Intuitionx.Ptr
  39.  
  40.     lea.l    NScreen,a0
  41.     LINKLIB    _LVOOpenScreen,Intuitionx.Ptr    Open the custom screen
  42.     move.l    d0,Screen.Ptr
  43.     cmp.l    #0,d0
  44.     beq    NoScreen
  45.  
  46.     jsr    ColourReq
  47.  
  48.     move.l    Screen.Ptr,a0
  49.     LINKLIB    _LVOCloseScreen,Intuitionx.Ptr
  50.     move.l    Intuitionx.Ptr,a1
  51.     LINKLIB    _LVOCloseLibrary,_AbsExecBase
  52.  
  53. NoScreen:
  54.     rts
  55.  
  56.     CNOP    0,4
  57.  
  58. Intuitionx.Ptr:
  59.     dc.l    0
  60. Screen.Ptr:
  61.     dc.l    0
  62.  
  63. NScreen            ;NewScreen structure
  64.  
  65. *            Lo-Res 5 deep
  66.  
  67.     DC.W    0,0,320,200,2    LeftEdge,TopEdge,Width,Height,Depth
  68.     DC.B    0,1    DetailPen,BlockPen
  69.     DC.W    V_HIRES    ViewModes
  70.     DC.W    CUSTOMSCREEN    Type
  71.     DC.L    0    *Font
  72.     DC.L    0    *DefaultTitle
  73.     DC.L    0    *Gadgets
  74.     DC.L    0    *CustomBitMap
  75.  
  76. INTUIT.NAME:
  77.     dc.b    'intuition.library',0
  78.  
  79.     END
  80.