File: io.c

package info (click to toggle)
avr-libc 20020203-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,448 kB
  • ctags: 6,562
  • sloc: ansic: 7,631; asm: 4,424; sh: 2,703; makefile: 338; pascal: 289
file content (24 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <io.h>
/*
  return low byte of stack pointer
*/

void set_low_sp (unsigned char a)
{
  outp (a, SPL);
}

int foo ()
{
  return inp ( SPL );
}

int 
main ()
{
  set_low_sp (254);
  return foo ();
}
/*
  inp (arg) - arg must be constant !!
*/