Shop OBEX P1 Docs P2 Docs Learn Events
How to set the X and Y posotions using VGA_Text? — Parallax Forums

How to set the X and Y posotions using VGA_Text?

CameronMCameronM Posts: 57
edited 2010-08-04 02:24 in Propeller 1
Hi, could somebody tell me how to set the X and Y positions using VGA_Text. I am sure it is easy but i cannot figure out how to set them, i have tried different ways and obviously i did not succeed.
smile.gif

Thankyou,

CameronM

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2010-08-04 01:36
    Something like this should do (untested due to lack of VGA monitor):

    vga.out($A)   ' set X (X follows)
    vga.out(12)   ' X
    vga.out($B)   ' set Y (Y follows)
    vga.out(10)   ' Y
    
  • CameronMCameronM Posts: 57
    edited 2010-08-04 01:48
    Yes that worked thank you for your help.
  • kuronekokuroneko Posts: 3,623
    edited 2010-08-04 02:24
    For the record, the comment in the out method of the VGA_text object:

    PUB out(c) | i, k
    
    '' Output a character
    ''
    ''     $00 = clear screen
    ''     $01 = home
    ''     $08 = backspace
    ''     $09 = tab (8 spaces per)
    ''     $0A = set X position (X follows)
    ''     $0B = set Y position (Y follows)
    ''     $0C = set color (color follows)
    ''     $0D = return
    ''  others = printable characters
    
    
Sign In or Register to comment.