TI99 Environment

# TI_PRINT

Syntax

TI_PRINT(tab,string)

Description

This function simulates the TI-99/4A Console BASIC's PRINT TAB(tab);"string". The tab parameter can be an integer between 1 and 28. As with the TI-99/4A, PRINT column 1 corresponds to HCHAR,VCHAR column position 3 on the screen. The string parameter includes the text to be printed. If you want to print numbers, you must convert them to strings first. When printing a new line on the screen, everything (except sprites) is scrolled up one line (so the top line is lost) and the new line is printed at the bottom of the screen.

Example Code

    EXAMPLE 1:
    ` Moving Illusion using TI_PRINT()
    RANDOMIZE timer()
    CALL_CLEAR()
    CALL_CHAR(128,"FFFFFFFFFFFFFFFF")
    DO
       CALL_SCREEN(2)
       CALL_COLOR(13,RND(13)+3,RND(13)+3)
       FOR L=1 TO 28
          TI_PRINT(L,CHR$(128)) : tiwait(25)
       NEXT L
    LOOP

    EXAMPLE 2:
    ` Test Active sprites, Lookup command
    randomize hitimer()
    for i = 1 to 9
       call_sprite(i,48+i,16,rnd(150)+10,rnd(200)+10,rnd(20) - 10,rnd(20) - 10)
    next i
    TI_PRINT(1,"Active sprites:"+str$(TIE_Activesprites))
    TI_PRINT(1,"Array count:"+str$(ARRAY COUNT (TIE_ASN())))
    for i = 1 to ARRAY COUNT (TIE_ASN())
       TI_PRINT(1,str$(i) + "   " + str$(TIE_ASN(i)))
    next i
    tiwaitkey() : call_clear()
    for jjj = 1 to 9
       TI_PRINT(1,"Deleting sprite " + str$(jjj)) : tiwaitkey()
       call_delsprite(jjj)
       TI_PRINT(1,"Active sprites:"+str$(TIE_Activesprites))
       TI_PRINT(1,"Array count:"+str$(ARRAY COUNT(TIE_ASN())))
       TI_PRINT(1,"")
       TI_PRINT(1,"Active sprites   Sprite #")
       TI_PRINT(1,"--------------   --------")
       for i = 1 to ARRAY COUNT (TIE_ASN())
          TI_PRINT(7,str$(i) + "             " + str$(TIE_ASN(i)))
       next i
       tiwaitkey():call_clear()
    next jjj
    end

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020