n stack >> 1;
}

int
dup(int stack) {
	int a, res = pop(stack, &a);
	return push(push(res, a), a);
}

int
swap(int stack) {
	int a, b, res = pop(pop(stack, &a), &b);
	return push(push(res, a), b);
}

int
echo(int stack) {
	int bit;
	printf(" .. ");
	while(stack > 1)
		stack = pop(stack, &bit), printf("%d ", bit);
	printf("< \n");
	return stack;
}
</pre>

<p>The above defines the primitives of a small stack machine that utilizes a single number as memory, this strategy is at the core of the <a href='fractran