[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] bug found



Hey,

  I've been searching for hours for why the arp protocol doesn't work as it's 
supposed to. And finally, I found it.  The answer is in bzero, or rather 
quickzero function in the CVS tree.

loop:
	movem.l	d1-d7/a1,(a0)		| zero the memory, 32 bytes at a time
	movem.l	d1-d7/a1,32(a0)
	movem.l	d1-d7/a1,64(a0)
	movem.l	d1-d7/a1,96(a0)
	movem.l	d1-d7/a1,128(a0)
	movem.l	d1-d7/a1,160(a0)
	movem.l	d1-d7/a1,192(a0)
	movem.l	d1-d7/a1,224(a0)
	lea	256(a0),a0
	dbra	d0,loop
	movem.l	(sp)+,d1-d7/a1		| restore regs
	rts				| and leave

  There are 8 registers used, and each register is 32bits, or 4 bytes in size.  
That makes a total of 32 bytes as stated in the first line.  But notice, the 
loading of the next effective address.  It's thinking 256 bytes at a time.

Attachment: pgpMMqpGXsBmU.pgp
Description: signature