jrhodes Posted April 29, 2023 Share Posted April 29, 2023 I'm looking for a old article, i think it was in one of the user group newsletters, but may have been a magazine. It had a GOSUB routine that mimicked DISPLAY AT functionality in TI BASIC. You set a couple of variables to the row and column you want, and then GOSUB to this bit of code, and it is suppose to display the string at those coordinates, if i remember correctly. Please don't just tell me to use XB/RXB etc. I know this is a real article and i want to find it. Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted April 29, 2023 Share Posted April 29, 2023 (edited) Do you want the article, or do you want the GOSUB routine? Edited April 29, 2023 by senior_falcon 1 Quote Link to comment Share on other sites More sharing options...
pixelpedant Posted April 29, 2023 Share Posted April 29, 2023 There are *lots* of TI BASIC subprograms to this effect out there. Since almost every complex TI BASIC program contains one. Here's a working example from an early version of Hell's Halls 1, which I've tried to disentangle from program-specific features. I tried simplifying the one from Hell's Halls 2, but there's no disentangling it from the program's internal interpreter to such an extent as to make it independently useful. The essential strategy here being to prefix any text string with two bytes signifying Y and X positions for the DISPLAY AT, which are treated as possessing their ASCII value - 64 (and hence, A=1, B=2, etc.) Such that "JAWRITE THIS AT 10,1" writes "WRITE THIS AT 10,1" at J=10 (Y) and A=1 (X). Note that N$ can be read from DATA if GOSUB 5000 is used, or read from N$ directly (where a value has been assigned to it prior to the GOSUB) if GOSUB 5005 is used. 1000 DATA "JAWRITE THIS AT 10,1" 1010 CALL CLEAR 1020 GOSUB 5000 1030 END REM DISPLAY AT sub REM DATA STRUCTURE: Y,X,TEXT... 5000 READ N$ REM Pop value from N$ and fetch Y pos as I 5005 GOSUB 7260 5010 Y=I REM Pop X pos 5015 GOSUB 7260 5025 FOR X=W TO LEN(N$)-1 REM Pop character values off string as unmodified value 5050 GOSUB 7385 5055 CALL HCHAR(Y,I+X,A) 5060 NEXT X 5065 RETURN REM SUB: Pop first value off N$ and return A-64 7260 GOSUB 7385 7265 I=A-64 7270 RETURN REM SUB: Put ASC in A and pop first value off N$ 7385 A=ASC(N$) REM Entry point for only popping first value, and not assigning I 7390 N$=SEG$(N$,2,LEN(N$)-1) 7395 RETURN 1 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 29, 2023 Author Share Posted April 29, 2023 (edited) 56 minutes ago, senior_falcon said: Do you want the article, or do you want the GOSUB routine? I want a copy of the article, or for you to tell me where i can find it. 5 minutes ago, pixelpedant said: There are *lots* of TI BASIC subprograms to this effect out there. Since almost every complex TI BASIC program contains one. Here's a working example from an early version of Hell's Halls 1, which I've tried to disentangle from program-specific features. I tried simplifying the one from Hell's Halls 2, but there's no disentangling it from the program's internal interpreter to such an extent as to make it independently useful. The essential strategy here being to prefix any text string with two bytes signifying Y and X positions for the DISPLAY AT, which are treated as possessing their ASCII value - 64 (and hence, A=1, B=2, etc.) Such that "JAWRITE THIS AT 10,1" writes "WRITE THIS AT 10,1" at J=10 (Y) and A=1 (X). 1000 DATA "JAWRITE THIS AT 10,1" 1010 CALL CLEAR 1020 GOSUB 5000 1030 END REM DISPLAY AT sub REM DATA STRUCTURE: Y,X,TEXT... 5000 READ N$ REM Pop value from N$ and fetch Y pos as I 5005 GOSUB 7260 5010 Y=I REM Pop X pos 5015 GOSUB 7260 5020 H=ABS(I) 5025 FOR X=W TO LEN(N$)-1 REM Pop character values off string as unmodified value 5050 GOSUB 7385 5055 CALL HCHAR(Y,H+X,A) 5060 NEXT X 5065 RETURN REM SUB: Pop first value off N$ and return I-64 7260 GOSUB 7385 7265 I=A-64 7270 RETURN REM SUB: Put ASC in I and pop first value off N$ 7385 A=ASC(N$) REM Entry point for only popping first value, and not assigning I 7390 N$=SEG$(N$,2,LEN(N$)-1) 7395 RETURN Thank you for that! I never would have thought of appending characters to the start of the string to represent position, and i'm pretty certain that's not what was going on in the article in question. Edited April 29, 2023 by jrhodes 2 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 29, 2023 Share Posted April 29, 2023 26 minutes ago, pixelpedant said: The essential strategy here being to prefix any text string with two bytes signifying Y and X positions for the DISPLAY AT, which are treated as possessing their ASCII value - 64 (and hence, A=1, B=2, etc.) Such that "JAWRITE THIS AT 10,1" writes "WRITE THIS AT 10,1" at J=10 (Y) and A=1 (X). Interesting approach. I have always used an R and C variable before GOSUBing the subroutine. But I also tie those positions with other things, so the two character prefix would not necessarily work for me. Quote Link to comment Share on other sites More sharing options...
pixelpedant Posted April 29, 2023 Share Posted April 29, 2023 In this case, I was doing everything to minimise the data payload of the program, so this sort of approach was very desirable. The prepended bytes are of course two bytes, while appending two numeric strings as follows... DATA 10,1,"WRITE THIS AT 10,1" Is going to be seven bytes (unquoted string, length, 1, 0, unquoted string, length, 1), if I've got my tokenisation math right. And those extra bytes every time you write any text to screen are really going to start to add up, in a program which is writing text a great deal. Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted April 29, 2023 Share Posted April 29, 2023 I copped this routine from MS, back in the 80's... 4200 REM MESSAGE ROUTINE 1** 4210 FOR N=1 TO LEN(S$) 4220 CALL HCHAR(ROW,COL+N,ASC(SEG$(S$,N,28))) 4230 NEXT N 4240 RETURN 100 REM PROGRAM:MARKET 110 REM AUTHOR:JOHN PLASTER 120 REM TEXAS INSTRUMENTS 7/21/80 130 CALL CLEAR 140 RANDOMIZE 150 OPTION BASE 1 160 DIM C(2),I(2),T(2),A(2),L(2),D(2),P(2),V(2),W(2),B(2),E(5) 170 DEF FNR(X)=.01*INT(100*X+.5) 180 DATA 50,2,.001,.15,5000,5000,100,100,250,20,.15,.2,.4,.4,12000,1.5 190 DATA MARKET IS A GAME THAT,SIMULATES THE COMPETITION,BETWEEN 2 COMPANIES.," ",EACH COMPANY PRODUCES 200 DATA A PRODUCT DIFFERENTIATED,ONLY BY ADVERTISING.," ","DURING EACH ROUND, BOTH",PLAYERS INPUT A PRODUCTION 210 DATA "QUANTITY, AN ADVERTISING","BUDGET, AND A SELLING PRICE",FOR THE PRODUCT.," ",THE GAME ENDS WHEN ONE 220 DATA COMPANY IS BANKRUPT OR 230 DATA COMPANY 1 ENTER:,PREVIOUS,CASH ON HAND?,PREVIOUS,INVENTORY?,VARIABLE,PRODUCTION COST?,QUARTER NUMBER? 240 DATA " COMPANY 1 COMPANY 2",PRD LEV? PRD LEV? 250 DATA ADV BUD? ADV BUD?,UNI PRI? UNI PRI? 260 DATA " QUARTER",PROF M% CASH SOLD INV ASSET 270 DATA NO PRODUCTION POSSIBLE,BECAUSE OF STRIKE. 280 DATA YOU MAY NOT RAISE PRICES,DURING THE WAGE-PRICE,FREEZE. 290 DATA NEW LABOR CONTRACT.,VARIABLE PRODUCTION COST 300 DATA THE PRESIDENT HAS JUST,IMPOSED A WAGE-PRICE FREEZE,ON THE ECONOMY AND YOU MAY 310 DATA NOT RAISE THE PRICE OF,YOUR PRODUCT OVER THE NEXT,2 QUARTERS. 320 DATA VICTIM OF EMBEZZLEMENT,BY THE VICE PRESIDENT OF,THE COMPANY. YOUR CASH ON 330 DATA DAMAGE IN ITS WAREHOUSE.,ALL UNITS WERE DESTROYED.,YOUR INSURANCE WILL REIM-,BURSE YOU FOR THESE UNITS 340 DATA A TRANSPORTATION STRIKE HAS,OCCURRED AND YOU ARE UNABLE,TO MOVE YOUR GOODS TO THE 350 DATA DISTRIBUTORS. NEGOTIATIONS,HAVE BEGUN BUT HOPE OF A,SETTLEMENT LOOKS DIM. 360 DATA THERE HAS BEEN A STRIKE,AND YOUR PRODUCTION HAS,BEEN HALTED. NEGOTIATIONS,HAVE BEEN STARTED BUT HOPE 370 DATA OF A SETTLEMENT LOOKS DIM. 380 DATA THE WAGE-PRICE FREEZE,HAS ENDED. 390 DATA THE TRANSPORTATION STRIKE,HAS BEEN SETTLED. NORMAL,DELIVERIES WILL RESUME. 400 DATA STRIKE SETTLED. NORMAL,PRODUCTION RESUMED.,NEW VARIABLE COST = 410 DATA INCREASED WAGES. 420 FOR N=1 TO 8 430 CALL COLOR(N,2,8) 440 NEXT N 450 CALL COLOR(9,2,5) 460 CALL CHAR(96,"0") 470 CALL CHAR(91,"C0C0C0C0C0C0C0C0") 480 CALL CHAR(92,"0303030303030303") 490 CALL CHAR(93,"000000000000FFFF") 500 CALL CHAR(94,"FFFF") 510 CALL CHAR(34,"0000000000000303") 520 CALL CHAR(35,"000000000000C0C") 530 CALL CHAR(59,"0303") 540 CALL CHAR(60,"C0C") 550 CALL CHAR(38,"3C4299A1A199423C") 560 REM TITLE SCREEN*** 570 GOSUB 4480 580 PRINT " MARKET SIMULATION": :" COPYRIGHT ";CHR$(38);" 1980": :" TEXAS INSTRUMENTS": : : : : : : : : :" PRESS ANY KEY" 590 CALL KEY(0,KEY,ST) 600 IF ST<=0 THEN 590 610 READ K2,N,K,K3,C(1),C(2),I(1),I(2),F,U,R,G1,G2,G3,M1,K4 620 FLAG$="0" 630 FOR J=1 TO 2 640 A(J)=0 650 L(J)=0 660 P(J)=0 670 NEXT J 680 IF KEY=89 THEN 740 690 REM LIST INSTRUCTIONS** 700 GOSUB 4360 710 REM DETERMINE IF NEW OR OLD GAME** 720 PRINT " 1. NEW GAME":" 2. CONTINUE OLD GAME": : : : : : : : : : : : : : : : : : : : 730 REM BEGIN GAME*** 740 Q=0 750 W2=0 760 W4=0 770 W3=0 780 IF KEY=89 THEN 1240 790 GOSUB 5450 800 IF KEY-48=1 THEN 1240 810 IF KEY-48=2 THEN 830 820 GOTO 790 830 REM OLD GAME*** 840 GOSUB 4480 850 RESTORE 230 860 ROW=3 870 COL=3 880 GOSUB 4250 890 ROW=ROW+2 900 COL=4 910 GOSUB 4250 920 ROW=ROW+1 930 GOSUB 4250 940 ROW=ROW+2 950 GOSUB 4250 960 ROW=ROW+1 970 GOSUB 4250 980 BEG=21 990 IND=29 1000 FOR J=1 TO 2 1010 CALL HCHAR(3,12,48+J) 1020 CALL HCHAR(6,21,32,10) 1030 CALL HCHAR(9,21,32,10) 1040 ROW=6 1050 GOSUB 4540 1060 C(J)=VAL(S$) 1070 IF C(J)>=M1 THEN 1050 1080 ROW=9 1090 GOSUB 4540 1100 I(J)=VAL(S$) 1110 NEXT J 1120 ROW=ROW+2 1130 GOSUB 4250 1140 ROW=ROW+1 1150 GOSUB 4250 1160 ROW=ROW+2 1170 GOSUB 4250 1180 ROW=12 1190 GOSUB 4540 1200 U=VAL(S$) 1210 ROW=14 1220 GOSUB 4540 1230 Q=VAL(S$) 1240 REM NEW GAME** 1250 GOSUB 4480 1260 PRINT " FIXED PRODUCTION COST=":" $";STR$(F);"/QUARTER.": : 1270 PRINT " PRODUCTION COST=":" $";STR$(U);"/UNIT.": : 1280 PRINT " WITH NO ADVERTISING AND A":" SELLING PRICE OF $50/UNIT":" A COMPANY WILL SELL" 1290 PRINT " ";STR$(K2/2);" UNITS.": : 1300 PRINT " WAREHOUSE CHARGE FOR":" INVENTORY=";STR$(R*100);"%.": : 1310 PRINT " INTEREST CHARGE ON BORROWED":" MONEY=";STR$(K3*100);"%.": : : : : : 1320 PRINT " PRESS ANY KEY" 1330 CALL KEY(0,KEY,ST) 1340 IF ST<=0 THEN 1330 1350 REM COMPLETE GAME SCREEN*** 1360 GOSUB 4480 1370 CALL HCHAR(1,3,93,28) 1380 CALL HCHAR(24,3,94,28) 1390 CALL VCHAR(2,2,92,22) 1400 CALL VCHAR(2,31,91,22) 1410 CALL HCHAR(19,3,93,28) 1420 CALL HCHAR(11,3,93,28) 1430 CALL HCHAR(1,2,34) 1440 CALL HCHAR(24,2,59) 1450 CALL HCHAR(1,31,35) 1460 CALL HCHAR(24,31,60) 1470 RESTORE 240 1480 COL=2 1490 FOR ROW=20 TO 23 1500 GOSUB 4250 1510 NEXT ROW 1520 CALL VCHAR(20,16,92,4) 1530 READ S$ 1540 FOR ROW=2 TO 7 STEP 5 1550 GOSUB 4200 1560 NEXT ROW 1570 READ S$ 1580 FOR ROW=3 TO 8 STEP 5 1590 GOSUB 4200 1600 NEXT ROW 1610 FOR J=1 TO 5 1620 E(J)=0 1630 NEXT J 1640 P4=0 1650 GOSUB 4980 1660 FOR J=1 TO 2 1670 W(J)=0 1680 D(J)=0 1690 T(J)=0 1700 B(J)=U*I(J)+C(J) 1710 GOSUB 5090 1720 NEXT J 1730 Q=Q+1 1740 GOSUB 3100 1750 GOSUB 2290 1760 GOSUB 4980 1770 REM COMPUTE DEMAND 1780 FOR J=1 TO 2 1790 D(J)=(1-E(5))*.5*(K2+2*V(J)*D1)/(P(J)/50)^N 1800 NEXT J 1810 GOSUB 2980 1820 FOR J=1 TO 2 1830 IF D(J)>I(J)THEN 1860 1840 T(J)=D(J) 1850 GOTO 1870 1860 T(J)=I(J) 1870 T(J)=INT(T(J)) 1880 C(J)=C(J)+T(J)*P(J) 1890 I(J)=I(J)-T(J) 1900 NEXT J 1910 FOR J=1 TO 2 1920 C(J)=C(J)-R*I(J)*U-K3*C(J)*(SGN(C(J))-SGN(C(J))^2)/2 1930 C(J)=INT(C(J)) 1940 IF E(5)=0 THEN 1970 1950 W(J)=0 1960 GOTO 1990 1970 IF T(1)+T(2)=0 THEN 1950 1980 W(J)=INT(10000*T(J)/(T(1)+T(2)))/100 1990 NEXT J 2000 FOR J=1 TO 2 2010 GOSUB 5090 2020 B(J)=C(J)+U*I(J) 2030 IF B(J)>0 THEN 2050 2040 GOSUB 2910 2050 IF B(J)<M1 THEN 2160 2060 IF B(J)<=C(3-J)+U*I(3-J)THEN 2160 2070 P4=17 2080 GOSUB 4930 2090 S$="COMPANY "&STR$(J)&" YOU HAVE REACHED" 2100 ROW=13 2110 COL=3 2120 GOSUB 4200 2130 S$="$"&STR$(.001*M1)&",000 AND WON." 2140 ROW=ROW+1 2150 GOSUB 4200 2160 NEXT J 2170 IF P4<>17 THEN 1730 2180 S$="PLAY AGAIN? (Y/N)_" 2190 ROW=18 2200 COL=3 2210 GOSUB 4200 2220 CALL KEY(0,KEY,ST) 2230 IF ST<=0 THEN 2220 2240 CALL HCHAR(18,21,KEY) 2250 IF KEY<>89 THEN 2280 2260 RESTORE 2270 GOTO 610 2280 STOP 2290 REM INPUT BOTTOM OF SCREEN** 2300 BEG=11 2310 IND=15 2320 FOR J=1 TO 2 2330 ROW=21 2340 COL=BEG-1 2350 S$=STR$(L(J)) 2360 GOSUB 4200 2370 ROW=22 2380 S$=STR$(A(J)) 2390 GOSUB 4200 2400 ROW=23 2410 S$=STR$(P(J)) 2420 GOSUB 4200 2430 IF E(2)<>1 THEN 2510 2440 RESTORE 270 2450 GOSUB 4930 2460 COL=3 2470 FOR ROW=13 TO 14 2480 GOSUB 4250 2490 NEXT ROW 2500 GOTO 2550 2510 ROW=21 2520 GOSUB 4540 2530 L(J)=VAL(S$) 2540 IF L(J)<0 THEN 2510 2550 ROW=22 2560 GOSUB 4540 2570 A(J)=VAL(S$) 2580 IF A(J)<0 THEN 2550 2590 C(J)=C(J)-F-L(J)*U-A(J) 2600 IF E(2)=1 THEN 2620 2610 I(J)=I(J)+L(J) 2620 ROW=23 2630 GOSUB 4540 2640 H=VAL(S$) 2650 IF E(1)<>1 THEN 2730 2660 IF H<=P(J)THEN 2730 2670 RESTORE 280 2680 GOSUB 4930 2690 ROW=13 2700 COL=3 2710 GOSUB 4250 2720 GOTO 2620 2730 P(J)=H 2740 IF H>200 THEN 2620 2750 IF P(J)<=0 THEN 2620 2760 FOR ROW=21 TO 23 2770 CALL HCHAR(ROW,BEG,32,5) 2780 NEXT ROW 2790 BEG=25 2800 IND=29 2810 NEXT J 2820 A2=A(1)+A(2) 2830 IF A2>0 THEN 2870 2840 V(1)=0 2850 V(2)=0 2860 GOTO 2890 2870 V(1)=A(1)/A2 2880 V(2)=A(2)/A2 2890 D1=(K2-K2*EXP(-K*A2))*K4 2900 RETURN 2910 S$="COMPANY "&STR$(J)&" YOU ARE BANKRUPT." 2920 GOSUB 4930 2930 ROW=13 2940 COL=3 2950 GOSUB 4200 2960 P4=17 2970 RETURN 2980 IF P(1)<P(2)THEN 3010 2990 M=2 3000 GOTO 3020 3010 M=1 3020 G4=(P(3-M)-P(M))/P(3-M) 3030 IF G4<=G1 THEN 3090 3040 IF G4<G2 THEN 3060 3050 G4=G2 3060 G5=D(3-M)*((G4-G1)/(G2-G1))*G3 3070 D(3-M)=D(3-M)-G5 3080 D(M)=D(M)+G5 3090 RETURN 3100 IF Q<6 THEN 3440 3110 IF RND<.1 THEN 3160 3120 IF RND<.1 THEN 3210 3130 IF RND<.1 THEN 3310 3140 IF RND<.1 THEN 3380 3150 GOTO 3440 3160 IF E(1)>0 THEN 3120 3170 GOSUB 3610 3180 E(1)=1 3190 Q1=Q 3200 GOTO 3120 3210 I1=INT(RND+1.5) 3220 IF Q-W2<=2 THEN 3130 3230 IF C(I1)<0 THEN 3130 3240 IF C(I1)>200 THEN 3270 3250 C(I1)=.75*C(I1) 3260 GOTO 3280 3270 C(I1)=C(I1)-200 3280 GOSUB 3650 3290 W2=Q 3300 GOTO 3130 3310 J=INT(RND+1.5) 3320 IF Q-W3<=2 THEN 3140 3330 GOSUB 3770 3340 C(J)=C(J)+U*I(J)*.75 3350 I(J)=0 3360 W3=Q 3370 GOTO 3140 3380 IF E(1)=1 THEN 3440 3390 IF Q-W4<=2 THEN 3440 3400 W4=Q 3410 GOSUB 3890 3420 E(5)=1 3430 Q2=Q 3440 IF INT((Q-1)/4)*4<>Q-1 THEN 3970 3450 IF Q=1 THEN 3970 3460 IF E(1)=1 THEN 3970 3470 IF RND>.25 THEN 3540 3480 IF Q<6 THEN 3540 3490 GOSUB 3930 3500 E(2)=1 3510 U=INT(U*(1.1+.1*RND)) 3520 Q3=Q 3530 GOTO 3970 3540 U=INT(U*(1.05+.1*RND)) 3550 RESTORE 290 3560 REND=14 3570 GOSUB 4290 3580 S$="NOW=$"&STR$(U)&"/UNIT." 3590 GOSUB 4200 3600 GOTO 3970 3610 RESTORE 300 3620 REND=18 3630 GOSUB 4290 3640 RETURN 3650 S$="COMPANY "&STR$(I1)&" HAS BEEN THE" 3660 GOSUB 4930 3670 ROW=13 3680 COL=3 3690 GOSUB 4200 3700 RESTORE 320 3710 FOR ROW=14 TO 16 3720 GOSUB 4250 3730 NEXT ROW 3740 S$="HAND IS NOW $"&STR$(C(I1)) 3750 GOSUB 4200 3760 RETURN 3770 S$="COMPANY "&STR$(J)&" HAS SUFFERED FIRE" 3780 GOSUB 4930 3790 ROW=13 3800 COL=3 3810 GOSUB 4200 3820 RESTORE 330 3830 FOR ROW=14 TO 17 3840 GOSUB 4250 3850 NEXT ROW 3860 S$="IN THE AMOUNT OF $"&STR$(INT(U*I(J)*.75))&"." 3870 GOSUB 4200 3880 RETURN 3890 RESTORE 340 3900 REND=18 3910 GOSUB 4290 3920 RETURN 3930 RESTORE 360 3940 REND=17 3950 GOSUB 4290 3960 RETURN 3970 IF E(1)<>1 THEN 4030 3980 IF Q<Q1+2 THEN 4030 3990 E(1)=2 4000 RESTORE 380 4010 REND=14 4020 GOSUB 4290 4030 IF E(5)<>1 THEN 4090 4040 IF Q2=Q THEN 4090 4050 E(5)=0 4060 RESTORE 390 4070 REND=15 4080 GOSUB 4290 4090 IF E(2)<>1 THEN 4190 4100 IF Q3=Q THEN 4190 4110 RESTORE 400 4120 REND=15 4130 GOSUB 4290 4140 S$="$"&STR$(U)&"/UNIT DUE TO" 4150 GOSUB 4200 4160 ROW=17 4170 GOSUB 4250 4180 E(2)=0 4190 RETURN 4200 REM MESSAGE ROUTINE 1** 4210 FOR N=1 TO LEN(S$) 4220 CALL HCHAR(ROW,COL+N,ASC(SEG$(S$,N,28))) 4230 NEXT N 4240 RETURN 4250 REM MESSAGE ROUTINE 2** 4260 READ S$ 4270 GOSUB 4200 4280 RETURN 4290 REM MESSAGE ROUTINE 3** 4300 GOSUB 4930 4310 COL=3 4320 FOR ROW=13 TO REND 4330 GOSUB 4250 4340 NEXT ROW 4350 RETURN 4360 REM INSTRUCTION ROUTINE** 4370 GOSUB 4480 4380 FOR ROW=2 TO 17 4390 READ S$ 4400 PRINT " ";S$ 4410 NEXT ROW 4420 PRINT " REACHES $";STR$(.001*M1);",000 IN":" TOTAL ASSETS.": : : : 4430 PRINT " PRESS ANY KEY" 4440 CALL KEY(0,KEY,ST) 4450 IF ST<=0 THEN 4440 4460 GOSUB 4480 4470 RETURN 4480 REM SCREEN INITIALIZATION*** 4490 CALL CLEAR 4500 CALL SCREEN(5) 4510 CALL VCHAR(1,1,96,48) 4520 CALL VCHAR(1,31,96,48) 4530 RETURN 4540 REM CURSOR CONTROL*** 4550 CUR=BEG 4560 IF CUR>=BEG THEN 4590 4570 CUR=BEG 4580 GOTO 4610 4590 IF CUR<=IND THEN 4610 4600 CUR=IND 4610 CALL GCHAR(ROW,CUR,G) 4620 CALL HCHAR(ROW,CUR,95) 4630 IF CURI<>5 THEN 4660 4640 CURI=0 4650 CALL HCHAR(ROW,CUR,G) 4660 CURI=CURI+1 4670 CALL KEY(0,KEY,ST) 4680 IF ST<=0 THEN 4620 4690 CALL HCHAR(ROW,CUR,G) 4700 IF KEY=32 THEN 4740 4710 IF KEY=45 THEN 4740 4720 IF KEY<48 THEN 4770 4730 IF KEY>57 THEN 4770 4740 CALL HCHAR(ROW,CUR,KEY) 4750 CUR=CUR+1 4760 GOTO 4560 4770 IF KEY=13 THEN 4840 4780 IF KEY<>8 THEN 4810 4790 CUR=CUR-1 4800 GOTO 4560 4810 IF KEY<>9 THEN 4560 4820 CUR=CUR+1 4830 GOTO 4560 4840 REM LOAD INPUT******** 4850 S$="" 4860 FOR N=BEG TO IND 4870 CALL GCHAR(ROW,N,G) 4880 S$=S$&CHR$(G) 4890 NEXT N 4900 IF S$>="0" THEN 4920 4910 S$="0" 4920 RETURN 4930 REM CLEAR MESSAGE BOX** 4940 FOR ROW=13 TO 18 4950 CALL HCHAR(ROW,3,32,28) 4960 NEXT ROW 4970 RETURN 4980 REM DISPLAY QUARTER*** 4990 IF FLAG$="0" THEN 5030 5000 FLAG$="0" 5010 ROW=7 5020 GOTO 5050 5030 FLAG$="1" 5040 ROW=2 5050 S$=STR$(Q) 5060 COL=19 5070 GOSUB 4200 5080 RETURN 5090 REM SUB TO DISPLAY STATS** 5100 IF FLAG$="0" THEN 5130 5110 ROW=3 5120 GOTO 5140 5130 ROW=8 5140 ROW=ROW+J 5150 CALL HCHAR(ROW,3,32,28) 5160 S$=SEG$(STR$(INT(U*I(J)+C(J)-B(J))),1,5) 5170 IF LEN(S$)<5 THEN 5190 5180 S$="****" 5190 COL=2 5200 GOSUB 4200 5210 S$=SEG$(STR$(INT(W(J))),1,3) 5220 IF LEN(S$)<3 THEN 5240 5230 S$="**" 5240 COL=7 5250 GOSUB 4200 5260 S$=SEG$(STR$(INT(C(J))),1,6) 5270 IF LEN(S$)<6 THEN 5290 5280 S$="*****" 5290 COL=10 5300 GOSUB 4200 5310 COL=16 5320 S$=SEG$(STR$(INT(T(J))),1,5) 5330 IF LEN(S$)<5 THEN 5350 5340 S$="****" 5350 GOSUB 4200 5360 COL=21 5370 S$=SEG$(STR$(INT(I(J))),1,4) 5380 IF LEN(S$)<4 THEN 5400 5390 S$="****" 5400 GOSUB 4200 5410 S$=SEG$(STR$(INT(U*I(J)+C(J))),1,5) 5420 COL=25 5430 GOSUB 4200 5440 RETURN 5450 REM SUB YOUR CHOICE**** 5460 S$="YOUR CHOICE ? _" 5470 COL=8 5480 ROW=23 5490 GOSUB 4200 5500 CALL KEY(0,KEY,ST) 5510 IF ST<=0 THEN 5500 5520 CALL HCHAR(23,23,KEY) 5530 RETURN 2 Quote Link to comment Share on other sites More sharing options...
Bill R Sullivan Posted April 29, 2023 Share Posted April 29, 2023 (edited) Had I been able to release TIB+ (TI Basic Plus) back in the day (long ago) or even two or three years ago, it would have made hobby life much easier for those who have returned recently a bit more fun. TIB+ uses AL to create lots of useful "CALLs" provided you have 32K or more RAM. In the last two months I only squeezed 1 day of hobby time in until now. I will try to look in here a little more often, but no promises. RetroBill (fdos) Edited April 29, 2023 by Bill R Sullivan corrected typo 2 Quote Link to comment Share on other sites More sharing options...
WhataKowinkydink Posted April 30, 2023 Share Posted April 30, 2023 I seem to remember some sort of article about this too. I also seem to recall that TI's "MarketSim(ulator)" did some sort of DISPLAY AT routine. 2 Quote Link to comment Share on other sites More sharing options...
moije2 Posted April 30, 2023 Share Posted April 30, 2023 PHD 5004 Programing Aids I 2 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 30, 2023 Author Share Posted April 30, 2023 (edited) @moije2 thanks! I could have swore i seen this in one of the user group newsletters, but i think this is definitely the routine i was thinking of. Attaching a pdf for others interested. programming aids i.pdf Edited April 30, 2023 by jrhodes 3 Quote Link to comment Share on other sites More sharing options...
chris36 Posted April 30, 2023 Share Posted April 30, 2023 4 hours ago, jrhodes said: @moije2 thanks! I could have swore i seen this in one of the user group newsletters, but i think this is definitely the routine i was thinking of. Attaching a pdf for others interested. programming aids i.pdf 12.79 MB · 13 downloads http://ftp.whtech.com/video/Chicago TI Fair 2014 Videos/Chicago TI Faire Disk 2014/SPLIT_VARIOUS_1376/N_O_P_Q_R_17/PROGRAMMING_AIDS_I__1980__T.DS Disk image with the BASIC code. (Yes, the last 'K' is missing from DSK) 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.