char buffer[100];
...
void foo(void)
{
__semihost(0x01, (const void *)buf); // equivalent in thumb state to
// int __svc(0xAB) my_svc(int, int *);
// result = my_svc(0x1, &buffer);
}
Compiling this code with the option --thumb generates:
||foo|| PROC
...
LDR r1,|L1.12|
MOVS r0,#1
SVC #0xab
...
|L1.12|
...
buffer
% 400