home *** CD-ROM | disk | FTP | other *** search
/ Beyond Sanit-E 4 / Beyond Sanit-E 4 (Disk 2 of 2).adf / !SAUCE! / part2.s < prev   
Encoding:
Text File  |  1992-09-02  |  3.9 KB  |  94 lines

  1. *****************************************************************************
  2. **  A Print to STDOUT routine thats not very amazing but will save you the **
  3. **   use of the crappy CLI type command.  In this case of the program the  **
  4. **     open shell window at the beginning of the intro is STDOUT.  This    **
  5. **       makes things easier so we don't have to open our own screens      **
  6. **        and all the bollocks involved in doing this sort of code        **
  7. **       in 68000.  Have fun and I hope this source is useful.           **
  8. **            SEE YOU IN A FUTURE POWERTEK PRODUCTION - SLADE           **
  9. *****************************************************************************
  10.  
  11. ;Written in Devpac to use System includes then written in Asm_one
  12. ;without the use of system includes.  
  13.  
  14. LINKLIB  MACRO            ; The full linklab macro as
  15.            move.l   a6,-(a7)      ; explained in the assembler tutorial.
  16.            move.l   \2,a6        ; you should know what`s going on 
  17.           jsr      \1(a6)        ; If you need and help then write to
  18.             move.l   (a7)+,a6    ; me at the normal address. (SLADE)
  19.            ENDM
  20.  
  21.  
  22. CALLSYS  MACRO
  23.      LINKLIB _LVO\1,\2
  24.            ENDM
  25.  
  26.  
  27. CR              EQU   10 ; to jump to a new line.
  28. _AbsExecBase      EQU    4 
  29. _LVOOpenLibrary   EQU -552
  30. _LVOCloseLibrary  EQU -414
  31. _LVOOutput        EQU  -60
  32. _LVOWrite         EQU  -48
  33.  
  34.  
  35. start            lea   dos_lib,a1          ;load lib name in a1
  36.                  moveq #0,d0               ;Needed version number.
  37.  
  38. Openlib          CALLSYS OpenLibrary,_AbsExecBase  ;Open lib at
  39.                  move.l  d0,_DOSBase               ;execbase!
  40.                  beq     exit                      ;DID IT OPEN?
  41.  
  42.  
  43. Dos_open         CALLSYS Output,_DOSBase    ;get handle
  44.                  move.l  d0,_stdout         ;store it
  45.                  beq     close_dos          ;check if it`s valid
  46.  
  47.  
  48. write_text       move.l  _stdout,d1        
  49.                  move.l  #TEXT,d2            ;start of TEXT
  50.                  move.l  #TEXTSIZE,d3         ;TEXT length
  51.                  CALLSYS Write,_DOSBase
  52.  
  53.  
  54.  
  55. Close_dos        move.l  _DOSBase,a1               ;Duh!!
  56.                  CALLSYS CloseLibrary,_AbsExecBase ;Close the lib
  57.  
  58.  
  59.  
  60. Exit             move     00,d0 
  61.                  rts
  62.                  
  63.  
  64. ;Constants
  65.  
  66. _DOSBase         ds.l  1
  67. _STDOUT          ds.l  1
  68. DOS_LIB          dc.b 'dos.library',0
  69.  
  70.  
  71. TEXT             
  72.     dc.b    "         _______________   __                                            ",CR
  73.     dc.b    "  z-----/ ___________  /--/ /--------------------------------------------",CR
  74.     dc.b    "  Y----/ /--__--__--/ /--/ /---__-__------__-__-__-__--------------------",CR
  75.     dc.b    "  L---/ /__/ /-/ /-/ /__/ /---/_//-//-/-//_-/_/-/-/_-/_/-----------------",CR
  76.     dc.b    "  A--/ //___/-/ /-/ // __/---/--/_//_/_//_-/-\-/-/_-/-\--P-R-E-S-E-N-T-Z-",CR
  77.     dc.b    "  X-/ /------/ /-/ /-\ \--------------------------------------------_____",CR
  78.     dc.b    "  !/_/------/_/-/_/---\_\------------------------------------------/-_ -/",CR
  79.     dc.b    "   _______ _______ __  __ _______ _______ _______                 / // / ",CR
  80.     dc.b    "   \______\\______\\_\ \_\\______\\______\\______\               / // /  ",CR
  81.     dc.b    "   / /__/ // /____ / /_/ // /  / // /  / // /  / /  __ __    __ / //_/___",CR
  82.     dc.b    "  / //_  // //___//___  // /  / // /  / // /  / / //_ /_ / //_ /________ ",CR
  83.     dc.b   " / /__/ // /____ ____/ // /__/ // /  / // /__/ / /__/__//_//_    / /     ",CR
  84.     dc.b  "/_//___//_//___//_____//______//_/  /_//_//___/                 /_/____  ",CR
  85.     dc.b  "                              _____  _____  _____  °__/_       ///       ",CR
  86.     dc.b  "    ||||||||||||||||         /      /    / /    / /  /          /         ",CR
  87.     dc.b  "   -++RELEASED++ON++-       /____  /____/ /    / /  /   ____   /------    ",CR    
  88.     dc.b  "   -++++**/**/**++++-           / /    / /    / /  /          /           ",CR
  89.     dc.b  "    ||||||||||||||||      _____/ /    / /    / /  /          /______      ",CR
  90.  
  91.  
  92. TEXTSIZE      EQU *-TEXT
  93.  
  94. VERSION:    dc.b    0,"$VER:(C) SLADE/PTK (6/3/96).  A Print-To-STDOUT Routine.",0