Forum unknown
· Tool Box
#ESC in Echo
15 messages in this thread
The Amiga's standard ECHO use the BCPL conventions for escape sequences.
To send, for example an <ESC>1m you would use *[1m
The *[ is the ESC character.
Thanks. Yeah, I knew it was something like that. And isn't '*n' for a
newline sequence? And there are a couple more, I think. Are many of the c
commands in 1.3 rewritten in 68K? I wonder if the BCPL conventions will be
simulated by these commands.
I really don't know abnout the other sequences. I wrote a replacement
echo command very early on, before I found out about BCPL ESC sequences,
and use that exclusively now. It allows a much nicer way of specifying the
output than using the '*' escape. The syntax is something like:
echo -ct3 This line will be at the top of the screen, in one tab, in colour
3
The 'c' is clear screen, the t is tab, and the 3 sets colour 3. You can
also set background colour, bold, italic, underline, and suppress the
linefeed. This last is handy for doing things like:
echo -n "Today's date and time is: "
date
which will put everything on one line. My echo was also 36 bytes shorter
than the BCPL equivalent. If you are at all interested in it, it's in DL
10, complete with source code.
Hmmm… been using your Echo since it's been up there. In fact, on both
Amigas in my office, I have a beautiful startup-sequence that displays all
company officers and titles using reverse video, italics, highlighting,
etc. with your Echo.
What I need now is a Q&D way of sending ESCape sequences to my printer.
Neither version, however, seems to use the redirect correctly, and drops
the ESCape from the string. So when I 'Echo > PAR: "*[*c60D"', I get
'[*c60D' on the page rather than the printer digesting the sequence.
Actually, looking at the last sentence I see something funny. My ESCape
sequence has an asterisk in it. Hmmm… perhaps I should try the
proverbial Double Asterisk trick. Yeah, yeah, there's the tick…
As Andy has pointed out, I have steered youy wrong.. the ESC is *E
Yeah, *E – that's great. Thanks.
So, what do you hear on 1.3? The preview in Amiga Sentry didn't have much
to say about the CLI environment. However, WB has gotten a nice facelift.
Yeah, *E – that's great. Thanks.
So, what do you hear on 1.3? The preview in Amiga Sentry didn't have much
to say about the CLI environment. However, WB has gotten a nice facelift.
As Andy has pointed out, I have steered youy wrong.. the ESC is *E
Hmmm… been using your Echo since it's been up there. In fact, on both
Amigas in my office, I have a beautiful startup-sequence that displays all
company officers and titles using reverse video, italics, highlighting,
etc. with your Echo.
What I need now is a Q&D way of sending ESCape sequences to my printer.
Neither version, however, seems to use the redirect correctly, and drops
the ESCape from the string. So when I 'Echo > PAR: "*[*c60D"', I get
'[*c60D' on the page rather than the printer digesting the sequence.
Actually, looking at the last sentence I see something funny. My ESCape
sequence has an asterisk in it. Hmmm… perhaps I should try the
proverbial Double Asterisk trick. Yeah, yeah, there's the tick…
*E is escape (*E[ is the CSI for the various ansi sequences)
and *N is newline
Thanks for the correction Andy. I use it very little, so I'll se that as an
excuse for slipping up on the info. <grin>
Thanks for the correction Andy. I use it very little, so I'll se that as an
excuse for slipping up on the info. <grin>
*E is escape (*E[ is the CSI for the various ansi sequences)
and *N is newline
I really don't know abnout the other sequences. I wrote a replacement
echo command very early on, before I found out about BCPL ESC sequences,
and use that exclusively now. It allows a much nicer way of specifying the
output than using the '*' escape. The syntax is something like:
echo -ct3 This line will be at the top of the screen, in one tab, in colour
3
The 'c' is clear screen, the t is tab, and the 3 sets colour 3. You can
also set background colour, bold, italic, underline, and suppress the
linefeed. This last is handy for doing things like:
echo -n "Today's date and time is: "
date
which will put everything on one line. My echo was also 36 bytes shorter
than the BCPL equivalent. If you are at all interested in it, it's in DL
10, complete with source code.
Thanks. Yeah, I knew it was something like that. And isn't '*n' for a
newline sequence? And there are a couple more, I think. Are many of the c
commands in 1.3 rewritten in 68K? I wonder if the BCPL conventions will be
simulated by these commands.