home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / HISOFTPASCAL2,0-3.DMS / in.adf / Units / CIA.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-05-20  |  1.1 KB  |  79 lines

  1. unit CIA;
  2.  
  3. INTERFACE
  4. uses Exec;
  5.  
  6.  
  7. const
  8.     CIAANAME = 'ciaa.resource';
  9.     CIABNAME = 'ciab.resource';
  10.  
  11.  
  12. function AddICRVector
  13.         (resource: pLibrary;
  14.         iCRBit: integer;
  15.         interrupt: pInterrupt): pInterrupt;
  16.  
  17. procedure RemICRVector
  18.         (resource: pLibrary;
  19.         iCRBit: integer;
  20.         interrupt: pInterrupt);
  21.  
  22. function AbleICR
  23.         (resource: pLibrary;
  24.         mask: integer): integer;
  25.  
  26. function SetICR
  27.         (resource: pLibrary;
  28.         mask: integer): integer;
  29.  
  30.  
  31.  
  32. IMPLEMENTATION
  33. function AddICRVector; xassembler;
  34. asm
  35.     movem.l    a6,-(sp)
  36.     lea        8(sp),a6
  37.     move.l    (a6)+,a1
  38.     move.w    (a6)+,d0
  39.     move.l    (a6)+,a6
  40.     jsr        -6(a6)
  41.     move.l    d0,$12(sp)
  42.     movem.l    (sp)+,a6
  43. end;
  44.  
  45. procedure RemICRVector; xassembler;
  46. asm
  47.     movem.l    a6,-(sp)
  48.     lea        8(sp),a6
  49.     move.l    (a6)+,a1
  50.     move.w    (a6)+,d0
  51.     move.l    (a6)+,a6
  52.     jsr        -$C(a6)
  53.     movem.l    (sp)+,a6
  54. end;
  55.  
  56. function AbleICR; xassembler;
  57. asm
  58.     movem.l    a6,-(sp)
  59.     lea        8(sp),a6
  60.     move.w    (a6)+,d0
  61.     move.l    (a6)+,a6
  62.     jsr        -$12(a6)
  63.     move.w    d0,$E(sp)
  64.     movem.l    (sp)+,a6
  65. end;
  66.  
  67. function SetICR; xassembler;
  68. asm
  69.     movem.l    a6,-(sp)
  70.     lea        8(sp),a6
  71.     move.w    (a6)+,d0
  72.     move.l    (a6)+,a6
  73.     jsr        -$18(a6)
  74.     move.w    d0,$E(sp)
  75.     movem.l    (sp)+,a6
  76. end;
  77.  
  78. end.
  79.