[comp.sys.masscomp] your bcopy/bzero routines

Stan@soma.bcm.tmc.edu (06/20/87)

Stan,

You should tell people that they are only good for 64K worth
of moving/clearing. That can cause problems if you are using
them for more space. The move.l into d0 implies that you get all 32 bits
when in actuallity dbra only uses 16 bits worth of counter. Needless
to say, if you have a ~16bit number with a 1 in bit 16 (well, 15
if you count from 0) that the first internal short decrement that
happens as part of the dbra implementation gives you some
really wierd results......

stan

P.S.
if you do some shift-and-mask magic you can get the pointers long
aligned (hopefully) and use move.l to push the limit to 256K
per call. Or you can get really fancy and put it all in
an outer loop designed to iterate as needed.

[Thanks, Stan....I guess I get a little overzealous and don't cover
all the bases. -- sob]