PDA

View Full Version : What does this mean?



Ral-Clan
February 10th, 2017, 12:36 PM
Hi, I'm reading about the certain keyboard shortcuts and CHR$ codes on the PET computer, and found this table from "The Complete Commodore Innerspace Anthology":

(click to zoom)
36065

I understand how to what the CHR$ and "keyboard combination" columns mean and can invoke those functions that way, but what does the middle column mean "ESC/RVS"?
Obviously it has something to do with the ESC/RVS keys, but I can't figure out what the column is trying to say. It doesn't seem to be a key combination (i.e. pressing ESC/RVS then the G key, for instance, does not ring the bell sound).

Anybody know?

Thanks.

Dwight Elvey
February 11th, 2017, 09:22 AM
Did you try just typing esc as a separate letter?
Usually the esc is a sequence.
Dwight

Ral-Clan
February 11th, 2017, 09:49 AM
Did you try just typing esc as a separate letter?
Usually the esc is a sequence.
Dwight

Yes, I did. Didn't do anything.

MikeS
February 11th, 2017, 03:04 PM
Yes, I did. Didn't do anything.

Control codes and the key sequences that produce them are in the range of 0 to 31 and, in the case of the PET, the shifted equivalents (+128 ); what these codes actually mean and do has always been somewhat non-standard, ever since the days of the Teletype. The most common use is to select different parameters with printers, i.e. change fonts, spacing, TAB etc. and they are usually printer-specific.

Needless to say, the PET uses them for functions that are almost all completely non-standard, but one that has remained the same from the days when it rang a real physical bell on a Teletype to the piezo beeper in an 8032 is the BEL (Bell) code, CTL-G

Compare to an ASCII table and note decimal number 7:
https://msdn.microsoft.com/en-us/library/60ecse8t(v=vs.80).aspx

The control codes 0-31 are labelled by the corresponding letter of the alphabet, i.e. control code 7 (CHR$(7)) is CTL-G (the seventh letter of the alphabet)

Unlike most other computers most PETs do not have a CTL key; in the 4032/8032 PETs with BASIC 4 and a CRTC the equivalent of CTL is [ESC][RVS] (where [ESC] and [RVS] are the corresponding single keys). Thus, to ring the bell (CTL-G), type: ?"[ESC][RVS]G (5 keys total) and Return.

m

KC9UDX
February 11th, 2017, 10:57 PM
The key is the double-quote, and the PRINT routine.

Typing [RVS]G in direct mode gets completely ignored. Typing PRINT"[RVS]G will cause the display routine to handle a Control G (ASCII 7) character.

Now, to add to that, many PETs don't have ROM code that causes the display routine to do anything at all upon encountering a Control G.

I don't have experience with an 8032 to say what it can and can't do, but most of the PETs I do have experience with don't do anything for most of the codes in that table. In my experience, many books from that era had erroneous information about such things.

Some that I do know off the top of my head which work, are Control Q, Control S, Control heart-graphic, and Control closed-circle-graphic. Those do cursor down, cursor home, clear screen, and cursor up. Now, all of these also have a discreet key that you can press which does the same thing, but at least you can try it and see that it works.

MikeS
February 12th, 2017, 07:46 AM
The key is the double-quote, and the PRINT routine.

Typing [RVS]G in direct mode gets completely ignored. Typing PRINT"[RVS]G will cause the display routine to handle a Control G (ASCII 7) character.
Right; to enter a Control code directly from the keyboard you use the arcane key combinations in the right column, but AFAIK there isn't one for CTL-G.


Now, to add to that, many PETs don't have ROM code that causes the display routine to do anything at all upon encountering a Control G.

I don't have experience with an 8032 to say what it can and can't do, but most of the PETs I do have experience with don't do anything for most of the codes in that table. In my experience, many books from that era had erroneous information about such things.

AFAIK those codes (and a few others) only apply to the 4032/8032 with BASIC4 and later; some of the later models did in fact add a 'real' CTL key.
And of course the pre-CRTC/BASIC4 PETs don't have a beeper to beep even if they could... ;-)

sjgray
February 12th, 2017, 01:31 PM
Actually most of those codes only apply to the 8000-series. The 8000 series had an enhanced screen editor with windowing features. Those features are not available on the 4000-series.
The PET editor can be a little tricky, particularly "quote-mode". When you press the first QUOTE character you will be in quote mode, where special control characters are displayed rather than acted upon. When you press QUOTE again you will be out of quote mode. The ESC key also takes you out of quote mode.

So for example:

?"<RVS>G" will show ?"RG" ,where the R is displayed in reverse video. When you press ENTER the computer will ACT on the reverse R, enabling reverse video mode, then print a reverse G.

If you type:

?"<ESC><RVS>G" will show ?"G" , where the G is in reversed video (as will be the last quote). Pressing ENTER will cause the computer to ring the bell.

Steve