Jump to content
  • 0
geek504

Control Characters: TAB and BELL

Question

I've been scratching my head on these new control characters, more specifically TAB ($09) and BELL ($7). How does one use it in a PRINT CHR$() command? I even tried "activating" by enabling CHARSET ISO ON/OFF ($F).

I am trying to figure out the "tab" or "," or actually print 10 spaces in my PRINT function or I need to make use of the KERNAL PLOT routine.

Quote

New Control Characters

This is the set of all supported PETSCII control characters. Descriptions in bold indicate new codes compared to the C64:

Code     Code
$00 NULL - $80
$01 SWAP COLORS COLOR: ORANGE $81
$02 - $82    
$03 STOP/RUN $83    
$04 ATTRIBUTES: UNDERLINE HELP $84
$05 COLOR: WHITE F1 $85
$06 ATTRIBUTES: BOLD F3 $86
$07 BELL F5 $87
$08 BACKSPACE F7 $88
$09 TAB F2 $89
$0A LF F4 $8A
$0B ATTRIBUTES: ITALICS F6 $8B
$0C ATTRIBUTES: OUTLINE F8 $8C
$0D REGULAR/SHIFTED RETURN $8D    
$0E CHARSET: LOWER/UPPER CASE $8E    
$0F CHARSET: ISO ON/OFF $8F  

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I believe these special codes are just meant for printing strings with the "CHAR" command (and GRAPH_put_char in assembly) in screen 128 mode.  Looking in the kernal source, in kernal/fonts/conio1.s, it looks like those two particular character codes haven't been implemented yet.  Bell just maps to nop, and tab maps to a routine that just has the comment "; XXX what should TAB do?" and returns.

Edit: Looking at the documentation again, it has this note in it:

$07/$08/$09/$0A/$18: have been added for ASCII compatibility [NYI]

I believe "NYI" means "not yet implemented".

Edited by Ender

Share this post


Link to post
Share on other sites
  • 0
27 minutes ago, Ender said:

I believe "NYI" means "not yet implemented".

Thanks for looking at the code @Ender. A speaker beep shouldn't be too hard to do 😉

I suppose a TAB should be every 8 position (Apple BASIC)... or 10 (C64) as the "," do in the PRINT statement.

Edited by geek504

Share this post


Link to post
Share on other sites
  • 0

Most mechanical typewriters have a 'margin bell' that sounds a few characters before the end of a line. This way, when you type 'blind', you know when it is time to finish the current word and then do a carriage return and line feed (using a lever) to start the next line.

On CBM4016/4032/8032 PETs with BASIC 4.0, the chr$(7) BELL sound uses the built-in piezo beeper to emulate this sound (somewhere around position 70 or so).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use