Make quick ANSI formats to beautify terminal output
WebPage: bruneo32.github.io/ANSI-Project
Installation
Download ansi.h and include it in your NASM program:
It only contains macros, you can include it in C++
without extern
Documentation
Check out the documentation of the ANSI-Project for C/C++
Quick Example
In C
#include <stdio.h>
int main(int argc, char *argv[]){
printf( "Normal "
"\n\n"
);
for (int i=0; i < 256/4; i++) {
}
for (int i=0; i < 256/4; i++) {
}
for (int i=0; i < 256/4; i++) {
}
for (int i=0; i < 256/4; i++) {
}
return 0;
}
#define ANSI_HIDE
Definition: ansi.h:50
#define ANSI_BK_RGB(r, g, b)
Definition: ansi.h:148
#define ANSI_UNDER
Definition: ansi.h:46
#define ANSI_BOLD
Definition: ansi.h:43
#define ANSI_ITALIC
Definition: ansi.h:45
#define ANSI_STRIKE
Definition: ansi.h:51
#define ANSI_RESET
Definition: ansi.h:41
In C++
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
cout << "Normal "
"\n\n"
<< endl;
for (int i=0; i < 256/4; i++) {
cout << ansi::BK_RGB(i*4, i*4, i*4) << " ";
}
for (int i=0; i < 256/4; i++) {
cout << ansi::BK_RGB(i*4, 0, 0) << " ";
}
for (int i=0; i < 256/4; i++) {
cout << ansi::BK_RGB(0, i*4, 0) << " ";
}
for (int i=0; i < 256/4; i++) {
cout << ansi::BK_RGB(0, 0, i*4) << " ";
}
return 0;
}