Source file: /~heha/Mikrocontroller/Displays/34358-02/34358-02.zip/anz.cpp

#include <stdio.h>
#include "../inpout32/inpout32.h"

const int base=0x3BC;

void ready() {
 do Sleep(1);
 while (!(Inp32(base+1)&0x20));
}

void reset() {
 ready();
 Out32(base+2,0);
 ready();
 Out32(base+2,6);
}

void outchar(char c) {
 ready();
 Out32(base+0,c);
 Out32(base+2,7);
 Out32(base+2,6);
}

void outstr(const char*s) {
 if (s) while(*s) outchar(*s++);
}

void mainCRTStartup() {
 reset();
 outstr("Hallo, hier ist das\r\n20-Spalten-Display.");
#if 0
 char c=5;
 char s[64];
 for(;;){
  gets(s);
  if (*s) break;
  sprintf(s,"%02X=%c;",(BYTE)c,c);
  fputs(s,stdout);
  outstr(s);
  c++;
 }
#endif
}
Detected encoding: ASCII (7 bit)2