home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / tbsource.lha / TBSource / Debug / Debug.S < prev   
Text File  |  1993-12-21  |  2KB  |  85 lines

  1. *************************************************
  2. *                        *
  3. *         (C)opyright 1992        *
  4. *                        *
  5. *        by  Tomi Blinnikka        *
  6. *                        *
  7. *    Don´t try to understand the code    *
  8. *                        *
  9. * Version 0.01    27/05/1992            *
  10. *                        *
  11. * BUGS:    Version string was %&* 'd up        *
  12. *                        *
  13. * Version 0.02    04/07/1992            *
  14. *                        *
  15. * BUGS:    What ?                    *
  16. *                        *
  17. *************************************************
  18.  
  19.     INCLUDE    "JMPLibs.i"
  20.     INCLUDE    "exec/types.i"
  21.     INCLUDE    "libraries/dos.i"
  22.  
  23.     INCLUDE    "XREF:exec.xref"
  24.     INCLUDE    "XREF:dos.xref"
  25.  
  26.         section    Debug,CODE
  27.  
  28.         move.l    a0,a4
  29.         openlib    Dos,ShutDown_Out
  30.  
  31.         lea.l    AuthorText1,a0
  32.         bsr    Printer
  33.  
  34.         cmp.b    #"?",(a4)
  35.         beq    CmdLineHelp
  36.         cmp.w    #'-?',(a4)
  37.         beq    CmdLineHelp
  38.         cmp.w    #'-h',(a4)
  39.         beq    CmdLineHelp
  40.  
  41.         lea.l    EnterText1,a0
  42.         bsr    Printer
  43.  
  44.         lib    Exec,Debug
  45.  
  46.         lea.l    ReturnText1,a0
  47.         bsr    Printer
  48.         
  49. ShutDown:    closlib    Dos
  50. ShutDown_Out:    move.l    #RETURN_OK,d0
  51.         rts
  52.  
  53. CmdLineHelp:    lea.l    UsageText1,a0
  54.         bsr    Printer    
  55.         bra    ShutDown
  56.  
  57. Printer:    printa    a0
  58.         rts
  59.  
  60. ;Structures and reservations
  61.  
  62.         dc.b    "$VER: "
  63. AuthorText1:    dc.b    "Debug 0.02 (4.7.92) by Tomi Blinnikka",13,10,13,10
  64. ;        dc.b    13,10,"!!! BETA TESTER VERSION !!!",13,10,13,10,13,10
  65.         dc.b    0
  66.  
  67. UsageText1:    dc.b    "USAGE: Debug [?]",13,10,13,10
  68.         dc.b    "       Where: [?] gives this text.",13,10,13,10
  69.         dc.b    "This program makes the computer enter the debug "
  70.         dc.b    "state (ROM-wack).",13,10
  71.         dc.b    "See docs for more information.",13,10,0
  72.  
  73. EnterText1:    dc.b    "==> Entered debug state <==",13,10
  74.         dc.b    13,10,"Type 'resume' from terminal to return",13,10,0
  75. ReturnText1:    dc.b    13,10,"<== Returned from debug ==>",13,10,0
  76.  
  77.         ds.l    0
  78.  
  79. ;library stuff
  80.  
  81.         libnames
  82.  
  83.         END
  84.  
  85.