Using Windows HyperTerminal with Prop
Mikerocontroller
Posts: 310
· Using the BS2 object I was able to DEBUG to the Windows Hypertext Terminal.· This is a very basic question: how do I clear the window of previously printed text?· I have no experience with Hypertext and could not find any info in the help menu.· I also am not able to advance the cursor to the next row.· The CR function places the cursor back in the HOME position.· Thank you.
Post Edited (Mikerocontroller) : 1/25/2010 7:42:30 AM GMT
Post Edited (Mikerocontroller) : 1/25/2010 7:42:30 AM GMT
Comments
$0D or carriage return normally only ever returns to the left of the "carriage" or the same line. $0a is the line feed and so the correct new line sequence should always be $0d $0a.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
carriage return moves the cursor to the home position.
line feed moves it down one line
Anyway the standard way is you send both - carriage return then line feed.
I use hyperterminal and teraterm. I just tested the following and it works on both:
To clear the screen send ascii 27 then "[noparse][[/noparse]2J"
To move the cursor to the top left, ascii 27 then "[noparse][[/noparse]H"
These are standard VT100 codes. There are other codes to move the cursor round on the screen, delete lines etc.
I wrote a tiny program in CP/M Sbasic on the Dracblade to test the above. It works on both hyperterminal and teraterm:
You can write this in any language you like - but spin would be the simple choice. Some kind soul may be able to rewrite the above in Spin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
P.S. just added some comments to the code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 1/25/2010 12:28:05 PM GMT