User manual

Table Of Contents
648
mikoC PRO for PIC32
MikroElektronika
Copy Code To Clipboard
#include <Setjmp.h>
jmp_buf buf; // Note: Program ow diagrams are indexed according
// to the sequence of execution
void func33(){ // 2<------------|
// |
Delay_ms(1000); // |
// |
asm nop; // |
Longjmp(buf, 2); // 3---------------->|
asm nop; // | |
// | |
} // | |
// | |
void func(){ // 1<--------| | |
// | | |
portb = 3; // | | |
if (Setjmp(buf) == 2) // 3<----------------|
portb = 1; // 4-->| | |
else // | | |
func33(); // 2------------>|
// | |
// 4<--| |
} // 5----->| |
// | |
void main() { // | |
// | |
PORTB = 0; // | |
TRISB = 0; // | |
// | |
asm nop; // | |
// | |
func(); // 1-------->|
// |
asm nop; // 5<-----|
Delay_ms(1000);
PORTB = 0xFFFF;
}