• ANSI C-code

    From Beery@80:774/27 to All on Thu Jan 18 07:23:31 2018
    I thought this may be as good an area as any of the other Retronet groups.

    Is anyone aware of any c-source code for displaying ANSI files?

    I am looking to add ANSI support to a terminal emulator and would prefer not
    to have to re-invent the wheel. My terminal emulator code is not c-source, however I have a c compiler for it so I could hook the code in into the assembly code. And, if that did not work, I would at least have the
    logic/flow without having to stumble through all the nuances.

    Thanks.

    Beery

    --Beery Miller -- 9640 News BBS -- 9640news.ddns.net:9640 --

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/64)
    * Origin: 9640 News BBS (80:774/27)
  • From tenser@80:774/22 to Beery on Thu Jan 18 19:57:25 2018
    On 01/18/18, Beery said the following...

    I thought this may be as good an area as any of the other Retronet
    groups.
    Is anyone aware of any c-source code for displaying ANSI files?

    Funny, I read this and my thought was about the ANSI C standard.

    I am looking to add ANSI support to a terminal emulator and would prefer not to have to re-invent the wheel. My terminal emulator code is not c-source, however I have a c compiler for it so I could hook the code in into the assembly code. And, if that did not work, I would at least
    have the logic/flow without having to stumble through all the nuances.

    Thanks.

    I'm still not quite clear on what you're trying to solve. You have a
    graphical application that emulates a terminal and you want to add
    support for ANSI escape sequences? I'd look at something like xterm.
    Or you are using something like xterm and want to do something else,
    in which case I'm not sure why the terminal emulator program isn't
    already doing this. Or you want to write a text-oriented program that
    uses cursor addressing using ANSI escape sequences? In that case, I'd
    look at a library like ncurses.

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/32)
    * Origin: ACiD Telnet HQ / blackflag.acid.org (80:774/22)
  • From Beery@80:774/27 to tenser on Thu Jan 18 21:56:49 2018
    I am looking to add ANSI support to a terminal emulator and would pre not to have to re-invent the wheel. My terminal emulator code is not

    I'm still not quite clear on what you're trying to solve. You have a graphical application that emulates a terminal and you want to add

    Here's the deal. The computer I am seeking c-source code for the ANSI escape sequences is a non-Windows system. It was made back in the 80's, and there
    are presently only two terminal emulators out there with that capability for this computer. There are other features I would like to add to this program
    I am using besides ANSI support.

    I've got a terminal emulator and source code that does non-ANSI ascii mode.
    It can do VT-52, but that is about it.

    If I had c-source code for the sequences, I could compile it to run under TMS 9900 assembly code. I was hoping to avoid writing the code from scratch.

    Beery

    --Beery Miller -- 9640 News BBS -- 9640news.ddns.net:9640 --

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/64)
    * Origin: 9640 News BBS (80:774/27)
  • From tenser@80:774/22 to Beery on Thu Jan 18 22:50:21 2018
    On 01/18/18, Beery said the following...

    I'm still not quite clear on what you're trying to solve. You have a graphical application that emulates a terminal and you want to add

    Here's the deal. The computer I am seeking c-source code for the ANSI escape sequences is a non-Windows system. It was made back in the 80's, and there are presently only two terminal emulators out there with that capability for this computer. There are other features I would like to add to this program I am using besides ANSI support.

    What computer are we talking about? And what dialect of C would you be compiling for it? Clearly not C11; I imagine you have a subset of K&R C compiler, like SDCC or something?

    I've got a terminal emulator and source code that does non-ANSI ascii mode. It can do VT-52, but that is about it.

    BBS people tend to get confused by what these things mean. ASCII is a
    character set; nothing more. ANSI terminal escape sequences are mostly
    based on the VT100 but added colors. Most BBSes from the DOS era that
    use 'ANSI-art' are using those escape sequences along with non-ASCII
    characters from the IBM CP437 code page that was used on the IBM PC.

    From what you described, it sounds like you've got a terminal emulator
    for this computer that can process ASCII text with VT52 escape sequences,
    and you'd like to write some C code that you can call from assembler to
    extend this to process ANSI escape sequences (which, being somewhat
    similar to VT100 sequences are rather richer than VT52). For that, I
    guess I'd look at something like 'SyncTerm', which understands ANSI
    escape sequences.

    However, that doesn't help you with CP437. You'll need the glyphs from
    the code page along with some mechanism to display them.

    If I had c-source code for the sequences, I could compile it to run
    under TMS 9900 assembly code. I was hoping to avoid writing the code
    from scratch.

    Sure. Check out SyncTerm, xterm, rxvt, or the 'vt.c' program from plan9.
    Is this for a TI-99? Some sources indicate there exist other terminal
    emulators that understand ANSI escape sequences:

    http://atariage.com/forums/topic/260477-concise-list-of-terminal-emulator-progr ms/

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/32)
    * Origin: ACiD Telnet HQ / blackflag.acid.org (80:774/22)
  • From Beery@80:774/27 to tenser on Fri Jan 19 06:11:42 2018
    I am talking about the TI-99/4A and the Geneve 9640 computers. They are compatible with the TMS 9900/9995 processors.

    There is a K&R compiler. Do not know the subset.

    If I have some c source, I should be able to work with it.

    Beery

    --Beery Miller -- 9640 News BBS -- 9640news.ddns.net:9640 --

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/64)
    * Origin: 9640 News BBS (80:774/27)
  • From tenser@80:774/22 to Beery on Fri Jan 19 11:21:00 2018
    On 01/19/18, Beery said the following...

    I am talking about the TI-99/4A and the Geneve 9640 computers. They are compatible with the TMS 9900/9995 processors.

    There is a K&R compiler. Do not know the subset.

    If I have some c source, I should be able to work with it.

    Ok. K&R is itself a subset; the question is whether your compiler will
    support things like struct's or returning structs from functions (older
    K&R compilers won't do that, nor will compilers for some very small
    machines).

    Like I said, check out the source code for SyncTerm and for xterm. Both
    should be readily discoverable from your favorite search engine.

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/32)
    * Origin: ACiD Telnet HQ / blackflag.acid.org (80:774/22)
  • From Beery@80:774/27 to tenser on Fri Jan 19 15:33:40 2018
    OK, Thanks. Grabbing the syncterm source right now.

    Beery

    --Beery Miller -- 9640 News BBS -- 9640news.ddns.net:9640 --

    --- Mystic BBS v1.12 A38 2018/01/01 (Windows/64)
    * Origin: 9640 News BBS (80:774/27)
  • From codewar65@80:774/20 to tenser on Tue Jul 30 00:20:48 2019
    I process incoming data one byte at a time and run it through an ANSI parsing state machine. State 0 is default (not in an ESC sequence) and just processes the character (control are executed, characters are displayed, ESC sets the state to 1). State 1 means you recieved an ESC and now you look for a [ to get
    into a CSI state where you are collecting parameter bytes, or other characters
    to setup an other state (OSC, Simple ESC stuff). And so on.

    If I hit a breaking character (bad parameter or intermediate or final character), I output the character, abort the sequence, and reset the state to 0.


    --- ENiGMA 1/2 v0.0.10-alpha (linux; x64; 10.13.0)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (80:774/20)