diff --git a/IOX/conio.c b/IOX/conio.c index 501aba6..42fcf14 100644 --- a/IOX/conio.c +++ b/IOX/conio.c @@ -5,6 +5,13 @@ int conid = 0x01; +char * strinv(char str[]) { + for(i = 0; i < strlen(str); i++){ + str[i] = inv(str[i]); + } + return str; +} + void conprint(char str[], int x, int y, int mode){ con = (Console*)redbus; rb_map_device(conid); diff --git a/IOX/conio.h b/IOX/conio.h index 87ecec4..19d02c1 100644 --- a/IOX/conio.h +++ b/IOX/conio.h @@ -2,4 +2,5 @@ int i; int line; int str_size; Console* con; +char * strinv(char str[]); void conprint(char str[], int x, int y, int mode); \ No newline at end of file diff --git a/IOX/test_iox.c b/IOX/test_iox.c index 8a995cf..2027ea1 100644 --- a/IOX/test_iox.c +++ b/IOX/test_iox.c @@ -10,6 +10,7 @@ #define redbus 0x0300 #define IOXID 0x03 + Iox* expand; int* output; @@ -20,5 +21,5 @@ void main() { rb_map_device(IOXID); expand->out = 0; output = (int*)expand->in; - conprint("very Nice", 40, 25, 3); + conprint(strinv("Huzzah, inverted text!"), 0, 0, 3); } \ No newline at end of file