{{ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ 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 : Bellatrix-Test Chip : Regnatix Typ : Programm Version : 00 Subversion : 01 Funktion : Test für die grundlegenden Textausgabe- und Tastaturfunktionen. Komponenten : - COG's : - Logbuch : 22-03-2010-dr235 - anpassung trios Kommandoliste : Notizen : }} OBJ ios: "reg-ios" CON _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 OS_TIBLEN = 64 'größe des inputbuffers VAR 'systemvariablen byte tib[OS_TIBLEN] 'tastatur-input-buffer byte tibpos 'aktuelle position im tib PUB main | tast,i,j,n ios.start 'ios.startram 'ram-testcode ios.screeninit(string("▶Funktionstest Bellatrix-BIOS"),1) ios.printnl repeat '------------------------------------------------------------------------------------ ios.print(string("Zeichensatz:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl charset ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Hive-Logo:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printlogo(0,0) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test TAB:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat j from 3 to 7 repeat i from 0 to 7 ios.settabs(i,j*i) ios.printcls repeat 8 ios.print(string("tab")) ios.printtab ios.printnl repeat i from 1 to 5 repeat 8 ios.printdec(i) ios.printtab ios.printnl waitcnt(10_000_000+cnt) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test CLS:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printcls repeat 10 charset ios.printcls ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test eline/sline:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl j := 24 ios.printcls repeat 16 repeat 16 charset ios.printcls ios.eline(j--) i := 1 j := 24 ios.sline(1) ios.eline(23) ios.printcls repeat 8 repeat 16 charset ios.printcls ios.eline(j--) ios.sline(i++) ios.curhome ios.sline(1) ios.eline(24) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test ScrollUp:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat 10 charset repeat 20 waitcnt(10_000_000+cnt) ios.scrollup ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test ScrollDown:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat 10 charset repeat 15 waitcnt(10_000_000+cnt) ios.scrolldown repeat 16 repeat 15 waitcnt(1_000_000+cnt) ios.scrollup repeat 15 waitcnt(1_000_000+cnt) ios.scrolldown ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test SCREENINIT:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.screeninit(string("▶Funktionstest Bellatrix-BIOS [SCREENINIT OK]"),1) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test SETCOLOR:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat i from 0 to 7 'vga-tile hat 8 farbkominationen repeat j from 0 to 32 ios.setcolor(i) ios.printchar(j + 65) ios.printchar(":") ios.printdec(i) ios.printchar(":") ios.printhex(i,2) ios.printnl ios.setcolor(0) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test SETX/SETY (CURON/CUROFF):")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printcls ios.printnl ios.curoff repeat n from 1 to 50 repeat j from 1 to 5 repeat i from 1 to 8 ios.cursetx(i * 5) ios.cursety(j * 2) ios.printchar(":") ios.printdec(n) ios.cursetx(5) ios.cursety(16) ios.printchar(":") ios.printdec(j) ios.printchar(":") ios.printdec(i) ios.printchar(":") ios.printdec(n) ios.curon ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test Scrolling:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat j from 0 to 20 charset ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test CLS:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printcls ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test Tastatureingabe/Backspace (bis Enter):")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl input ios.printnl ios.printnl ios.print(string("Eingabe :")) ios.print(@tib) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test Home:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printcls repeat i from 0 to 1000 ios.curhome ios.printdec(i) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test POS1:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl repeat i from 0 to 1000 ios.curpos1 ios.printdec(i) ios.printnl ios.printnl '------------------------------------------------------------------------------------ ios.print(string("Test CURCHAR:")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop repeat i from 1 to 100 ios.curchar(i) waitcnt(2_000_000 + cnt) ios.curchar($0E) ios.printnl ios.printnl ios.print(string("Test :")) ios.printnl ios.print(string("Weiter */uit : ")) tast := ios.keywait if tast == "q" OR tast == "Q" ios.stop ios.printnl ios.printnl ios.printnl ios.printnl PUB charset | i repeat i from 14 to 255 ios.printchar(i) PUB input | charc repeat if ios.keystat > 0 'taste gedrückt? charc := ios.key 'tastencode holen if (tibpos + 1) < OS_TIBLEN 'tastaturpuffer voll? case charc ios#CHAR_BS: 'backspace if tibpos > 0 tibpos-- tib[tibpos] := $0 'letztes zeichen im puffer löschen ios.printctrl(ios#CHAR_TER_BS) 'steuerzeichen anterminal senden other: ios.bus_putchar2(charc) 'sonstige zeichen if (charc <> ios#CHAR_NL) & (charc <> ios#CHAR_BS) 'ausser sonderzeichen alles in tib if (tibpos + 1) < OS_TIBLEN 'tastaturpuffer voll? tib[tibpos++] := charc tib[tibpos] := $0 until charc == $0D 'schleife bis RETURN 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. │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ }}