OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [testbench/] [local_global.c] - Blame information for rev 1770

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 224 markom
/* Test local and global variables */
2
#include "support.h"
3
 
4
int global = 5;
5
 
6
int func (unsigned long a, char b) {
7
  global = 2;
8
  a = 3 + a;
9
  b = 4 + b;
10
  return a + b;
11
}
12
 
13
int main () {
14
  int local = 7;
15
  global += func (local, 14);
16 309 markom
  report (global ^ 0xdeaddead ^ 30);
17 224 markom
  return 0;
18
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.