Programming can be fun!

Let me first start by explaining the above links.
Freebasic: On this site you can download a program
called freebasic. It is a programing language
similar to (but more powerfull than) q-basic. However
you can still write q-basic programs in freebasic! Or you
can download a shareware version of q-basic from this link:
  • Shareware Qbasic
  • Note: The above Qbasic link ONLY WORKS ON OLD COMPUTERS!
    USE FREEBASIC IF YOU HAVE A NEWER COMPUTER!!!!!!!!!!!!!!
    You can use freebasic or qbasic to compile any programs
    found on the qbasic website, BUT you can only use freebasic
    to make freebasic programs! The qbasic link is a very good
    rescource for finding already made qbasic programs that you
    can bend to your evil will ;) we will be doing alot of that.
    Cellphone Programming:This can be done on android phones with
    either x11 or rfo-basic! I prefer rfo-basic however.
    GPS programming: TomToms and other linux os devices can potentially
    be programed with x11 basic. Or gps can be programmed on gps
    enabled cellphones with either x11 or rfo-basic!

    Get Your Hacking Tools

    To start programming simply download
    qbasic, freebasic, and x11 basic for your computer
    (or you can just choose one)
    Just click the links above and follow
    their download instructions.
    To program apps for your phone
    google search the x11 or rfo-basic!
    websites and download the apps
    from your phone. To program a TomTom
    download x11 to your pc and move
    the program to your device using a data cable.
    Simply follow the instructions for each program
    that each link explains on their home site.

    CellPhone Programming

    We are going to start this tutorial with some basics in rfo-basic!
    This site can be veiwed in your mobile browser and the program you need
    can be downloaded here:
  • Cellphone programming

  • Choose the newest version!Now that you have downloaded that,
    we can start. The obligatory "hello world" program:
    Find basic! in your apps and RUN it.REM start of basic! program
    should appear.Hit enter or ok to start writing on the next line.
    Type everything you see (but not including) between code:and code end.
    code: print "hello world" code end. Now click menu THEN
    more THEN format. Now menu THEN RUN THEN save (name it helloworld.bas)
    THEN ok. It will say hello world when RUN. Your first program ran!
    Ok, that was pretty boring. lets spice it up a lil' bit. Hit the back
    arrow THEN GOTO the next line after the "hello world" line. Type this
    code: TTS.INIT code end. Now skip to the next line and
    type this code: TTS.SPEAK "I said hello, fool!" code end.
    Now hit the menu button THEN more THEN format THEN menu THEN RUN THEN save
    THEN ok. IF everything went ok THEN it should have talked to
    you! Still bored to tears? Ok, lets add a POPUP. From now on I will be
    replacing THEN with ">". Hit the back arrow > GOTO a new line and
    type code: POPUP "WAKE UP!", 50, 50, 4 code end.
    Now FORMAT it and RUN. If you are bored, too bad. 'cuz now we will
    dissect what we have learned. PRINT PRINTs a message on screen,
    TTS.INIT wakes up the text to SPEAK, TTS.SPEAK says what you type
    and POPUP makes a popup appear for four seconds at the x, y, coordinates
    you tell it to (50, 50).

    More Beginner Programs

    Ok, now you know how to type, FORMAT, and RUN program so i will now
    just give examples of easy code and i will post any explanations you
    need either after a REM statement or after a % 0r ! sign.
    REM do-until repeats until 0 (so forever)
    REM ceil rounds to the next whole number
    REM rnd *5 picks 5 random numbers between 1 and 5
    code:
    
    DO
     LET x=CEIL(RND()*5)
    
     IF x=2.0
      PRINT "0010"
     ELSE
      IF x=1.0
       PRINT "0001"
      ELSE
       IF x=3.0
        PRINT "0011"
       ELSE
        IF x=4.0
         PRINT "0100"
        ELSE
         IF x=5.0
          PRINT "0101"
         ELSE
          PRINT "error"
         ENDIF
        ENDIF
       ENDIF
      ENDIF
     ENDIF
    UNTIL 0
    END
    
    code end.
    code:
    
    j=1
    k=5
    do
    j=j+1
     PRINT "up yours"
    UNTIL j=k
    print "repeats string 4 times"
    pause 3000
    exit
    
    code end.
    code:
     
    ! This example shows the different effects
    ! available for drawing graphical text.
    !
    ! Open Graphics Screen with a black background.
    
    GR.OPEN 255, 0, 0, 0
    GR.ORIENTATION 0
    GR.SCREEN w,h
    
    xleft = w/4
    
    ! Draw a red text alignment line
    
    GR.COLOR 255,255,0,0,1
    GR.LINE n, xleft,0, xleft,h
    
    ! Set the text color to Red with fill = false
    
    GR.COLOR 255,255, 0, 255, 0
    
    ! Set the text size to 1/25th screen height
    
    GR.TEXT.SIZE w/25
    
    ! Set the text align to Left = 1
    
    GR.TEXT.ALIGN 1
    
    GR.TEXT.DRAW P, xleft, h/3, "Left Aligned"
    
    ! Set the text align to Center = 2
    
    GR.TEXT.ALIGN 2
    
    GR.TEXT.DRAW P, xleft, h/2, "Center Aligned"
    
    ! Set the text align to Right = 3
    
    GR.TEXT.ALIGN 3
    
    GR.TEXT.DRAW P, xleft, 2*h/3, "Right Aligned"
    
    ! Demonstrate Text Sizes and Styles
    ! All examples will be aligned Left = 1
    ! and with Blue (0,0,255) text with fill = false
    
    GR.TEXT.ALIGN 1
    GR.COLOR 255, 0, 255, 0, 0
    
    ! Eight block of text will be drawn
    ! evenly spaced
    
    block = h/8
    xleft = w/2
    
    GR.TEXT.SIZE block/4
    GR.TEXT.DRAW P, xleft,  block/2, "Tiny text"
    
    GR.TEXT.SIZE  block
    GR.TEXT.DRAW blink_ptr, xleft, 2*block, "neo text"
    
    ! normal text size is block/2
    hblock = block/2
    bc = 3 % Block level
    
    GR.TEXT.SIZE hblock
    GR.TEXT.BOLD 1
    GR.TEXT.DRAW BTP, xleft , bc*block + hblock, "Bold, unfilled text"
    bc = bc +1
    
    ! Show Bold, filled text. Change the color
    ! fill parameter to true
    
    GR.COLOR 255, 0, 0, 255, 1
    
    GR.TEXT.DRAW P, xleft, bc*block + hblock, "Bold, filled text"
    bc =bc + 1
    
    ! Show Underlinded text
    
    GR.TEXT.BOLD 0
    GR.TEXT.UNDERLINE 1
    GR.TEXT.DRAW P, xleft, bc*block + hblock, "Underlined text"
    bc =bc + 1
    
    ! Show strike through text
    
    GR.TEXT.UNDERLINE 0
    GR.TEXT.STRIKE 1
    GR.TEXT.DRAW P, xleft, bc*block + hblock, "Strike through text"
    bc =bc + 1
    
    ! Show skewed text
    
    GR.TEXT.STRIKE 0
    GR.TEXT.SKEW -0.25
    GR.TEXT.DRAW P,xleft, bc*block + hblock, "Skewed text"
    
    ! Now render everything
    
    GR.RENDER
    
    ! After a one second pause,
    ! start to blink the big text
    
    PAUSE 1000
    
    DO
     GR.HIDE blink_ptr
     GR.RENDER
     PAUSE 500
     GR.SHOW blink_ptr
     GR.RENDER
     PAUSE 750
    UNTIL 0
    
    ! The program does not end until the
    ! BACK key is pressed. When BACK
    ! is pressed, there will be a graphics
    ! not open error. The onerror will
    ! it an end without an error.
    
    ONERROR:
    END
    

    code end.
    This next code demonstrates the accelerometer and GOSUB
    (similar to GOTO but it returns to the same spot when finished)
    code:
    
    SENSORS.OPEN 1
    
    DO
     SENSORS.READ 1,y,x,z
     IF x>1
      PRINT x
      PAUSE 2000
      CLS
      GOSUB count
     ENDIF
    UNTIL f>29
    TTS.INIT
    TTS.SPEAK "that's 30 pushups. u can stop."
    PAUSE 5000
    END
    EXIT
    count:
    f=1+f
    PRINT f
    TTS.INIT
    TTS.SPEAK "you did " + FORMAT$("#####", f) + "pushups"
    RETURN
    

    code end.
  • A CellPhone GPS Program
  • computer Programming
    How about programming a computer? To do that we will be using
    freebasic or qbasic. Either program can be downloaded at the
    top of the page. I would recommend freebasic for now. If you
    are on a very old computer you can download qbasic and use the
  • Qbasic
  • link to learn all you need to learn about qbasic. If you wish to learn
    about freebasic you can read about it on my freebasic page here:
  • FreeBasic

  • Be sure to have already downloaded and setup freebasic as the
    freebasic site will explain when you download it.