PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Simple Libraries
Display
libvgatext
libvgatext.c
1
13
#include "vgatext.h"
14
15
#define C3
16
17
int
main
(
void
)
18
{
19
int
ii = 85;
20
int
jj = 0;
21
22
vgatext
*vga;
23
24
#ifdef C3
25
vga = vgatext_open(8);
// start VGA on C3
26
DIRA |= 1<<15;
27
OUTA &= ~(1<<15);
28
#else
29
vga = vgatext_open(8);
// start VGA on PropBOE
30
#endif
31
32
writeStr(vga,
"\nzoot "
);
33
writeStr(vga,
"color"
);
34
vgatext_setXY(0,0);
35
writeStr(vga,
"Hi\n"
);
36
writeStr(vga,
"zoot"
);
37
vgatext_setCoordPosition(1,3);
38
writeStr(vga,
"abcd"
);
39
vgatext_setXY(5,5);
40
41
writeStr(vga,
"Hello World!\r"
);
42
vgatext_setY(vgatext_getY()+1);
43
writeStr(vga,
"Decimal "
);
44
writeDecDigits(vga,ii,4);
45
vgatext_setY(vgatext_getY()+1);
46
47
for
(jj = 10; jj < 24; jj++) {
48
vgatext_setColors((jj-10));
49
vgatext_setXY(jj, jj % VGA_TEXT_ROWS);
50
writeStr(vga,
"0x"
);
51
writeHexDigits(vga,ii++,2);
52
}
53
54
vgatext_setColors(VGA_TEXT_CYAN_BLUE);
55
writeLine(vga,
"\nType on the serial console."
);
56
57
do
{
58
int
ch = getChar();
59
writeChar(vga,ch);
60
}
while
(1);
61
62
return
0;
63
}
64
65
/*
66
+--------------------------------------------------------------------
67
| TERMS OF USE: MIT License
68
+--------------------------------------------------------------------
69
Permission is hereby granted, free of charge, to any person obtaining
70
a copy of this software and associated documentation files
71
(the "Software"), to deal in the Software without restriction,
72
including without limitation the rights to use, copy, modify, merge,
73
publish, distribute, sublicense, and/or sell copies of the Software,
74
and to permit persons to whom the Software is furnished to do so,
75
subject to the following conditions:
76
77
The above copyright notice and this permission notice shall be
78
included in all copies or substantial portions of the Software.
79
80
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
81
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
82
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
83
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
84
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
85
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
86
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
87
+------------------------------------------------------------------
88
*/
main
int main(void)
Definition:
GraphicsTest.c:20
text_struct
Structure that contains data used by simple text device libraries.
Definition:
simpletext.h:70
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12