/* * setlcd (based on LCDInfo V0.02) Displays the message passed on the * command line on an HD44780 compatible LCD display. Must be used in * conjuction with iolcd.c. * * Copyright (C) 2004 Dan Rasmussen * Based on LCDInfo by Jan Svenungson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define BASE 0x378 #include #include #include void main_loop(void); char* uptime(void); char* system_info(void); char* mem(void); char* swap(void); char* cpu(void); int main(int argc, char* argv[]) { int i; // Just a counter ioperm(BASE, 3, 1); // Get permission to the parallel port outb(0, BASE + 2); // Make sure there is power on C0 // (Only need if LCD is powered by parallel port) initialize_display(); // Initialize the display setLine1(argv[1]); return 0; } void setLine1(char *line1) { int i; char radii[] = " --> RadiI <-- "; for(i = 0; i < strlen(line1); i++) { print_character(line1[i]); } }