spinix-hive/vga512/sysdefs.spin

113 lines
3.7 KiB
Plaintext
Raw Normal View History

'******************************************************************************
' Copyright (c) 2011, 2012, Dave Hein
' See end of file for terms of use.
'******************************************************************************
CON
'start = $7e50 ' Extra space for the stand-alone loader
start = $7c00 ' Extra space for the stand-alone loader
' SD CLIB data
rendezvous = $7e50
' Exported variables
environ_vars = $7e50
environ_vars_end = $7ed3
' Argv parameter area
argv_parms = $7ed4
' Additional system parameters
return_value = $7f94
vga_cog = $7f98
vga_handle = $7f9c
sd_pins = $7fa0
config = $7fa4
shell_sector = $7fa8
' System time
unixtime = $7fac
cycle0 = $7fb0
timezone = $7fb4
{
' I2C Driver
i2c_cog = $7fb8
i2c_cmd = $7fbc
i2c_parm = $7fc0
' Kernel data
filelock = $7fc4
filecmd = $7fc8
fileparm = $7fcc
}
'Shell variables
scriptline = $7fb8
ifflag = $7fbc
whileflag = $7fc0
shell_size = $7fc4
shell_level = $7fc8
bootflag = $7fcc
'File I/O
spi_engine_cog = $7fd0
spi_command = $7fd4
spi_block_index = $7fd8
spi_buffer_address = $7fdc
' Basic CLIB data
' Serial data
serial = $7fe0
stdio = $7fe4
stdin = $7fe8
stdout = $7fec
' Malloc data
memlocknum = $7ff0
memfreelist = $7ff4
malloclist = $7ff8
laststackaddr = $7ffc
' Stack check word
checkword = $dead1eaf
' Process types
proc_type_spin = 1
proc_type_pasm = 2
proc_type_capp = 3
proc_type_driver = $80
' Run modes
run_shell_wait = $00
run_shell_nowait = $08
run_kill_caller = $10
run_at_address0 = $20
run_c_program = $40
run_spin_program = $80
run_stand_alone = $100
PUB main
return
{{
+-----------------------------------------------------------------------------+
| TERMS OF USE: MIT License |
+-----------------------------------------------------------------------------+
|Permission is hereby granted, free of charge, to any person obtaining a copy |
|of this software and associated documentation files (the "Software"), to deal|
|in the Software without restriction, including without limitation the rights |
|to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|copies of the Software, and to permit persons to whom the Software is |
|furnished to do so, subject to the following conditions: |
| |
|The above copyright notice and this permission notice shall be included in |
|all copies or substantial portions of the Software. |
| |
|THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|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 THE|
|SOFTWARE. |
+-----------------------------------------------------------------------------+
}}