View Full Version : serout ctr z

08-06-2005, 08:11 PM
can someone pls tell me how to send the keystroke CTR Z from the bs2 serout

08-06-2005, 08:32 PM
You can not serout a combination keystroke.· Combination keystrokes can only be recognized by your PC.· You could send a "Z", and then tell the Stamp to perform the appropriate action when the "Z" is received.

Sid Weaver
Do you have a Stamp Tester yet?


Bruce Bates
08-06-2005, 08:49 PM
Kenobe -

I can only presume that this is going to be used to emulate a CTL Z from some other device. Which device would ordinarily be sending it, a PC AT keyboard? What device will be receiving the character string, something attached to an MS-DOS port?

What you produce as a character string will very much depend on what kind of device you're emulating. A VT-100 terminal will produce one set of codes, a PC AT keyboard will produce another, and a Wyse 50 terminal will produce yet onther. See the problem you're faced with.

In almost all case I can think of, you will be sending more than one character to emulate it, and in some case you may be sending up to 4 characters, if both MAKE and BREAK keypresses are required by the receiving device, or the software decoding it.


Bruce Bates

08-06-2005, 09:52 PM
ASCII 26 is control Z or in other words binary 0011010 or two char code 94 ,122
94 being control, followed by 122 the char z.

SEROUT pin,baud,[26]
SEROUT pin,baud,[94]
SEROUT pin,baud,[122]

Post Edited (Short) : 8/6/2005 3:06:13 PM GMT

08-07-2005, 09:57 AM

Thanks for your advise.

Actually I am sending commands to a modem.

from hyper terminal, looks like this

type "at+pst"· followed by keystroke CTR Z.

I want to send this command from the bs2, I try asckii 26 but dont work.


08-07-2005, 12:31 PM
·Might have to also send CR

08-08-2005, 09:41 PM
Are you sure what you're seeing as CTR isn't actually the ASCII escape character?· I'd suggest you do some more research on modem strings, especially for the modem you have...

08-09-2005, 12:18 AM
A CTRL-Z ascii is CHR(26). That's probably what the modem wants as its 'return to command mode' escape character.

08-09-2005, 01:34 AM
Allan, shouldn't that be CHR$(26)?


08-09-2005, 02:54 AM
Sure, in Visual Basic. In Turbo Pascal, the other is correct.

In PBasic, it would be:

SEROUT 16, I9600, [26]

08-09-2005, 10:41 AM
I am very appreciatetive of all your suggestions and helps,

I tried

serout 8,I9600,[26]

It did not work

However, the CTR Z works fine in the Hyper Terminal.

I am trying to send to the Itegno modem.

08-09-2005, 10:44 AM
Sorry, it is

appreciative. not appreciatetive

08-09-2005, 06:49 PM
Well, somewhere you need to have:

I9600 CON 16384 ' Or, whatever the Inverted, 9600 baud modifier is for your BS2.

08-10-2005, 08:06 AM
I started this wrong I think it is $26 HEX not DECIMAL 26