WRFAST writes all its blocks, say M longs. Then FBLOCK writes all its data, say N longs. If M < N, all WRFAST data are overwritten (but see Note below). If M > N, first N longs of WRFAST data are overwritten.
Note. If buf1/2 are not long-aligned the last 1..3 bytes of WRFAST data are at the start of buf1/2.
Is there a way to 64 byte align a buffer in Spin2? Think not. Guess one must make the buffers 63 bytes bigger than needed and manually position the buffer address at runtime, right?
Might also be a problem for PASM2... Or, is a there an alignment keyword for that?
@Rayman said:
Is there a way to 64 byte align a buffer in Spin2? Think not. Guess one must make the buffers 63 bytes bigger than needed and manually position the buffer address at runtime, right?
Might also be a problem for PASM2... Or, is a there an alignment keyword for that?
To avoid the issues discussed here, the buffers can be at any address provided they are an integer multiple of 64 bytes apart. They don't have to be 64-byte-aligned.
Comments
WRFAST
writes all its blocks, say M longs. ThenFBLOCK
writes all its data, say N longs. If M < N, allWRFAST
data are overwritten (but see Note below). If M > N, first N longs ofWRFAST
data are overwritten.Note. If buf1/2 are not long-aligned the last 1..3 bytes of
WRFAST
data are at the start of buf1/2.Is there a way to 64 byte align a buffer in Spin2? Think not. Guess one must make the buffers 63 bytes bigger than needed and manually position the buffer address at runtime, right?
Might also be a problem for PASM2... Or, is a there an alignment keyword for that?
To avoid the issues discussed here, the buffers can be at any address provided they are an integer multiple of 64 bytes apart. They don't have to be 64-byte-aligned.
Ok, thanks. Good to know.