home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / asmprogs / addkickmem / addkickmem.asm < prev    next >
Assembly Source File  |  1987-10-25  |  1KB  |  42 lines

  1. ; AddKickMem
  2. ; Copyright 1987 by Glen McDiarmid
  3. ; Use and distribute freely
  4.  
  5. ; I may be contacted at:-
  6. ; Glen McDiarmid
  7. ; 28 Marginson Street,
  8. ; Ipswich, Queensland
  9. ; Australia  4305
  10.  
  11. ; (07) 812-2963
  12.  
  13.  
  14. _LVOForbid    equ   -$84
  15. _LVOAddHead   equ   -$f0
  16. _LVOPermit    equ   -$8a
  17. _LVOAllocMem  equ   -$c6
  18. startaddress  set   $f80000     ;Place new start address here
  19. endaddress    set   $fbffff     ;Place new end address here
  20.  
  21. startaddress  set   startaddress&$fffffff8
  22. endaddress    set   endaddress&$fffffff8
  23. length        set   endaddress-startaddress-$20
  24.  
  25.     movea.l   4,A6
  26.     movea.l   #startaddress,a2
  27.     clr.l     $20(a2)
  28.     move.l    #length,$24(a2)
  29.     move.b    #$0A,$8(a2)
  30.     move.w    #5,$e(a2)
  31.     move.l    #startaddress,$14(a2)
  32.     move.l    #endaddress,$18(a2)
  33.     move.l    #startaddress+$20,$10(a2)
  34.     move.l    #length,$1c(a2)
  35.     jsr       _LVOForbid(a6)
  36.     lea.l     $142(a6),a0
  37.     move.l    #startaddress,a1
  38.     jsr       _LVOAddHead(a6)
  39.     jsr       _LVOPermit(a6)
  40.     eor.l     d0,d0
  41.     rts
  42. ; Sorry about the lack of comments - I prefer informative labels