home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / easylibs / source / iprintf.a < prev    next >
Text File  |  1994-10-27  |  1KB  |  56 lines

  1.     ;
  2.     ;    This is a replacement for the debug routine dprintf from ddebug_lib.
  3.     ;    Should work exactly the same by using Exec.RawDoFmt except that the
  4.     ;    output goes to an intuition requester instead of the parallel port.
  5.     ;
  6. ;        cseg
  7.         section text,code
  8.  
  9.         xdef _iprintf
  10.         xref _LVOOpenLibrary
  11.         xref _LVOCloseLibrary
  12.         xref _LVOEasyRequestArgs
  13.  
  14. _iprintf:    link    a5,#-20
  15.         movem.l d0-d2/a0-a4/a6,-(sp)
  16.  
  17.         lea    intuiname,a1    ;   Open intuition.library
  18.         move.l    #37,d0
  19.         move.l    4,a4
  20.         move.l    a4,a6
  21.         jsr    _LVOOpenLibrary(a6)
  22.         move.l    d0,d2
  23.         beq    End
  24.  
  25.         lea    -20(a5),a1      ;   Initialize the easystruct
  26.         move.l    #20,(a1)
  27.         move.l    #0,4(a1)
  28.         lea    debugname,a0
  29.         move.l    a0,8(a1)
  30.         move.l    8(a5),12(a1)
  31.         lea    gadgetname,a0
  32.         move.l    a0,16(a1)
  33.  
  34.         move.l    #0,a0        ;   Call EasyRequest
  35.         move.l    #0,a2
  36.         lea    12(a5),a3
  37.         move.l    d2,a6
  38.         jsr    _LVOEasyRequestArgs(a6)
  39.  
  40.         move.l    d2,a1        ;   Close Intuition
  41.         move.l    a4,a6
  42.         jsr    _LVOCloseLibrary(a6)
  43.  
  44. End:        movem.l (sp)+,d0-d2/a0-a4/a6
  45.         unlk    a5
  46.         rts
  47.  
  48. ;        dseg
  49.         section libdata,data
  50.  
  51. intuiname:    dc.b    'intuition.library',0
  52. debugname:    dc.b    'Debug message',0
  53. gadgetname:    dc.b    'Ok',0
  54.  
  55.         end
  56.