TriOS-alt/system/regnatix/sysconf.spin

142 lines
11 KiB
Plaintext
Raw Normal View History

2010-04-16 00:25:58 +02:00
<EFBFBD><EFBFBD>{{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Autor: Ingo Kripahle %
% Copyright (c) 2010 Ingo Kripahle %
% See end of file for terms of use. %
% Die Nutzungsbedingungen befinden sich am Ende der Datei %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Informationen : hive-project.de
Kontakt : drohne235@googlemail.com
System : TriOS
Name : sysconf
Chip : Regnatix
Typ : Programm
Version :
Subversion :
Funktion : Kommandozeilentool f<00>r TriOS-Systemeinstellungen
Komponenten : -
COG's : -
Logbuch :
Kommandoliste :
Notizen :
}}
OBJ
ios: "ios"
CON
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
VAR
byte parastr[64]
PUB main
ios.start 'ios initialisieren
ios.parastart 'parameter<00>bergabe starten
repeat while ios.paranext(@parastr) 'parameter einlesen
if byte[@parastr][0] == "/" 'option?
case byte[@parastr][1]
"?": ios.print(@help1) '/?
"p": printConf
"h": setHSS '/h - hss
"w": setWAV '/w - wav
"s": setSYS '/s - systemkl<00>nge
ios.stop
PRI setHSS
if ios.paranext(@parastr) 'parameter?
case byte[@parastr][0]
"0": ios.admsetsound(0)
ios.print(@msg4)
ios.print(@msg2)
"1": ios.admsetsound(1)
ios.print(@msg4)
ios.print(@msg1)
else
printErr(@err1)
PRI setWAV
if ios.paranext(@parastr) 'parameter?
case byte[@parastr][0]
"0": ios.admsetsound(2)
ios.print(@msg5)
ios.print(@msg2)
"1": ios.admsetsound(3)
ios.print(@msg5)
ios.print(@msg1)
else
printErr(@err1)
PRI setSYS
if ios.paranext(@parastr) 'parameter?
case byte[@parastr][0]
"0": ios.admsetsyssnd(0)
ios.print(@msg7)
ios.print(@msg2)
"1": ios.admsetsyssnd(1)
ios.print(@msg7)
ios.print(@msg1)
else
printErr(@err1)
PRI printConf
ios.printnl
ios.print(@msg3)
case ios.admgetsndsys
0: ios.print(@msg6)
1: ios.print(@msg4)
2: ios.print(@msg5)
ios.printnl
PRI printErr(stradr)
ios.print(@err0)
ios.print(stradr)
ios.print(@help1)
DAT
msg1 byte "EIN ", 0
msg2 byte "AUS ", 0
msg3 byte "Soundsystem : ",0
msg4 byte "HSS-Engine ",0
msg5 byte "WAV-Engine ",0
msg6 byte "Soundsystem deaktiviert ",0
msg7 byte "Systemkl<00>nge ",0
err0 byte 13,"Fehler : "
err1 byte "Zu wenig Parameter!",13,0
help1 file "sysconf.txt"
byte 13,0
DAT
{{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}}