home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / boot / RipKickROM.lha / RipKickROM / RipKickROM.a < prev    next >
Text File  |  1995-11-05  |  2KB  |  46 lines

  1.     SECTION    RipKickROM,CODE
  2. *
  3.     INCLUDE    "exec/types.i"
  4.     INCLUDE    "exec/exec.i"
  5.     INCLUDE    "libraries/dos.i"
  6. *
  7.     xref    _AbsExecBase        exec.library base address
  8.     xref    _LVOOpenLibrary        exec.library    subroutine
  9.     xref    _LVOCloseLibrary    exec.library    subroutine
  10.     xref    _LVOOpen        dos.library    subroutine
  11.     xref    _LVOClose        dos.library    subroutine
  12.     xref    _LVOWrite        dos.library    subroutine
  13. *
  14.     movea.l    _AbsExecBase,a6        Move exec.library address
  15.     cmpi.l    #2,d0            Check for Entered Filename
  16.     blt.s    useit            None entered, goto useit
  17.     move.b    #0,-1(a0,d0.L)        else, overlay '0a'x with '00'x
  18.     move.l    a0,d4             and save Filename address
  19.     bra.s    OpenLib            goto OpenLib
  20. useit    lea    FName,a0        Load address of Default Filename
  21.     move.l    a0,d4             and save it
  22. OpenLib    lea    Dname,a1        Load dos.library
  23.     moveq.l    #0,d0             version 0
  24.     jsr    _LVOOpenLibrary(a6)     and open it
  25.     movea.l    d0,a6            Move dos.library address
  26.     move.l    d4,d1            Move address of Filename
  27.     move.l    #MODE_NEWFILE,d2    Mode = OUTPUT
  28.     jsr    _LVOOpen(a6)        Open file
  29.     tst.l    d0            test open
  30.     beq.s    ClosLib            Bad open, goto ClosLib
  31.     move.l    d0,d4            Save File pointer in d4
  32.     move.l    d0,d1            Move File pointer to d1
  33.     move.l    #$f80000,d2        Move KickROM address to d2
  34.     move.l    #524288,d3        Move 512K to d3
  35.     jsr    _LVOWrite(a6)        Write file
  36.     move.l    d4,d1            Move File pointer to d1
  37.     jsr    _LVOClose(a6)        Close file
  38. ClosLib    move.l    a6,a1            Load dos.library address
  39.     movea.l    _AbsExecBase,a6        Load exec.library address
  40.     jmp    _LVOCloseLibrary(a6)    Jump to CloseLibrary
  41. *                    CloseLibrary will return to System
  42. FName    dc.b    "RAM:KickStart.ROM",0
  43. Dname    dc.b    "dos.library",0
  44. Version    dc.b    "$VER: RipKickROM 2.1 (4.11.95)",0
  45.     end
  46.