File: test-bda.c

package info (click to toggle)
faucc 20180503-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 1,452 kB
  • sloc: ansic: 38,797; yacc: 1,602; xml: 519; lex: 378; sh: 178; makefile: 125
file content (20 lines) | stat: -rw-r--r-- 277 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * $Id: test-bda.c,v 1.2 2012/02/15 11:13:08 vrsieh Exp $
 */

struct bda {
	short x;
	char y;
	int z;
} __attribute__((__packed__));

int
test(void)
{
	struct bda *BDA = (struct bda *) 0x00000400;

	BDA->x = 0;
	BDA->y = 1;
	BDA->z = 2;
	return BDA->x + BDA->y + BDA->z;
}