Jump to content
IGNORED

Clear screen command


Trooper

Recommended Posts

Press Escape, then shift and the Clear key (the shifted version of the less-than symbol). It'll print kind of an inverse video bent arrow that points up and to the left. If you don't press Escape first, it'll clear the screen when you type it.

 

You could also print CHR$(125) in a BASIC program.

Link to comment
Share on other sites

No, #16

 

BASIC disallows "0" on the GET/PUT statements. Not sure why, since it allows INPUT #0 and PRINT #0.

But, it performs an AND on the parameter you supply, so 16 gets converted to 0 and it lets it through.

 

#6 isn't always open. Try ?#6 on a fresh BASIC screen, you get an error. But, type GR.0 then ?#6 and the device will work.

Link to comment
Share on other sites

Should be ? "<esc><clr>"; actually (semi-colon).

 

A handy trick: normally BASIC doesn't let you do GET/PUT etc to device 0 (which "E:" normally uses).

To get around that, use #16.

 

So, a printer-friendly CLS command would be

 

PUT #16,125

 

Neat little trick!

 

There is another little trick that was once in INSIGHT: Atari that is related.

To get rid of the "?" prompt that results from an INPUT, use INPUT #16, XYZ.

 

Evidently works the same way, and although I've remembered and used this many times, I never understood its roots.

 

-Larry

Link to comment
Share on other sites

Forgot to mention that one. Discovered it some time ago too.

 

Likely that BASIC just outputs the ? if the device # is zero. You'd not want it to happen, for example if you had a concurrent I/O file open to disk, so they would have put that simple check in place.

Edited by Rybags
Link to comment
Share on other sites

One minor gotcha regarding I/O with channel #16: if you plan to compile your program with the Turbo BASIC XL compiler, don't use this trick. It'll work in interpreted Turbo BASIC, and the compiler won't complain about it... but the runtime will stop the compiled program with an error message (in German, can't remember what it says) when it gets to the INPUT #16.

Link to comment
Share on other sites

One minor gotcha regarding I/O with channel #16: if you plan to compile your program with the Turbo BASIC XL compiler, don't use this trick. It'll work in interpreted Turbo BASIC, and the compiler won't complain about it... but the runtime will stop the compiled program with an error message (in German, can't remember what it says) when it gets to the INPUT #16.

 

Yes, and ditto ABC, although I can't remember whether it gives an error message or not.

 

We are so fortunate to have such a nice selection of languages for our 8-bits!

 

-Larry

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...