home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / iconspy1.lha / IconSpy / src / IconSpy.s
Encoding:
Text File  |  1994-10-27  |  16.1 KB  |  664 lines

  1.  
  2. **
  3. **    IconSpy v1.2
  4. **
  5. **    $VER: IconSpy.s 1.2 (27.10.94)
  6. **
  7. **     written by Grzegorz Calkowski
  8. **
  9. **     (C) Copyright 1994 The Beet Research
  10. **
  11. **
  12. **    Use Asm-One or Trash'm-One to assembly it!
  13. **    (or you will have some work with changing local labels :)
  14. **
  15.  
  16.         incdir    "asminc:"        ; include dir
  17.         include    "exec/exec.i"
  18.         include    "dos/dos.i"
  19.         include    "dos/dosextens.i"
  20.         include    "dos/dostags.i"
  21.         include    "intuition/intuition.i"
  22.         include    "workbench/workbench.i"
  23.         include    "workbench/startup.i"
  24.         include    "graphics/gfxbase.i"
  25.  
  26.         include    "lvo30/exec_lib.i"
  27.         include    "lvo30/dos_lib.i"
  28.         include    "lvo30/icon_lib.i"
  29.         include    "lvo30/intuition_lib.i"
  30.         include    "lvo30/graphics_lib.i"
  31.  
  32.         include    "gcmacros.i"
  33.  
  34. ;==============================================================================
  35.  
  36.         SECTION    DetachStuff,code
  37.  
  38. rb_StackSize    =    4096
  39. rb_TaskPri    =    0
  40.  
  41. rb_Start    bra.s    .skip
  42.  
  43.         dc.b    "$VER: IconSpy 1.2 (27.10.94)",$a,$d,0
  44.         cnop    0,4
  45.  
  46. ;==============================================================================
  47.  
  48. .skip        move.l    4.w,a6
  49.         cmp    #37,LIB_VERSION(a6)    ; check kick version
  50.         blt    rb_KickReq
  51.         cla    a1
  52.         call    FindTask        ; get our task
  53.         move.l    d0,a4
  54.         tst.l    pr_CLI(a4)        ; start from cli?
  55.         bne.s    rb_FromCLI        ; yes, runback
  56.         lea    pr_MsgPort(a4),a0    ; get the port
  57.         call    WaitPort
  58.         lea    pr_MsgPort(a4),a0
  59.         call    GetMsg
  60.         move.l    d0,rb_WBMsg        ; store the message
  61.         jmp    rb_RunningBack        ; go program (workbench)
  62.  
  63. ;==============================================================================
  64.  
  65. rb_FromCLI    openlib    rb_DOSName
  66.         move.l    d0,rb_DOSBase
  67.         beq.s    rb_Failure        ; no dos?
  68.         move.l    d0,a6
  69.  
  70.         lea    rb_Start(pc),a1
  71.         clr.l    -4(a1)            ; clear pointer to next segment
  72.         move.l    #rb_RunningBack-4,d3    ; seglist adr
  73.         lsr.l    #2,d3            ; create bcpl pointer (adr/4)
  74.         move.l    d3,rb_NewProcTags+4    ; put into taglist
  75.  
  76.         sys    Forbid            ; forbid task switching
  77.         move.l    #rb_NewProcTags,d1    ; here are what we want
  78.         call    CreateNewProc        ; create new process
  79.         tst.l    d0
  80.         beq.s    rb_NoProcess        ; successful?
  81. rb_Exit        move.l    4.w,a6
  82.         call    Permit            ; permit task switching
  83. rb_CloseDOS    move.l    rb_DOSBase(pc),a1
  84.         call    CloseLibrary
  85.  
  86. rb_SayGoodBye    moveq    #RETURN_OK,d0        ; no errors
  87.         rts
  88. rb_Failure    moveq    #RETURN_FAIL,d0
  89.         rts
  90.  
  91. rb_NoProcess    move.l    rb_NewProcTags+4(pc),d1
  92.         call    UnLoadSeg
  93.         bra.s    rb_Exit        
  94.  
  95. ;==============================================================================
  96.  
  97. rb_KickReq    openlib    rb_DOSName
  98.         move.l    d0,rb_DOSBase
  99.         beq.s    rb_Failure        ; no dos...
  100.         move.l    d0,a6
  101.         move.l    #rb_OutWindow,d1    ; we wanna window
  102.         move.l    #MODE_NEWFILE,d2
  103.         call    Open
  104.         tst.l    d0            ; couldn't open?
  105.         beq.s    rb_CloseDOS        ; so get lost
  106.         move.l    d0,d7            ; store handle in d7
  107.         move.l    d7,d1
  108.         move.l    #rb_KickTxt,d2        ; text to display
  109.         move.l    #rb_KeyBuf-rb_KickTxt,d3
  110.         call    Write
  111.         move.l    d7,d1
  112.         move.l    #rb_KeyBuf,d2
  113.         moveq    #1,d3
  114.         call    Read            ; read any key
  115.         move.l    d7,d1
  116.         call    Close
  117.         bra.s    rb_CloseDOS        
  118.             
  119. ; do not change window's x-dimension - now text fits with topaz 9!
  120.  
  121. rb_OutWindow    dc.b    "RAW:40/40/350/60/IconSpy v1.2",0
  122. rb_KickTxt    dc.b    10,"Required at least Kickstart V37.",10,10
  123.         dc.b    "Press any key to continue... "
  124. rb_KeyBuf    dc.b    0
  125.         even
  126.         
  127. ;==============================================================================
  128.  
  129. rb_NewProcTags    dc.l    NP_Seglist,0
  130.         dc.l    NP_FreeSeglist,TRUE    ; it is *NOT* default as
  131.                         ; stated in includes!!!!!!!
  132.         dc.l    NP_StackSize,rb_StackSize
  133.         dc.l    NP_Priority,rb_TaskPri
  134.         dc.l    NP_Name,TaskName
  135.         dc.l    TAG_DONE
  136.  
  137. rb_DOSBase    dc.l    0
  138. rb_DOSName    DOSNAME
  139. rb_IntName    INTNAME
  140. TaskName    dc.b    "IconSpy v1.2 © TBR",0
  141.         even
  142.  
  143. ;==============================================================================
  144.  
  145.         SECTION    RunningBack,code
  146.  
  147. rb_RunningBack    bsr    Program            ; execute program
  148.         move.l    rb_WBMsg(pc),d7
  149.         beq.s    rb_Done
  150.         move.l    4.w,a6
  151.         call    Forbid            ; NOTE! NO Permit needed!
  152.         move.l    d7,a1            ; get old message
  153.         call    ReplyMsg        ; reply it
  154. rb_Done        moveq    #0,d0
  155.         rts
  156.  
  157. rb_WBMsg    dc.l    0
  158.         cnop    0,4
  159.  
  160. ;==============================================================================
  161. ;                 THE PROGRAM
  162. ;==============================================================================
  163.  
  164. Program        movem.l    d1-d7/a1-a6,-(sp)
  165.  
  166.         move.l    4.w,_ExecBase
  167.  
  168.         setexec
  169.         call    Forbid
  170.         lea    PortName(pc),a1
  171.         call    FindPort           ; check if we patched it already
  172.         call    Permit
  173.         tst.l    d0
  174.         bne    RunAlready
  175.  
  176.         setexec
  177.         openlib    DOSName                ; open libraries
  178.         move.l    d0,_DOSBase
  179.         beq    ExitFAIL
  180.         openlib    IconName
  181.         move.l    d0,_IconBase
  182.         beq    ExitFAIL
  183.         openlib    GfxName
  184.         move.l    d0,_GfxBase
  185.         beq    ExitFAIL
  186.  
  187. ;==============================================================================
  188.  
  189.         tst.l    rb_WBMsg        ; if there is a msg we were
  190.         bne.s    .fromwb            ; launched from WB
  191.  
  192.         setbase    DOS
  193.         move.l    #ArgsTemplate,d1
  194.         move.l    #ArgsArray,d2
  195.         cld    d3
  196.         call    ReadArgs        ; parse arguments
  197.         tst.l    d0            ; okay?
  198.         bne.s    .argsokay
  199.         call    IoErr            ; get error code
  200.         move.l    d0,d1
  201.         move.l    #ErrHead,d2        ; head (IconSpy)
  202.         call    PrintFault        ; write error msg
  203.         bra    ExitFAIL
  204. .argsokay    move.l    d0,RdArgs
  205.         bra.s    .go
  206.  
  207. .fromwb        setbase    Icon
  208.         move.l    rb_WBMsg(pc),a2
  209.         move.l    sm_ArgList(a2),a2    ; array of WBArgs
  210.         move.l    wa_Lock(a2),d1        ; lock of directory program is
  211.         call    CurrentDir,DOS        ; make it current
  212.         move.l    wa_Name(a2),a0        ; name of file
  213.         call    GetDiskObject        ; get the icon
  214.         move.l    d0,DiskObj        ; store ptr
  215.         beq.s    .go            ; no icon? then go away
  216.         move.l    d0,a0
  217.         move.l    do_ToolTypes(a0),a0    ; array of tooltypes
  218.         move.l    a0,a4            ; store it for a while
  219.         lea    WINDOW_tt(pc),a1    ; WINDOW tooltype
  220.         call    FindToolType
  221.         move.l    d0,ArgsArray        ; ptr to window spec
  222.         move.l    a4,a0            ; get tooltypes back
  223.         lea    WBENABLE_tt(pc),a1    ; WBENABLE tooltype
  224.         call    FindToolType
  225.         move.l    d0,ArgsArray+4        ; we'll use it as a boolean
  226.  
  227. ;==============================================================================
  228.  
  229. .go        tst.l    ArgsArray+4        ; WB spying enabled?
  230.         beq.s    .no_wbenable
  231.         st    WBFlag            ; set flag
  232. .no_wbenable
  233.         move.l    ArgsArray(pc),d1    ; if there was other output
  234.         bne.s    .otheroutput        ; specified - use it
  235.  
  236.         move.l    _GfxBase(pc),a0
  237.         move.l    gb_DefaultFont(a0),a0
  238.         move    tf_XSize(a0),d0
  239.         move    tf_YSize(a0),d1
  240.         mulu    #77,d0
  241.         add    #24,d0
  242.         mulu    #14,d1
  243.         add    #15,d1
  244.         lea    -4(sp),sp
  245.         movem    d0/d1,(sp)    
  246.         move.l    #OutputWin,a0        ; use the standard window
  247.         move.l    sp,a1
  248.         lea    Buf,a3
  249.         bsr    PrintF        
  250.         lea    4(sp),sp
  251.         move.l    #Buf,d1
  252. .otheroutput    move.l    #MODE_NEWFILE,d2
  253.         setbase    DOS
  254.         call    Open
  255.         move.l    d0,WinHandle        ; store the handle
  256.         beq    ExitFAIL        ; okay?
  257.          move.l    d0,d1
  258.         move.l    #InfoTxt,d2
  259.         move.l    #InfoTxt_len+HeadTxt_len,d3
  260.         call    Write            ; write info and header
  261.  
  262.         setexec
  263.         call    Forbid            ; we MUST forbid for a while
  264.         move.l    _IconBase(pc),a1
  265.         lea    _LVOGetDiskObject,a0
  266.         move.l    #GetDiskObj_Patch,d0
  267.         call    SetFunction        ; patch _LVOGetDiskObject
  268.         move.l    d0,GetDiskObj_Org+2    ; store orginal ptr
  269.         move.l    d0,GetDiskObj_Org2+2
  270.         lea    _LVOFindToolType,a0
  271.         move.l    #FindTT_Patch,d0
  272.         call    SetFunction        ; patch _LVOFindToolType
  273.         move.l    d0,FindTT_Org+2        ; store orginal ptr
  274.         move.l    d0,FindTT_Org2+2
  275.         call    CacheClearU        ; flush caches (mostly for '40)
  276.         call    Permit            ; match the forbid
  277.  
  278. ;==============================================================================
  279.  
  280.         moveq    #MP_SIZE+PortName_len,d0
  281.         move.l    #MEMF_PUBLIC!MEMF_CLEAR,d1
  282.         call    AllocMem        
  283.         move.l    d0,PortAdr
  284.         beq    .waitloop
  285.         move.l    d0,a1
  286.  
  287.         lea    MP_SIZE(a1),a2
  288.         move.l    a2,LN_NAME(a1)
  289.         move.b    #-1,LN_PRI(a1)
  290.         move.b    #NT_MSGPORT,LN_TYPE(a1)
  291.         move.b    #PA_IGNORE,MP_FLAGS(a1)
  292.         clr.b    MP_SIGBIT(a1)
  293.         clr.l    MP_SIGTASK(a1)
  294.  
  295.         lea    PortName(pc),a0
  296. .copyname    move.b    (a0)+,(a2)+
  297.         bne.s    .copyname
  298.         call    AddPort        
  299.  
  300. ;==============================================================================
  301.  
  302. .waitloop    move.l    #SIGBREAKF_CTRL_C!SIGBREAKF_CTRL_D,d0    ; C or D break
  303.         call    Wait                ; wait for signal
  304.         and.l    #SIGBREAKF_CTRL_C,d0        ; if ctrl-c was pressed
  305.         bne.s    .terminated            ; then terminate
  306.  
  307.         st    DisableFlag            ; otherwise disable it
  308.          move.l    WinHandle(pc),d1
  309.         move.l    #DisabledTxt,d2
  310.         move.l    #DisabledTxt_len,d3
  311.         call    Write,DOS            ; write "disabled" text
  312.  
  313.         move.l    #SIGBREAKF_CTRL_C!SIGBREAKF_CTRL_E,d0    ; C ot E break
  314.         call    Wait            ; wait for signal
  315.         and.l    #SIGBREAKF_CTRL_C,d0    ; if ctrl-c was pressed
  316.         bne.s    .terminated        ; then terminate
  317.  
  318.         sf    DisableFlag        ; if no, enable now
  319.          move.l    WinHandle(pc),d1
  320.         move.l    #HeadTxt,d2
  321.         move.l    #HeadTxt_len,d3
  322.         call    Write,DOS        ; write header again
  323.         bra.s    .waitloop        ; and go back
  324.  
  325. .terminated    call    Forbid            ; necessary here
  326.  
  327.         move.l    _IconBase(pc),a1    ; check for alien patches
  328.         cmp.l    #GetDiskObj_Patch,_LVOGetDiskObject+2(a1)
  329.         bne.s    .alienpatch
  330.         cmp.l    #FindTT_Patch,_LVOFindToolType+2(a1)        
  331.         bne.s    .alienpatch
  332.     
  333.         move.l    GetDiskObj_Org+2(pc),d0
  334.         lea    _LVOGetDiskObject,a0
  335.         call    SetFunction        ; restore org vector
  336.         move.l    FindTT_Org+2(pc),d0
  337.         lea    _LVOFindToolType,a0
  338.         call    SetFunction        ; as above
  339.         call    CacheClearU        ; again flush caches
  340.         call    Permit
  341.  
  342.         setbase    DOS
  343.          move.l    WinHandle(pc),d1
  344.         move.l    #TermTxt,d2
  345.         move.l    #TermTxt_len,d3
  346.         call    Write            ; write "terminated" text
  347.         moveq    #50,d1
  348.         call    Delay            ; wait 1 second
  349.         move.l    WinHandle(pc),d1
  350.         call    Close            ; and close the output
  351.  
  352.         bra    ExitOK            ; exit well
  353.  
  354. .alienpatch    call    Permit
  355.         setbase    DOS
  356.          move.l    WinHandle(pc),d1
  357.         move.l    #PatchTxt,d2
  358.         move.l    #PatchTxt_len,d3    ; tell we're patched!
  359.         call    Write
  360.          move.l    WinHandle(pc),d1
  361.         move.l    #HeadTxt,d2
  362.         move.l    #HeadTxt_len,d3
  363.         call    Write            ; write header again
  364.         setexec
  365.         bra    .waitloop        ; go back to the loop
  366.  
  367. ;==============================================================================
  368.  
  369. ExitOK        bsr.s    CleanUp
  370.         movem.l    (sp)+,d1-d7/a1-a6
  371.         moveq    #RETURN_OK,d0        ; all right
  372.         rts
  373.  
  374. ExitFAIL    bsr.s    CleanUp
  375.         openlib    IntuitionName
  376.         tst.l    d0
  377.         beq.s    .noint
  378.         move.l    d0,a6
  379.         cla    a0
  380.         call    DisplayBeep        ; flash (or beep) the screens
  381.         move.l    a6,a1
  382.         setexec
  383.         call    CloseLibrary
  384. .noint        movem.l    (sp)+,d1-d7/a1-a6
  385.         moveq    #RETURN_FAIL,d0        ; failure
  386.         rts
  387.  
  388. ;==============================================================================
  389.  
  390. CleanUp        move.l    RdArgs(pc),d1
  391.         beq.s    .noargs
  392.         setbase    DOS
  393.         call    FreeArgs        ; free the cli-args
  394. .noargs        move.l    DiskObj(pc),d0
  395.         beq.s    .nodiskobj
  396.         move.l    d0,a0
  397.         setbase    Icon
  398.         call    FreeDiskObject        ; free the icon
  399. .nodiskobj    setexec
  400.         clslib    DOS            ; close libraries
  401.         clslib    Icon
  402.         clslib    Gfx
  403.  
  404.         move.l    PortAdr(pc),d2
  405.         beq.s    .noport
  406.         move.l    d2,a1
  407.         call    RemPort
  408.         move.l    d2,a1
  409.         moveq    #MP_SIZE+PortName_len,d0
  410.         calljmp    FreeMem        
  411. .noport        rts
  412.  
  413. ;==============================================================================
  414.  
  415. RunAlready    openlib    IntuitionName
  416.         tst.l    d0
  417.         beq.s    .exit
  418.         move.l    d0,a6
  419.         cla    a0
  420.         cla    a2
  421.         cla    a3
  422.         lea    .es(pc),a1
  423.         call    EasyRequestArgs
  424.         move.l    a6,a1
  425.         setexec
  426.         call    CloseLibrary
  427. .exit        bra    ExitOK
  428.         
  429. .es        dc.l    EasyStruct_SIZEOF,0
  430.         dc.l    .title,.text,.gads
  431. .title        dc.b    "IconSpy v1.2",0
  432. .text        dc.b    "IconSpy already running",0
  433. .gads        dc.b    "Nice to know",0
  434.  
  435.  
  436. ;==============================================================================
  437. ;= PATCHES ====================================================================
  438. ;==============================================================================
  439.  
  440.  
  441. GetDiskObj_Patch
  442.         tst.b    DisableFlag        ; check if disabled
  443.         bne    GetDiskObj_Org2        ; if yes, skip all of this
  444.         movem.l    d1-a6,-(sp)
  445.         lea    -100(sp),sp        ; get some space on stack
  446.         move.l    a0,a5            ; store the name
  447.         move.l    a0,d1
  448.         setbase    DOS
  449.         call    FilePart        ; get only filepart
  450.         move.l    d0,4(sp)        ; store the filename
  451.         bsr    GetProcess        ; get process name
  452.         move.l    d0,(sp)            ; and store it
  453.         tst.b    WBFlag            ; WB trace enabled?
  454.         bne.s    .nowb
  455.         move.l    d0,a0
  456.         lea    WBTxt(pc),a1        ; name of WB task
  457.         bsr    StrCmp            ; compare names
  458.         tst.l    d0            ; was it WB?
  459.         beq.s    .nowb            ; no - go ahead
  460.         lea    100(sp),sp        ; yes, get outta here
  461.         movem.l    (sp)+,d1-a6
  462.         bra.s    GetDiskObj_Org2        
  463. .nowb        move.l    #GettingTxt,8(sp)    ; <getting icon> text ptr
  464.         setbase    Icon
  465.         move.l    a5,a0
  466. GetDiskObj_Org    jsr    $0            ; jump to kernel routine
  467.         move.l    d0,16(sp)        ; store result
  468.         bne.s    .okay
  469.         move.l    #FailTxt,12(sp)        ; tell failed
  470.         bra.s    .gotres
  471. .okay        move.l    #OkayTxt,12(sp)        ; tell okay
  472. .gotres        lea    FormatStr(pc),a0    ; the format str for RawDoFmt
  473.         lea    (sp),a1            ; datastream
  474.         lea    20(sp),a3        ; output buf
  475.         bsr    PrintF            ; format it!
  476.         setbase    DOS
  477.         move.l    WinHandle(pc),d1
  478.         lea    20(sp),a0        ; the text
  479.         move.l    a0,d2
  480.         moveq    #78,d3            ; length
  481.         call    Write
  482.         move.l    16(sp),d0        ; restore result
  483.         lea    100(sp),sp        ; restore stack
  484.         movem.l    (sp)+,d1-a6
  485.         rts
  486. GetDiskObj_Org2    jmp    $0
  487.  
  488. ;==============================================================================
  489.  
  490. FindTT_Patch    tst.b    DisableFlag        ; check if disabled
  491.         bne    FindTT_Org2        ; if yes, skip all of this
  492.         movem.l    d1-a6,-(sp)
  493.         lea    -100(sp),sp        ; get some space on stack
  494.         move.l    a0,a4            ; store ToolType array ptr
  495.         move.l    a1,a5            ; store the ToolType
  496.         move.l    a1,8(sp)
  497.         bsr    GetProcess        ; get process name
  498.         move.l    d0,(sp)
  499.         tst.b    WBFlag            ; stuff here as above :)
  500.         bne.s    .nowb
  501.         move.l    d0,a0
  502.         lea    WBTxt(pc),a1
  503.         bsr    StrCmp
  504.         tst.l    d0
  505.         beq.s    .nowb
  506.         lea    100(sp),sp
  507.         movem.l    (sp)+,d1-a6
  508.         bra.s    FindTT_Org2        
  509. .nowb        move.l    #MinusTxt,4(sp)        ; "-" string
  510.         setbase    Icon
  511.         move.l    a4,a0            ; restore args
  512.         move.l    a5,a1
  513. FindTT_Org    jsr    $0            ; jump to system
  514.         move.l    d0,16(sp)
  515.         bne.s    .okay
  516.         move.l    #NotFoundTxt,12(sp)    ; tell not found
  517.         bra.s    .gotres
  518. .okay        move.l    d0,12(sp)        ; show what we found
  519. .gotres        lea    FormatStr(pc),a0    ; blabla...
  520.         lea    (sp),a1
  521.         lea    20(sp),a3
  522.         bsr    PrintF
  523.         setbase    DOS
  524.         move.l    WinHandle(pc),d1
  525.         lea    20(sp),a0
  526.         move.l    a0,d2
  527.         moveq    #78,d3
  528.         call    Write
  529.         move.l    16(sp),d0        ; restore result
  530.         lea    100(sp),sp
  531.         movem.l    (sp)+,d1-a6
  532.         rts
  533. FindTT_Org2    jmp    $0
  534.  
  535. ;==============================================================================
  536.  
  537. GetProcess    setexec
  538.         cla    a1            ; 0 means current task
  539.         call    FindTask
  540.         move.l    d0,a0
  541.         move.l    LN_NAME(a0),d0        ; name in d0
  542.         rts
  543.  
  544.  
  545. *******************************************************************************
  546. *
  547. *                 SOME ROUTINES HERE
  548. *
  549. *******************************************************************************
  550.  
  551. *
  552. *   PrintF - formats C-styled text string (ofcoz, using RawDoFmt)
  553. *
  554. *    IN    a0: format string
  555. *        a1: args
  556. *        a3: dest buf    
  557. *    OUT    dest buf - formatted string
  558. *
  559.  
  560. PrintF        lea    .putchr(pc),a2
  561.         sys    RawDoFmt
  562.         rts
  563. .putchr        move.b    d0,(a3)+
  564.         rts
  565.  
  566. *******************************************************************************
  567.  
  568. *
  569. *    StrCpm - compares two null-terminated strings
  570. *
  571. *    IN    a0: string 1
  572. *        a1: string 2
  573. *    OUT    d0: TRUE (non-zero) if equal, FALSE (zero) otherwise
  574. *
  575.  
  576. StrCmp        move.b    (a0)+,d0
  577.         cmp.b    (a1)+,d0
  578.         bne.s    .diff
  579.         tst.b    d0
  580.         bne.s    StrCmp
  581.         moveq    #TRUE,d0
  582.         rts
  583. .diff        moveq    #FALSE,d0
  584.         rts
  585.  
  586. *******************************************************************************
  587.  
  588. ;==============================================================================
  589. ; Data Area
  590. ;==============================================================================
  591.  
  592. _ExecBase    dc.l    0
  593. _DOSBase    dc.l    0
  594. _IconBase    dc.l    0
  595. _GfxBase    dc.l    0
  596.  
  597. WinHandle    dc.l    0
  598. RdArgs        dc.l    0
  599. ArgsArray    dc.l    0,0
  600. DiskObj        dc.l    0
  601. PortAdr        dc.l    0
  602.  
  603. DisableFlag    dc.b    0
  604. WBFlag        dc.b    0
  605.  
  606. DOSName        DOSNAME
  607. IconName    ICONNAME
  608. IntuitionName    INTNAME
  609. GfxName        GRAFNAME
  610.  
  611. ;==============================================================================
  612.  
  613. PortName    dc.b    "IconSpy.rendezvous",0
  614. PortName_len    equ    *-PortName
  615.  
  616. ArgsTemplate    dc.b    "WIN=WINDOW,WBENABLE/S",0
  617. ErrHead        dc.b    "IconSpy",0
  618.  
  619. WINDOW_tt    dc.b    "WINDOW",0
  620. WBENABLE_tt    dc.b    "WBENABLE",0
  621.  
  622. OutputWin    dc.b    "CON:0/1/%d/%d/IconSpy v1.2 by Grzegorz Calkowski "
  623.         dc.b    "© 1994 The Beet Research, BEETWARE",0
  624.  
  625. OutputWin_len    equ    *-OutputWin
  626.  
  627. WBTxt        dc.b    "Workbench",0
  628.         even
  629.  
  630. ;==============================================================================
  631.  
  632. InfoTxt        dc.b    " ",10
  633.         dc.b    "Type CTRL-C to exit, CTRL-D/CTRL-E to disable/enable "
  634.         dc.b    "(Like in SnoopDos :)",10,10
  635. InfoTxt_len    =    *-InfoTxt
  636.  
  637. HeadTxt        dc.b    10,"Process          Icon         ToolType"
  638.         dc.b    "                  Result/Value",10
  639.         dc.b    "-------          ----         --------"
  640.         dc.b    "                  ------------",10
  641. HeadTxt_len    =    *-HeadTxt
  642.  
  643. PatchTxt    dc.b    10,"Someone else patched the same vectors! Can't exit.",10
  644. PatchTxt_len    =    *-PatchTxt
  645.  
  646. TermTxt        dc.b    10,"IconSpy terminated.",10
  647. TermTxt_len    =    *-TermTxt
  648.  
  649. DisabledTxt    dc.b    10,"IconSpy is now disabled (type CTRL-E to enable it).",10
  650. DisabledTxt_len    =    *-DisabledTxt
  651.  
  652. FormatStr    dc.b    "%-16.16s %-12.12s %-25.25s %-20.20s",10,0
  653. GettingTxt    dc.b    "<getting icon>",0
  654. OkayTxt        dc.b    "Okay",0
  655. FailTxt        dc.b    27,"[33mFail",27,"[31m",0
  656. NotFoundTxt    dc.b    27,"[33mNot found",27,"[31m",0
  657. MinusTxt    dc.b    "-",0
  658.  
  659.  
  660.         SECTION    blank,bss
  661.  
  662. Buf        ds.b    90
  663.  
  664.