]> git.sur5r.net Git - cc65/blob - libsrc/common/_file.s
Use stdio.inc
[cc65] / libsrc / common / _file.s
1 ;
2 ; Ullrich von Bassewitz, 31.05.1998
3 ;
4 ; Data for the stdio file stream.
5 ;
6
7         .export         __filetab
8                                  
9         .include        "stdio.inc"
10         .include        "fcntl.inc"
11         .include        "_file.inc"
12
13 ;----------------------------------------------------------------------------
14 ; File data
15
16 .data
17
18 __filetab:
19         .byte   0, _FOPEN       ; stdin
20         .byte   1, _FOPEN       ; stdout
21         .byte   2, _FOPEN       ; stderr
22 .repeat FOPEN_MAX - 3
23         .byte   0, _FCLOSED     ; free slot
24 .endrepeat
25
26
27 ; Standard file descriptors
28
29 _stdin:
30         .word   __filetab + (STDIN_FILENO * _FILE_size)
31
32 _stdout:
33         .word   __filetab + (STDOUT_FILENO * _FILE_size)
34
35 _stderr:
36         .word   __filetab + (STDERR_FILENO * _FILE_size)
37
38