File: io.c

package info (click to toggle)
avr-libc 1%3A1.2.3-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,816 kB
  • ctags: 14,018
  • sloc: ansic: 17,998; asm: 5,024; sh: 2,778; makefile: 712; pascal: 441
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 !!
*/