BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
riarrayslib.c File Reference
#include "blitzlib.h"

Macros

#define FILL(src)

Functions

void _fillarray (void)
 FillArray array(),value: every element of a byte, word or long array set to value.
void _fillarray2 (void)
 FillArray array(): every element of a byte, word or long array 0.
static void _libinit (void)
 init: nothing (RTS).
static void _libfinit (void)
 finit: nothing (RTS).

Macro Definition Documentation

◆ FILL

#define FILL ( src)
Value:
"move.l d0,a0\n" /* the first element */ \
" move.l -(a2),a1\n" /* the end of the array */ \
" move.w -(a2),d2\n" /* the type */ \
" cmp.l a0,a1\n" /* no element: nothing */ \
" bls.s 13f\n" \
" cmp.b #1,d2\n" /* #byte */ \
" beq.s 12f\n" \
" cmp.b #2,d2\n" /* #word */ \
" beq.s 11f\n" \
" cmpi.b #3,d2\n" /* #long */ \
" bne.s 13f\n" \
"10: move.l " src ",(a0)+\n" \
" cmp.l a0,a1\n" \
" bne.s 10b\n" \
" bra.s 13f\n" \
"11: move.w " src ",(a0)+\n" \
" cmp.l a0,a1\n" \
" bne.s 11b\n" \
" bra.s 13f\n" \
"12: move.b " src ",(a0)+\n" \
" cmp.l a0,a1\n" \
" bne.s 12b\n" \
"13:"

Function Documentation

◆ _fillarray()

void _fillarray ( void )

FillArray array(),value: every element of a byte, word or long array set to value.

Inline as FillArray array(), with the value from d1 (its low byte or word for byte and word arrays); nothing for an array without elements (Fixed (#882)). Parameters: d0 = the first element, d1 = the value; the a2 stack as above. Result: nothing.

◆ _fillarray2()

void _fillarray2 ( void )

FillArray array(): every element of a byte, word or long array 0.

Inline (Dc $a000). MOVE.l/.w/.b #0 (not CLR, which reads first on the 68000). Other types do nothing, and so does an array without elements (Fixed (#882): the original's loop stored first and compared after, so it ran on through memory). Parameters: d0 = the first element; on the a2 stack the type word and, on top, the address behind the last element (both popped). Result: nothing.

◆ _libfinit()

void _libfinit ( void )
static

finit: nothing (RTS).

◆ _libinit()

void _libinit ( void )
static

init: nothing (RTS).