Subversion Repositories Spectranet

[/] [trunk/] [rom/] [tnfs_vectors.asm] - Blame information for rev 442

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 399 winston
.include        "fcntl.inc"
23 442 winston
.include        "errno.inc"
24 215 winston
 
25 399 winston
.section vectors
26
sig:    defb 0xAA               ; This is a ROM module
27 409 winston
romid:  defb 0xFA               ; for a filesystem only.
28 399 winston
reset:  defw F_init             ; reset vector
29
mount:  defw F_tnfs_mount       ; The mount routine
30 215 winston
        defw 0xFFFF
31
        defw 0xFFFF
32 340 winston
        defw F_startmsg
33 215 winston
        defw 0xFFFF
34 399 winston
idstr:  defw STR_ident          ; ROM identity string
35 409 winston
        jp J_tnfs_modcall       ; MODCALL entry point
36 215 winston
 
37
; The VFS table. This is a jump table for all the VFS entry points.
38
; Only some are implemented, the rest point to a routine that returns
39
; an error.
40
        jp F_tnfs_umount        ; Unmount routine
41
        jp F_tnfs_opendir       ; Open a directory
42
        jp F_tnfs_open          ; Open a file
43
        jp F_tnfs_unlink        ; Unlink - delete a file
44
        jp F_tnfs_mkdir         ; Mkdir - Create a directory
45
        jp F_tnfs_rmdir         ; Rmdir - Delete a directory
46
        jp F_tnfs_size          ; Filesystem size
47
        jp F_tnfs_free          ; Filesystem free space
48
        jp F_tnfs_stat          ; Filesystem 'stat' info
49
        jp F_tnfs_chmod         ; Change mode (permissions)
50
        jp F_tnfs_read          ; Read a file
51
        jp F_tnfs_write         ; Write to a file
52 224 winston
        jp F_tnfs_lseek         ; Seek to a position in a file
53 215 winston
        jp F_tnfs_close         ; Close a file
54
        jp F_undef              ; Poll - not implemented
55
        jp F_tnfs_readdir       ; Read a directory entry
56
        jp F_tnfs_closedir      ; Close a directory
57
        jp F_tnfs_chdir         ; Change directory
58 279 winston
        jp F_tnfs_getcwd        ; get current directory
59 285 winston
        jp F_tnfs_rename        ; rename
60 399 winston
.data
61
STR_ident:
62
        defb "TNFS 1.00",0
63
.text
64
.globl F_tnfs_size
65
F_tnfs_size:                    ; TODO functions
66
.globl F_tnfs_free
67
F_tnfs_free:
68
.globl F_undef
69
F_undef:
70 215 winston
        ld a, ENOSYS            ; Function not implemented
71
        scf
72
        ret