CompuServe Thread

Forum unknown · Tool Box

#ESC in Echo

15 messages in this thread
#117907From: John DraperApr 8, 1988 12:27 AM
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.
#117966From: Roger F. BeckerApr 8, 1988 9:50 AM
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.
#117995From: John DraperApr 8, 1988 1:16 PM
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.
#118005From: Roger F. BeckerApr 8, 1988 3:02 PM
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…
#118126From: John DraperApr 9, 1988 3:15 AM
As Andy has pointed out, I have steered youy wrong.. the ESC is *E
#118343From: Roger F. BeckerApr 10, 1988 2:45 PM
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.
#118343From: Roger F. BeckerApr 10, 1988 2:45 PM
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.
#118126From: John DraperApr 9, 1988 3:15 AM
As Andy has pointed out, I have steered youy wrong.. the ESC is *E
#118005From: Roger F. BeckerApr 8, 1988 3:02 PM
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…
#118050From: Andy FinkelApr 8, 1988 7:54 PM
*E is escape (*E[ is the CSI for the various ansi sequences) and *N is newline
#118129From: John DraperApr 9, 1988 3:15 AM
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>
#118129From: John DraperApr 9, 1988 3:15 AM
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>
#118050From: Andy FinkelApr 8, 1988 7:54 PM
*E is escape (*E[ is the CSI for the various ansi sequences) and *N is newline
#117995From: John DraperApr 8, 1988 1:16 PM
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.
#117966From: Roger F. BeckerApr 8, 1988 9:50 AM
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.