2 Replies Latest reply on Feb 23, 2019 2:01 AM by BoTa_264741

    A simple VT100 Escape Sequence Emulator

    MoTa_728816

      Once upon a time, when "mouse" meant a rodent.

       

      A computer was not something to carry in a bag, and I was in love with my HP2626 terminal.

      If you wanted to put a letter at arbitrary location on the screen, which was only 80 letter x 24(or 25) lines though, we had to use something called "Escape Sequence"

       

      And thanks for the pre-standard era, we often needed to peek a file called "termcap" in the /etc.

      Among the plenty of dialects of "Escape Sequences", the one from the DEC called "VT100" seems to be the survivor.

      And even in this 21st century, not a few terminal programs are supporting archaic VT100 Escape Sequence!

       

      Anyway, time to hack!

       

      This is my implementation of V100 Escape Sequence.

       

      Note: As usually I set my TeraTerm background to White,  the default foreground was set to Black.

      If you are using Black for the background, you need to set the foreground to White.

      To do so, in the main.c comment line which does not fit your need and uncomment line which fits

       

      int default_foreground = VT100_BLACK ; // if your terminal's background is white

      // int default_foreground = VT100_WHITE ; // if your terminal's background is black

       

      When built and started the program will show

      001-Splash.JPG

       

      Then a few basic math graphics will be displayed

      002-y-x.JPG

      003-y-x-x.JPG

      004-y-x-x-x.JPG

      005-y-circle.JPG

       

      Followed by a simple screen layout demo with colors.

      006-fairlytale.JPG

       

      moto