Subversion Repositories Spectranet

[/] [branches/] [gnubinutils/] [include/] [spectranet.inc] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 79 winston
;The MIT License
2
;
3
;Copyright (c) 2008 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
; This file can be included in assembly language programs to give
24
; symbolic access to the public jump table entry points.
25
 
26
; Hardware page-in entry points
27 171 winston
MODULECALL      equ 0x3FF8
28 255 winston
MODULECALL_NOPAGE       equ 0x28
29 79 winston
PAGEIN          equ 0x3FF9
30
PAGEOUT         equ 0x007C
31
HLCALL          equ 0x3FFA
32
IXCALL          equ 0x3FFD
33
 
34 265 winston
; Port defines
35 330 winston
CTRLREG         equ 0x033B
36 265 winston
 
37 79 winston
; Jump table entry points
38
SOCKET          equ 0x3E00      ; Allocate a socket
39
CLOSE           equ 0x3E03      ; Close a socket
40
LISTEN          equ 0x3E06      ; Listen for incoming connections
41
ACCEPT          equ 0x3E09      ; Accept an incoming connection
42
BIND            equ 0x3E0C      ; Bind a local address to a socket
43
CONNECT         equ 0x3E0F      ; Connect to a remote host
44
SEND            equ 0x3E12      ; Send data
45
RECV            equ 0x3E15      ; Receive data
46
SENDTO          equ 0x3E18      ; Send data to an address
47
RECVFROM        equ 0x3E1B      ; Receive data from an address
48
POLL            equ 0x3E1E      ; Poll a list of sockets
49
POLLALL         equ 0x3E21      ; Poll all open sockets
50
POLLFD          equ 0x3E24      ; Poll a single socket
51
GETHOSTBYNAME   equ 0x3E27      ; Look up a hostname
52
PUTCHAR42       equ 0x3E2A      ; 42 column print write a character
53
PRINT42         equ 0x3E2D      ; 42 column print a null terminated string
54
CLEAR42         equ 0x3E30      ; Clear the screen and reset 42-col print
55
SETPAGEA        equ 0x3E33      ; Sets page area A
56
SETPAGEB        equ 0x3E36      ; Sets page area B
57
LONG2IPSTRING   equ 0x3E39      ; Convert a 4 byte big endian long to an IP
58
IPSTRING2LONG   equ 0x3E3C      ; Convert an IP to a 4 byte big endian long
59
ITOA8           equ 0x3E3F      ; Convert a byte to ascii
60
RAND16          equ 0x3E42      ; 16 bit PRNG
61 81 winston
REMOTEADDRESS   equ 0x3E45      ; Fill struct sockaddr_in
62 93 winston
IFCONFIG_INET   equ 0x3E48      ; Set IPv4 address
63
IFCONFIG_NETMASK equ 0x3E4B     ; Set netmask
64
IFCONFIG_GW     equ 0x3E4E      ; Set gateway
65
SETHWADDR       equ 0x3E51      ; Set the MAC address
66
GETHWADDR       equ 0x3E54      ; Read the MAC address
67
DECONFIG        equ 0x3E57      ; Deconfigure inet, netmask and gateway
68 94 winston
MAC2STRING      equ 0x3E5A      ; Convert 6 byte MAC address to a string
69
STRING2MAC      equ 0x3E5D      ; Convert a hex string to a 6 byte MAC address
70
ITOH8           equ 0x3E60      ; Convert accumulator to hex string
71
HTOI8           equ 0x3E63      ; Convert hex string to byte in A
72
GETKEY          equ 0x3E66      ; Get a key from the keyboard, and put it in A
73
KEYUP           equ 0x3E69      ; Wait for key release
74
INPUTSTRING     equ 0x3E6C      ; Read a string into buffer at DE
75 114 winston
GET_IFCONFIG_INET equ 0x3E6F    ; Gets the current IPv4 address
76
GET_IFCONFIG_NETMASK equ 0x3E72 ; Gets the current netmask
77
GET_IFCONFIG_GW equ 0x3E75      ; Gets the current gateway address
78 126 winston
SETTRAP         equ 0x3E78      ; Sets the programmable trap
79
DISABLETRAP     equ 0x3E7B      ; Disables the programmable trap
80
ENABLETRAP      equ 0x3E7E      ; Enables the programmable trap
81
PUSHPAGEA       equ 0x3E81      ; Pages a page into area A, pushing the old one
82
POPPAGEA        equ 0x3E84      ; Restores the previous page in area A
83
PUSHPAGEB       equ 0x3E87      ; Pages into area B pushing the old one
84
POPPAGEB        equ 0x3E8A      ; Restores the previous page in area B
85 128 winston
PAGETRAPRETURN  equ 0x3E8D      ; Returns from a trap to page area B
86
TRAPRETURN      equ 0x3E90      ; Returns from a trap that didn't page area B
87 132 winston
ADDBASICEXT     equ 0x3E93      ; Adds a BASIC command
88
STATEMENT_END   equ 0x3E96      ; Check for statement end, exit at syntax time
89
EXIT_SUCCESS    equ 0x3E99      ; Use this to exit successfully after cmd
90 150 winston
PARSE_ERROR     equ 0x3E9C      ; Use this to exit to BASIC with a parse error
91 177 winston
RESERVEPAGE     equ 0x3E9F      ; Reserve a page of static RAM
92
FREEPAGE        equ 0x3EA2      ; Free a page of static RAM
93 200 winston
REPORTERR       equ 0x3EA5      ; report an error via BASIC
94 79 winston
 
95 211 winston
; Filesystem functions
96
MOUNT           equ 0x3EA8
97
UMOUNT          equ 0x3EAB
98
OPENDIR         equ 0x3EAE
99
OPEN            equ 0x3EB1
100
UNLINK          equ 0x3EB4
101
MKDIR           equ 0x3EB7
102
RMDIR           equ 0x3EBA
103
SIZE            equ 0x3EBD
104
FREE            equ 0x3EC0
105
STAT            equ 0x3EC3
106
CHMOD           equ 0x3EC6
107
READ            equ 0x3EC9
108
WRITE           equ 0x3ECC
109
LSEEK           equ 0x3ECF
110
VCLOSE          equ 0x3ED2
111
VPOLL           equ 0x3ED5
112
READDIR         equ 0x3ED8
113
CLOSEDIR        equ 0x3EDB
114 212 winston
CHDIR           equ 0x3EDE
115 279 winston
GETCWD          equ 0x3EE1
116 285 winston
RENAME          equ 0x3EE4
117
SETMOUNTPOINT   equ 0x3EE7
118
FREEMOUNTPOINT  equ 0x3EEA
119
RESALLOC        equ 0x3EED
120 211 winston
 
121 285 winston
 
122 126 winston
; Definitions
123 285 winston
ALLOCFD         equ 1
124
FREEFD          equ 0
125
ALLOCDIRHND     equ 3
126
FREEDIRHND      equ 2
127
 
128 307 winston
; POLL status bits
129
BIT_RECV        equ 2
130
BIT_DISCON      equ 1
131
BIT_CONN        equ 0
132