ansi.c
Code:
#include <stdio.h>
/* Note - using two character <CSI> ESC[. Hex 9B could be used instead */
#define RESETCON "\033c"
#define CURSOFF "\033[0 p"
#define CURSON "\033[ p"
#define DELCHAR "\033[P"
/* SGR (set graphic rendition) */
#define COLOR02 "\033[32m"
#define COLOR03 "\033[33m"
#define ITALICS "\033[3m"
#define BOLD "\033[1m"
#define UNDERLINE "\033[4m"
#define NORMAL "\033[0m"
int main(int argc, char *argv[])
{
printf(BOLD "This is bold text!\n" NORMAL);
return 0;
}
compile with
Code:
m68k-amigaos-gcc -Os -s -noixemul -o ansi ansi.c
works for me.