summaryrefslogtreecommitdiff
path: root/other/wrez/tmp/str.c
blob: d822f200334680317883c45990018891702575f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include <stdio.h>

#define STRINGPTR(dst,string) \
{ \
	register unsigned char * regtmp; \
	\
	__asm__ __volatile__ ( \
		"	call	l0_%=\n\t" \
		"	.ascii	\""##string"\"\n\t" \
		"	.byte	0x00\n\t" \
		"l0_%=:	popl	%%eax\n\t" \
		: "=a" (regtmp)); \
\
	(dst) = regtmp; \
}


int
main (int argc, char *argv[])
{
	char *	foo;

	
	STRINGPTR(foo,"foobarcow");

	printf ("%s\n", foo);
}