Jump to content
IGNORED

Set Reverse Video On/Off


Recommended Posts

I'm using TurboBasic XL 1.5 and i want to print some text in reverse video (with ascii bit 7 high). But I can't remember in turbobasic or atari basic.

I can't remember how to do it anymore... 

I tried the memory location 694 and 764 to set reverse video on/off before a print statement in a program but doesn't seem to work.

For example I want to print a string in reverse video or a variable in reverse video.

This must be a very easy ans silly thing to solve without having to convert strings and variables to the add 128 to make them reverse video !

Thanks for any replies.

 

a$="Hello"

?a$ (in reverse)

 

a=123

?a (in reverse)

 

Edited by Eric Rousseau
Link to comment
Share on other sites

Poking 128 to 694 makes the E: device (and might be K: device) to change every keyboard typed char with the corresponding reverse video one at read. It is an input feature just like pressing the inverse video key before typing.

 

Register 764 just puts keystrokes (not ATASCII codes) in the keyboard (one at a time) to be read by E: and K: devices.

 

AFAIK, there is no escape code to toggle that output  feature like in a VT-220 terminal, you will have to print one char at a time, adding 128 as you said.

 

Link to comment
Share on other sites

The flags as such just control user input, not output to E: or S:

 

The C= computers have a code that sets Rvs Off or Rvs On but we don't.  Atari stores the characters as they'd be printed.

 

Possible solutions - a subroutine that takes a string then sets each character and prints the results (in Basic would be somewhat slow).

An assembly routine could do likewise.  Since you can pass string addresses to them, it could make it easier.

 

e.g. Z=USR(<convert routine>,ADR(A$),ADR(B$),LEN(A$))

Then the routine could walk through copying A$ to B$ and set the high bit to 1.

A more sophisticated variant might see you using an embedded character or command sequence that sets inverse to on, off or toggle existing.

Edited by Rybags
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...