Formatting for Serout
Archiver
Posts: 46,084
Jack-
The decimal value 27 represents the ASCII escape character. So you
are sending two blanks, then ESC[noparse][[/noparse]H, then ESC[noparse][[/noparse]J. The device you're
sending this too probably interprets this sequence as a control
sequence of some kind, possibly a screen erase on an ANSI terminal
(see http://216.239.53.104/search?q=cache:d-Dhh5OBiEsJ:www.sics.se/benny-bi
n/kyber/BRAGE/AMIS.DEC+amis.dec&hl=en&ie=UTF-8).
Regards,
Steve
On 19 Feb 04 at 16:10, Jack Lindsay wrote:
> I have a line of code that does some type of formatting but I do not
> understand what it is doing could anyone help me out and tell me
> where I can find a list of formatting symbols. Here is a sample line
> Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"] Thanks, Jack
The decimal value 27 represents the ASCII escape character. So you
are sending two blanks, then ESC[noparse][[/noparse]H, then ESC[noparse][[/noparse]J. The device you're
sending this too probably interprets this sequence as a control
sequence of some kind, possibly a screen erase on an ANSI terminal
(see http://216.239.53.104/search?q=cache:d-Dhh5OBiEsJ:www.sics.se/benny-bi
n/kyber/BRAGE/AMIS.DEC+amis.dec&hl=en&ie=UTF-8).
Regards,
Steve
On 19 Feb 04 at 16:10, Jack Lindsay wrote:
> I have a line of code that does some type of formatting but I do not
> understand what it is doing could anyone help me out and tell me
> where I can find a list of formatting symbols. Here is a sample line
> Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"] Thanks, Jack
Comments
understand what it is doing could anyone help me out and tell me
where I can find a list of formatting symbols. Here is a sample line
Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"]
Thanks,
Jack
>I have a line of code that does some type of formatting but I do not
>understand what it is doing could anyone help me out and tell me
>where I can find a list of formatting symbols. Here is a sample line
>Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"]
>Thanks,
>Jack
Jack -
This is just a guess, but I suspect the output device may be an ASCII CRT.
The control character in there are escape codes for display positioning. It
would be helpful to know the exact device, since not all CRT's respond to the
same escape sequences in the same manner.
Typical of what you might have there is CLS (clear screen), HOME (cursor to top
left) and CurserOn although that's not to say that's exactly what the sequence
shown actually does.
Another possibility is that the device may be a printer, although I'd bet my
money on an ASCII CRT.
Regards,
Bruce Bates
jlindsay24@y... writes:
> Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"]
> Thanks,
> Jack
>
" " sends a space
27 sends the binary equivalent of 27. If you want the number 27, write
dec 27.
The brackets in front of H and J are in error and will not tokenize.
"H" and "J" sends an ASCII H and J. Without the quotes H and J would send
72 and 74.
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
Escape sequence to the PC. Some terminals respond to these commands for
cursor positioning. The code below is valid, sending
" ", 27, "[noparse][[/noparse]H", 27, "[noparse][[/noparse]J"
at 19.2 kBaud for a BS2/BS2e/BS2pe. The code for Escape is 27.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Newzed@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WW4dop0DhY-NQvGLNYHcV3urdnqudMHSKeAs1Pusdj3K13xQ6wAQ99KHMFSfTouW_b503rd9ng]Newzed@a...[/url
Sent: Thursday, February 19, 2004 10:34 AM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Formatting for Serout
In a message dated 2/19/2004 11:25:35 AM Eastern Standard Time,
jlindsay24@y... writes:
> Serout 16,16416,[noparse][[/noparse]" ",27,"[noparse][[/noparse]H",27,"[noparse][[/noparse]J"]
> Thanks,
> Jack
>
" " sends a space
27 sends the binary equivalent of 27. If you want the number 27, write
dec 27.
The brackets in front of H and J are in error and will not tokenize.
"H" and "J" sends an ASCII H and J. Without the quotes H and J would
send 72 and 74.
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
This message has been scanned by WebShield. Please report SPAM to
abuse@p....