home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / lynxlib / unjar.s < prev    next >
Encoding:
Text File  |  1993-10-23  |  1.1 KB  |  43 lines

  1. ; This source file is part of the LynxLib miscellaneous library by
  2. ; Robert Fischer, and is Copyright 1990 by Robert Fischer.  It costs no
  3. ; money, and you may not make money off of it, but you may redistribute
  4. ; it.  It comes with ABSOLUTELY NO WARRANTY.  See the file LYNXLIB.DOC
  5. ; for more details.
  6. ; To contact the author:
  7. ;     Robert Fischer \\80 Killdeer Rd \\Hamden, CT   06517   USA
  8. ;     (203) 288-9599     fischer-robert@cs.yale.edu
  9.  
  10. ; unjar.c: Clear cookie pointer on warm boot
  11.  
  12. ; Installs a new reset handler which clears _p_cookies on warm boots,
  13. ; for TOS ROMs which don't do that themselves.  This procedure must be
  14. ; executed in Supervisor mode.  Reshand itself will run in Supervisor
  15. ; mode, too.
  16.  
  17. .include "atari.s"
  18.  
  19. RESMAGIC    equ        $31415926
  20.  
  21. _unjar::
  22.     Super
  23.     move.l    resvalid, valsave
  24.     move.l    resvector, vecsave
  25.     move.l    #reshand, resvector
  26.     move.l    #RESMAGIC, resvalid
  27.     User
  28.     rts
  29.  
  30.         .data
  31.     dc.b "XBRAUJAR"
  32.         .bss
  33. vecsave:    ds.l    1
  34.         .text
  35. reshand:        ; This gets run in supervisor mode
  36.     clr.l    p_cookies
  37.     move.l    vecsave, resvector
  38.     move.l    valsave, resvalid
  39.     jmp        (a6)
  40.  
  41.     .bss
  42. valsave:    ds.l    1
  43.