]> git.sur5r.net Git - cc65/blob - libsrc/common/_file.s
Added a C header that translates from the source file's encoding to PetSCII.
[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, 0    ; stdin
20         .byte   1, _FOPEN, 0    ; stdout
21         .byte   2, _FOPEN, 0    ; stderr
22 .repeat FOPEN_MAX - 3
23         .byte   0, _FCLOSED, 0  ; free slot
24 .endrepeat
25
26
27 ; Standard file descriptors
28
29 _stdin:
30         .word   __filetab + (STDIN_FILENO * .sizeof(_FILE))
31
32 _stdout:
33         .word   __filetab + (STDOUT_FILENO * .sizeof(_FILE))
34
35 _stderr:
36         .word   __filetab + (STDERR_FILENO * .sizeof(_FILE))
37
38