Subversion Repositories Spectranet

[/] [trunk/] [include/] [fcntl.inc] - Blame information for rev 442

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 215 winston
;The MIT License
2
;
3
;Copyright (c) 2009 Dylan Smith
4
;
5
;Permission is hereby granted, free of charge, to any person obtaining a copy
6
;of this software and associated documentation files (the "Software"), to deal
7
;in the Software without restriction, including without limitation the rights
8
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
;copies of the Software, and to permit persons to whom the Software is
10
;furnished to do so, subject to the following conditions:
11
;
12
;The above copyright notice and this permission notice shall be included in
13
;all copies or substantial portions of the Software.
14
;
15
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
;THE SOFTWARE.
22
 
23
; Definitions for TAP header blocks
24
TNFS_HDR_LEN            equ 21          ; 3 byte TAP + 17 bytes ZX + check byte
25
OFFSET_HDRBYTE          equ 2           ; 0x00 = header, 0xFF = data
26
OFFSET_TYPE             equ 3           ; Type ID, 0=bas, 3=code
27
OFFSET_FILENAME         equ 4           ; 10 bytes of filename
28
OFFSET_LENGTH           equ 14          ; 2 byte little endian length
29
OFFSET_PARAM1           equ 16          ; 2 byte little endian
30
OFFSET_PARAM2           equ 18          ; 2 byte little endian
31
OFFSET_CHKSUM           equ 20          ; "checksum" byte
32
ZX_HEADERLEN            equ 17          ; Length of ZX header excl. check byte
33
 
34
; File mode and flag definitions
35
O_RDONLY                equ 0x01
36
O_WRONLY                equ 0x02
37
O_RDWR                  equ 0x03
38
O_APPEND                equ 0x01
39
O_CREAT                 equ 0x02
40
O_EXCL                  equ 0x04
41
O_TRUNC                 equ 0x08
42
 
43 224 winston
; Seek definitions
44
SEEK_SET                equ 0x00
45
SEEK_CUR                equ 0x01
46
SEEK_END                equ 0x02
47