32 lines
469 B
C
32 lines
469 B
C
|
/*
|
||
|
callecho.c
|
||
|
Demo: C und Assembler verlinken
|
||
|
HS Emden/Leer | C.Koch
|
||
|
07.06.2013 initial version
|
||
|
11.12.2014 minor changes
|
||
|
*/
|
||
|
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
extern int _echo(int);
|
||
|
short a;
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
short *p;
|
||
|
|
||
|
printf(" -- C+Assembler: Echo --\n");
|
||
|
a = 0x10;
|
||
|
|
||
|
printf("Rueckgabe: 0x%04x\n", _echo(a) );
|
||
|
return 0;
|
||
|
};
|
||
|
|
||
|
|
||
|
/* Ausgabe der Symbole der Objekt-Module:
|
||
|
cko@geo:echo$readelf -s echo.o
|
||
|
cko@geo:echo$readelf -s callecho.o
|
||
|
cko@geo:echo$readelf -s callecho
|
||
|
*/
|