Subversion Repositories Spectranet

[/] [trunk/] [rom/] [tnfs_vectors.asm] - Diff between revs 285 and 288

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 285 Rev 288
;The MIT License
;The MIT License
;
;
;Copyright (c) 2009 Dylan Smith
;Copyright (c) 2009 Dylan Smith
;
;
;Permission is hereby granted, free of charge, to any person obtaining a copy
;Permission is hereby granted, free of charge, to any person obtaining a copy
;of this software and associated documentation files (the "Software"), to deal
;of this software and associated documentation files (the "Software"), to deal
;in the Software without restriction, including without limitation the rights
;in the Software without restriction, including without limitation the rights
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;copies of the Software, and to permit persons to whom the Software is
;copies of the Software, and to permit persons to whom the Software is
;furnished to do so, subject to the following conditions:
;furnished to do so, subject to the following conditions:
;
;
;The above copyright notice and this permission notice shall be included in
;The above copyright notice and this permission notice shall be included in
;all copies or substantial portions of the Software.
;all copies or substantial portions of the Software.
;
;
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;THE SOFTWARE.
;THE SOFTWARE.
sig     defb 0xAA               ; This is a ROM module
sig     defb 0xAA               ; This is a ROM module
romid   defb 0xFE               ; for a filesystem only.
romid   defb 0xFF               ; for a filesystem only.
reset   defw F_init             ; reset vector
reset   defw F_init             ; reset vector
mount   defw F_tnfs_mount       ; The mount routine
mount   defw F_tnfs_mount       ; The mount routine
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
        defw 0xFFFF
idstr   defw STR_ident          ; ROM identity string
idstr   defw STR_ident          ; ROM identity string
modcall jp F_modcall            ; No modcall code
modcall jp F_modcall            ; No modcall code
; The VFS table. This is a jump table for all the VFS entry points.
; The VFS table. This is a jump table for all the VFS entry points.
; Only some are implemented, the rest point to a routine that returns
; Only some are implemented, the rest point to a routine that returns
; an error.
; an error.
        jp F_tnfs_umount        ; Unmount routine
        jp F_tnfs_umount        ; Unmount routine
        jp F_tnfs_opendir       ; Open a directory
        jp F_tnfs_opendir       ; Open a directory
        jp F_tnfs_open          ; Open a file
        jp F_tnfs_open          ; Open a file
        jp F_tnfs_unlink        ; Unlink - delete a file
        jp F_tnfs_unlink        ; Unlink - delete a file
        jp F_tnfs_mkdir         ; Mkdir - Create a directory
        jp F_tnfs_mkdir         ; Mkdir - Create a directory
        jp F_tnfs_rmdir         ; Rmdir - Delete a directory
        jp F_tnfs_rmdir         ; Rmdir - Delete a directory
        jp F_tnfs_size          ; Filesystem size
        jp F_tnfs_size          ; Filesystem size
        jp F_tnfs_free          ; Filesystem free space
        jp F_tnfs_free          ; Filesystem free space
        jp F_tnfs_stat          ; Filesystem 'stat' info
        jp F_tnfs_stat          ; Filesystem 'stat' info
        jp F_tnfs_chmod         ; Change mode (permissions)
        jp F_tnfs_chmod         ; Change mode (permissions)
        jp F_tnfs_read          ; Read a file
        jp F_tnfs_read          ; Read a file
        jp F_tnfs_write         ; Write to a file
        jp F_tnfs_write         ; Write to a file
        jp F_tnfs_lseek         ; Seek to a position in a file
        jp F_tnfs_lseek         ; Seek to a position in a file
        jp F_tnfs_close         ; Close a file
        jp F_tnfs_close         ; Close a file
        jp F_undef              ; Poll - not implemented
        jp F_undef              ; Poll - not implemented
        jp F_tnfs_readdir       ; Read a directory entry
        jp F_tnfs_readdir       ; Read a directory entry
        jp F_tnfs_closedir      ; Close a directory
        jp F_tnfs_closedir      ; Close a directory
        jp F_tnfs_chdir         ; Change directory
        jp F_tnfs_chdir         ; Change directory
        jp F_tnfs_getcwd        ; get current directory
        jp F_tnfs_getcwd        ; get current directory
        jp F_tnfs_rename        ; rename
        jp F_tnfs_rename        ; rename
STR_ident
STR_ident
        defb "TNFS 1.0",0
        defb "TNFS 1.0",0
F_tnfs_size                     ; TODO functions
F_tnfs_size                     ; TODO functions
F_tnfs_free
F_tnfs_free
F_undef
F_undef
        ld a, ENOSYS            ; Function not implemented
        ld a, ENOSYS            ; Function not implemented
        scf
        scf
        ret
        ret