Shop OBEX P1 Docs P2 Docs Learn Events
FemtoBasic Clear Screen — Parallax Forums

FemtoBasic Clear Screen

HumanoidoHumanoido Posts: 5,770
edited 2009-05-04 11:03 in Propeller 1
I was looking for a CLS function to clear the screen after listing my program. Is there a trick to doing this?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-03 19:06
    The TV display driver uses $00 for a home and clear window. By default, the window is the whole screen. Look at the windowed text driver that's used for a list of the control codes. The VGA driver uses a different set of control codes, but $00 also does a Home and Clear Screen.

    DISPLAY $00 : rem Send a $00 to the display to clear the screen
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-05-03 20:33
    Thanks Mike! The tv_wtext.spin list of screen commands is very helpful.

    One thing leads to another, and while viewing the code, I see many statements involving color. Is there a color version FemtoBasic with operating manual and examples?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-03 20:48
    There's no color version because the existing versions do color. Look again at the list of screen commands. You can set the color palette of each character in the TV version to one of 16 foreground / background pairs and each line in the VGA version. In the TV version, you can change the foreground and background color of any of the 16 palettes. In the VGA version, you set the foreground / background colors for each row of the display. This is a restriction of the VGA driver used.

    The DISPLAY statement makes it easy to handle these screen command sequences.

    It's possible to change to a different display driver. I've used Chip's 1024 x 768 pixel tile-based driver for example. It takes a little work to add it because the driver doesn't include much in the way of interface routines. FemtoBasic needs things like .dec / .bin / .hex / .str and ways to position the cursor, backspace, fiddle with color, etc.

    Post Edited (Mike Green) : 5/3/2009 8:55:39 PM GMT
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-05-03 21:47
    Thanks Mike! FemtoBasic has evolved into a very powerful and useful BASIC language. I'm working on some programming examples and test routines that will include many of the features. I also started a supplement to the FemtoBasic Manual that includes your good suggestions and information.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-04 01:20
    Are you using a PAL or NTSC display?

    I did a AiGeneric mod of Femto that does color, etc but currently only works under NTSC.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-05-04 11:03
    I have moved the information about FemtoBasic Color into its own thread. Please post there. Thanks.

    Post Edited (humanoido) : 5/4/2009 11:38:40 AM GMT
Sign In or Register to comment.