VT100 library for the Micromite console

Author Message


Joined: 30/11/2020
Location: Lithuania
Posts: 27
Posted: 11:16am 22 Nov 2021      

Hi, Mixtel90 and all
I wrote simple, universal i2C scanner. (PICOMITE MMBasic Ver 5.07.00)

All works ok, text formatting, terminal clear, returning cursor to home pos etc.
The problem I have - I am hiding cursor by sending [?25l
It works as expected.
But if for example one would brake program via ctrl+C, after returning to terminal, cursor is still hidden :D and if I would EDIT program, there is no cursor of course. I see in status line indications it is moving, but there is no cursor. I can return it by pressing in terminal window setup>OK but it is still somehow going roundabouts.

Do you have any ideas, how to deal on this, as if I would send [?25h e.i show cursor it still might happen not executed before ctrl+c and on returning to editor cursor would be hidden :D  
How we could return cursor after program was interrupted? It seems to me as it would be firmware business already. But Im not too experenced in working with terminals so I might overlooked something:)