Jump to content
IGNORED

Single Line XB Programs


Artoj

Recommended Posts

Hi All,

As I walked into my "Manshed" a small slip of dot matrix printed paper floated down in front of me, I picked it up and it was an XBasic single line program that I must have created back in 1984, so here it is:

 

 1 CALL KEY(0,K,S):: X=X-(K=68)+(K=83)-(X<2)+(X>31):: Y=Y-(K=88)+(K=69)-(Y<2)+(Y>23):: CALL HCHAR(Y,X,30-(K=32 OR K=51)*2,1-(K=51)*768:: GOTO 1

 

So here is a chance for all those single line XB programs that are actually a complete program to be listed. The proviso is it must comply with standard TI99 XB cartridge. If you have other types of enhanced XB, please include them but make it known what you used and the special CALL or Function that make it unique. Regards Arto  

Edited by Artoj
  • Like 4
Link to comment
Share on other sites

1 hour ago, Artoj said:

Hi All,

As I walked into my "Manshed" a small slip of dot matrix printed paper floated down in front of me, I picked it up and it was an XBasic single line program that I must have created back in 1984, so here it is:

 

 1 CALL KEY(0,K,S):: X=X-(K=68)+(K=83)-(X<2)+(X>31):: Y=Y-(K=88)+(K=69)-(Y<2)+(Y>23):: CALL HCHAR(Y,X,30-(K=32 OR K=51)*2,1-(K=51)*768:: GOTO 1

 

So here is a chance for all those single line XB programs that are actually a complete program to be listed. The proviso is it must comply with standard TI99 XB cartridge. If you have other types of enhanced XB, please include them but make it known what you used and the special CALL or Function that make it unique. Regards Arto  

I get syntax error in 1

Oh missing a ) at end 

1 CALL KEY(0,K,S):: X=X-(K=68)+(K=83)-(X<2)+(X>31):: Y=Y-(K=88)+(K=69)-(Y<2)+(Y>23):: CALL HCHAR(Y,X,30-(K=32 OR K=51)*2,1-(K=51)*768) :: GOTO 1

  • Like 3
Link to comment
Share on other sites

Here's a substantially modified XB single line spin on a demo concept I designed a while ago for TI BASIC (where it was seven lines):

 

10 RANDOMIZE::CALL CLEAR::CALL COLOR(1,2+INT(RND*3)*4,8)::FOR X=1 TO 30::P=P*-(P<9)+RND*6+1::S$=S$&STR$(INT(P))::CALL CHAR(32,S$)::NEXT X

 

Draws one of a large number of possible patterns in one of four possible colours, then displays the finished pattern for a few seconds. 

Edited by pixelpedant
  • Like 5
Link to comment
Share on other sites

Here is a 1 line disk catalog program. To do this in 1 line is simply amazing.

1 IF B=0 THEN INPUT B :: GOTO 1 ELSE C=C+1 :: OPEN #1:"DSK"&STR$(B)&".",INPUT ,RELATIVE,INTERNAL :: INPUT #1,REC C:A$,A,J,K :: IF LEN(A$)=0 THEN CLOSE #1 ELSE PRINT USING "########## ### #":A$,J,A :: CLOSE #1 :: GOTO 1

 

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...