Shop OBEX P1 Docs P2 Docs Learn Events
A simple question about using VGA_Text to position a display — Parallax Forums

A simple question about using VGA_Text to position a display

ElectricAyeElectricAye Posts: 4,561
edited 2009-05-12 01:12 in Propeller 1
Hi all,

I'm experimenting with VGA_Text and I would like to know how to position text on the VGA screen.· Inside of VGA_Text, there's a cryptic comment on how to establish the X position as follows:

$0A = set X position (X follows)

So how do I use that in my main code?· What the heck does "X follows" mean?· Are there supposed to be two lines of code in the main program, the first that uses $0A and then... then what?· I've made a few dozen guesses on what this might mean, but nothing has worked.· I've attached a copy of VGA_Text for anyone who might know how to work this kind of magic.

thanks,
Markeyes.gif


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.

Comments

  • tpw_mantpw_man Posts: 276
    edited 2009-05-12 00:53
    You would send a string to the VGA driver, which then interprets the commands. 'X follows' means that you send the desired X position after the $0A byte.
    'Method 1
    vga.str(string($0A, <xpos>)) 'does not work with variables
    'Method 2
    vga.out($0A) 'send command character
    vga.out(xpos) 'send x position
    
    



    Hope that helps!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-05-12 01:12
    tpw_man,

    HEY!· Thanks!· That actually works!· Out of the 30 things I tried, I never thought of that one.

    "Mein furer, I can walk!"

    Mark

    smile.gifsmile.gifsmile.gif
Sign In or Register to comment.