Coder Social home page Coder Social logo

hansi_parser's Introduction

Hobby ANSI Parser

An ANSI Parser for hobbyist OS!

Making your own kernel? Want to get those legendary '\033[1;31m'? Hobby ANSI Parser is here to help you!

Read src/hansi_parser.h to implement the dependencies required for HANSIP.

Supported ANSI escape sequences

  • Color codes

Color code sequences always end with m

\033[arg1;arg2;arg3m

Where arg1, arg2, arg3 are the color codes to set.

To set foreground color value use codes ranging from 30-37.

Eg. \033[37m would set color foreground color to White.

To set background color value, use codes ranging from 40-47.

Eg. `\033[40m to set background color to Black.

Use 1 to make text bold. Eg. \033[1m

Use 0 to restore default attributes. Eg. \033[0m

Using all arguments at once - \033[1;37;40m would set foreground to white with bold, background to black

  • Cursor codes

Cursor Codes sequences end with H

\033[x;yH

Where x and y are the values for the cursor to place on screen.

Eg. \033[30H would set cursor to 30 on X-axis on same Y-axis value.

The first argument is always X-axis value and second is Y-axis value.

A more advanced example would be - \033[37;50H

hansi_parser's People

Contributors

acidicneko avatar

Stargazers

Vanesa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.