113 lines
5.2 KiB
Plaintext
113 lines
5.2 KiB
Plaintext
{{
|
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
│ 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 :
|
|
Chip : Regnatix
|
|
Typ : Programm
|
|
Version :
|
|
Subversion :
|
|
Funktion :
|
|
Komponenten : -
|
|
COG's : -
|
|
Logbuch :
|
|
Kommandoliste :
|
|
Notizen :
|
|
|
|
}}
|
|
|
|
OBJ
|
|
ios: "reg-ios"
|
|
|
|
CON
|
|
|
|
_CLKMODE = XTAL1 + PLL16X
|
|
_XINFREQ = 5_000_000
|
|
|
|
PUB main | p1,p2,p3,a0,a1,a2,a3
|
|
|
|
ios.start
|
|
ios.plxHalt
|
|
|
|
ios.curoff
|
|
ios.printcls
|
|
repeat
|
|
ios.curhome
|
|
ios.printnl
|
|
p1 := ios.plxIn($20)
|
|
p2 := ios.plxIn($21)
|
|
p3 := ios.plxIn($22)
|
|
a0 := ios.plxch($48,0)
|
|
a1 := ios.plxch($48,1)
|
|
a2 := ios.plxch($48,2)
|
|
a3 := ios.plxch($48,3)
|
|
print_port(1,p1)
|
|
print_port(2,p2)
|
|
print_port(3,p3)
|
|
ios.printnl
|
|
print_chan(0,a0)
|
|
print_chan(1,a1)
|
|
print_chan(2,a2)
|
|
print_chan(3,a3)
|
|
ios.plxout($3A,!(cnt>>23))
|
|
until ios.key
|
|
ios.stop
|
|
|
|
PRI print_chan(cnr,wert)
|
|
|
|
ios.print(string("A/D "))
|
|
ios.printdec(cnr)
|
|
ios.printchar(" ")
|
|
ios.printhex(wert,2)
|
|
ios.printchar(" ")
|
|
ios.printchar("[")
|
|
repeat wert>>3
|
|
ios.printqchar("‣")
|
|
repeat (255-wert)>>3
|
|
ios.printqchar(" ")
|
|
ios.printchar("]")
|
|
ios.printnl
|
|
|
|
PRI print_port(pnr,wert)
|
|
|
|
ios.print(string("Port "))
|
|
ios.printdec(pnr)
|
|
ios.printchar(" ")
|
|
|
|
repeat 8
|
|
if wert & 1
|
|
ios.printqchar("‣")
|
|
else
|
|
ios.printqchar(" ")
|
|
wert := wert >> 1
|
|
ios.printnl
|
|
|
|
|
|
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. │
|
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
}}
|