Subversion Repositories Spectranet

[/] [branches/] [gnubinutils/] [rom/] [jumptable.asm] - Diff between revs 371 and 384

Show entire file | Details | Blame | View Log

Rev 371 Rev 384
Line 18... Line 18...
;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.
 
 
        include "rom.sym"
 
        org 0x1F00
 
 
 
; The jump table
; The jump table
; --------------
; --------------
;
;
; The convention to call a ROM library function is to do the following:
; The convention to call a ROM library function is to do the following:
;
;
Line 49... Line 46...
; a little slower, so while this entry point works fine - if hl isn't
; a little slower, so while this entry point works fine - if hl isn't
; needed as a parameter it's best to use 0x3FFF.
; needed as a parameter it's best to use 0x3FFF.
;
;
; This jump table is copied to 0x3E00 on reset (the fixed upper 4k page,
; This jump table is copied to 0x3E00 on reset (the fixed upper 4k page,
; which is RAM).
; which is RAM).
 
 
 
; until copied to RAM this is just data.
 
.include        "page0.xinc"
 
.data
 
.globl X_JUMPTABLE
 
X_JUMPTABLE:
        jp F_socket
        jp F_socket
        jp F_sockclose
        jp F_sockclose
        jp F_listen
        jp F_listen
        jp F_accept
        jp F_accept
        jp F_bind
        jp F_bind
Line 134... Line 137...
        call F_vfs_dispatch     ; getcwd
        call F_vfs_dispatch     ; getcwd
        call F_vfs_dispatch     ; rename
        call F_vfs_dispatch     ; rename
        jp F_setmountpoint      ; Set the current mount point in use
        jp F_setmountpoint      ; Set the current mount point in use
        jp F_freemountpoint     ; Free a mount point
        jp F_freemountpoint     ; Free a mount point
        jp F_resalloc           ; Allocate/free directory and file handles
        jp F_resalloc           ; Allocate/free directory and file handles
 
.globl X_JUMPTABLE_SIZE
 
X_JUMPTABLE_SIZE:       equ $-X_JUMPTABLE
 
        defb 0xff,0xff,0xff,0xff        ; 8 padding bytes
 
        defb 0xff,0xff,0xff,0xff
 
 
 
.globl X_UPPER_ENTRYPT
        block 0x1FF8-$,0xFF
X_UPPER_ENTRYPT:
; The upper entry point.
; The upper entry point.
; CALL instructions to 0x3FF8 and higher cause a ROM page-in. A small
; CALL instructions to 0x3FF8 and higher cause a ROM page-in. A small
; amount of code can live here to dispatch these calls elsewhere.
; amount of code can live here to dispatch these calls elsewhere.
        rst 0x30        ; ROM module dispatcher
        rst 0x30        ; ROM module dispatcher
        ret             ; A way of paging in without using an OUT
        ret             ; A way of paging in without using an OUT
        jp J_hldispatch ; HLCALL - 0x3FFA
        jp J_hldispatch ; HLCALL - 0x3FFA
        jp J_ixdispatch ; IXCALL - 0x3FFD
        jp J_ixdispatch ; IXCALL - 0x3FFD
 
.globl X_UPPER_ENTRYPT_SIZE
 
X_UPPER_ENTRYPT_SIZE:   equ $-X_UPPER_ENTRYPT