; This routine computes the KickCheckSum by checksumming all the
; tables associated with the KickMemPtr and KickTagPtr pointers.
; The result should is the KickCheckSum.
@a?fc0a3c
@d
@36dPoint to the KickMemPtr in ExecBase.
@36dGet the KickMemPtr and the KickTagPtr.
@36dClear both to zero in the ExecBase
@36dstructure.
@36dStart checksum at -1.
@36dStart at the old KickMemPtr.
@36dEnd of list reached?
@36dExit from loop if so.
@36dPoint to current MemList.
@36dGet pointer to next MemList.
@36dGet the number of entries in the MemList.
@36dDouble it and add 4 more longwords, to
@36dget the size (in longwords) of this list.
@36dChecksum the MemList.
@36dGo process next MemList, if any.
@36dGet the old KickTagPtr.
@36dSkip the following if none.
@36dPoint to the start of the list.
@36dStart checksumming the list.
@36dAdd a longword to the checksum.
@36dGet first data word at this node.
@36dExit if end of list reached.
@36dIf high bit clear, add the data to the
checksum and go on to the next longword.
@36dClear the high bit.
@36dUse result as pointer to next node.
@36dContinue processing the list.
@36dPut KickMemPtr/KickTagPtr back.
@d
@d
; Subroutine to checksum all the entries in a MemList.
@d
@d
@d
; The KickMemPtr points to a list of MemLists, each pointing to
; some number of chunks of memory. This routine steps through
; all the MemLists, allocating all those chunks. If any can't
; be allocated (memory already grabbed by someone else), it returns
; zero. If successful, it returns 1.
@36dStart where the KickMemPtr points.
@36dEnd of list reached?
@36dIf so, return 1 and exit.
@36dPoint to the current MemList.
@36dGet pointer to the next MemList.
@36dAdvance past the MemList header.
@36dGet number of entries in this MemList.
@36dFake "successful allocation" return code.
@36dEnter the loop.
; Allocate all the pieces of memory indicated by this MemList.
@36dGet the address of this entry.
@36dGet the size of this entry.
@36dAllocAbs()
@36dSuccessful?
@36dIf so and moreLamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!Lamer!!!