sleevetrick 0 Newbie Poster

hey every1.

i have a pretty silly problem.. i dont quite know how to display a text from FPGA cHIP to a monitor..

u can take a look at this code if its of any help...

#define PAL_TARGET_CLOCK_RATE PAL_PREFERRED_VIDEO_CLOCK_RATE
#include "pal_master.hch"
#include "pal_console.hch"
#include "pal_keyboard.hch"
#include <stdlib.hch>

/*
 * Forward declarations
 */
static macro proc RunDumbTerminal (ConsolePtr, RS232Port);
static macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;

/*
 * Main program
 */
void main (void)
{
    macro expr RS232Port = PalRS232PortCT (0);
//    PalKeyboard *KeyboardPtr;
    PalConsole *ConsolePtr;
    
    /*
     * Check we've got everything we need
     */
    PalVersionRequire   (1, 0);
    PalVideoOutRequire  (1);
//  PalPS2PortRequire   (2);
    PalRS232PortRequire (1);
    
    /*
     * Run
     */
    par
    {
        PalConsoleRun (&ConsolePtr, PAL_CONSOLE_FONT_NORMAL, PalVideoOutOptimalCT (ClockRate), ClockRate);
//      PalKeyboardRun (&KeyboardPtr, PalPS2PortCT (1), ClockRate);
        PalDataPortRun (RS232Port, ClockRate);

        seq
        {
            par
            {
                PalConsoleEnable (ConsolePtr);
//              PalKeyboardEnable (KeyboardPtr);
                PalDataPortEnable (RS232Port);
            }
            RunDumbTerminal (ConsolePtr, RS232Port);
        }
    }
}

/* Do some simple console tests */
static macro proc RunDumbTerminal (ConsolePtr, RS232Port)
{
unsigned 8 Char;
Char =1;
    par
    {
        /*
         * Keyboard -> Serial
         */
        do
        {
			Char = Char + 1;
//          PalKeyboardReadASCII (KeyboardPtr, &Char);
			PalConsolePutUInt(ConsolePtr, adju(Char, 32));
            PalDataPortWrite (RS232Port, Char);
        }
        while (Char < 100);

        /*
         * Serial -> Console
         */
/*       do
        {
            PalDataPortRead (RS232Port, &Char);
            PalConsolePutUInt (ConsolePtr, adju(Char, 32));
			PalConsolePutChar (ConsolePtr, ' ');
        }
        while (1);
*/
    }
}

<< moderator edit: fixed code tags: [code][/code] >>

MANY THANKS IN ADVANCE!