Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Labview Code Interface Reference Manual.pdf
Скачиваний:
33
Добавлен:
29.05.2015
Размер:
1.13 Mб
Скачать

Chapter 4 External Subroutines

Compiling the Calling Code

Macintosh

THINK C Compiler

The THINK C project must have an extra file called glue.c which specifies each external subroutine. The reference to the external subroutine sum should have an entry as follows in the glue.c file:

long gLVSBsum = 'LVSB';

void sum(void);

void sum(void) {

asm {

move.l gLVSBsum, a0

jmp (a0)

}

}

This is the entire text of the glue.c file.

CodeWarrior 68K Compiler

The CodeWarrior project must have an extra file called glue.c, which specifies each external subroutine. Each reference to the external subroutine sum should have an entry as follows in the glue.c file:

long gLVSBsum = 'LVSB';

void sum(void);

asm void sum(void){

move.l gLVSBsum, a0

jmp (a0)

}

This is the entire text of the glue.c file.

MPW Compiler

As described in the Calling Code section of this chapter, when you compile a CIN that references an external subroutine, you use the same makefile as described in the Steps for Creating a CIN section of the Chapter 1, CIN Overview, with the addition of a directive that identifies the subroutines that this CIN uses. Following are the contents of the

LabVIEW Code Interface Reference Manual

4-12

© National Instruments Corporation

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]