You are a BASIC bitch, so type-in and share your BASIC listings here. Any and all BASIC dialects are welcome.
You must log in or register to comment.
This a Sharp BASIC suffler for the 40 spanish card deck, for truco and other games.
10:REM BARAJADOR MAZO DE 40 CARTAS ESPANOLAS,SHARP PC-1360 20:WAIT 0: CLS : CLEAR 30:DIM A$(41)*20,S$(0)*32,P$(0)*65 40:C=0:S$(0)="Basto Espada Oro Copas" 50:P$(0)="As Dos Tres CuatroCincoSeis SieteSota CaballoRey" 60:FOR S=1 TO 4 70:FOR N=1 TO 10 80:C=C+1 90:A$(C)= MID$ (P$(0),(N*5)-4,5)+" de "+ MID$ (S$(0),(S*8)-5,0) 100:NEXT N: NEXT S 110:FOR C=41 TO 2 STEP - 1:A= RND (40)+1:A$(C)=A$(A):A$(A)=A$(C-1): NEXT C: BEEP 1: WAIT 120:FOR C=1 TO 40: PRINT SRT$ (C);":";A$(C): NEXT C
Darthmouth GRAFIX.BAS!
100 DEF FNF(X)=SIN(X) 105 DEF FNG(X)=LOG(X)/LOG(10) 110 DEF FNR(X)=INT(X+.5) 120 DEF FNX(X)=INT(100*X+.5)/100 130 READ A,B,S 140 READ C,D,N 150 IF N<=50 THEN 180 160 PRINT "ONLY 50 SUBDIVISIONS" 170 STOP 175 : 180 H=(D-C)/N 190 PRINT ""Y-AXIS FROM ";C;" TO ";D; 195 PRINT " IN INCREMENTS OF ";H 200 PRINT 210 PRINT TAB(8);"'"; 220 FOR I=1 TO N-1 230 PRINT "-"; 240 NEXT I 250 PRINT "'" 255 : 260 FOR X=A TO B STEP S 270 Y=FNF(X) 272 Y1=8+FNR((Y-C)/H) 274 Y=FNG(X) 276 Y2=8+FNR((Y-C)/H) 278 PRINT FNX(X); 280 IF Y2
10 : CLEAR : PAUSE “Mini Moon Age Calculator “ 20 : W=694098 : X=29.53 : Z=365.25 : JN=2460202.6 : REM Julian date for last moon on 25/9/2023 at 2:39am 30 : INPUT “DAY:” ; D , “MONTH:” ; M , “YEAR:” ; Y 40 : IF M<=2 LET Y=Y-1 : M=M+12 50 : A=INT(Y/100) : B=INT(A/4) : C=2-A+B : E=INT(Z * (Y+4716)) 60 : F=INT(30.6001 * (M+1)) : JD=C+D+E+F-1524.5 : DS=JD-JN 70 : S=(DS/X-INT(DS/X)) * X : S=INT(S+.5) 80 : PRINT “Age of Moon “ ; USING “###.# “ ; S ; “_days” : END
Stay SHARP!
Originally coded for a Sharp PC-1251. Basically my “Hello World” in every programming language I try:
10: INPUT "GEWICHT IN KG" , M 20: INPUT "GROESSE IN M" ,L 30: B=M/L^2 40: PRINT "BMI = ";B
I ported this to LF-BASIC https://github.com/LiquidFox1776/LF-BASIC, a BASIC-interpreter written in Python:
10 LET M=0 20 LET L=0 30 LET B=0 40 INPUT "GEWICHT IN KG "; M 50 INPUT "GROESSE IN CM "; L 60 LET L=L/100 70 LET B=M/L^2 80 PRINT "BMI = "; B
Then I started using PDP-8-Emulation and TSS-8:
10 LET M=0 20 LET L=0 30 LET B=0 35 PRINT "WEIGHT IN KG.G:" 40 INPUT M 45 PRINT "HEIGHT IN CM:" 50 INPUT L 60 LET L=L/100 70 LET B=M/L^2 75 PRINT "YOUR BMI IS:" 80 PRINT B 90 END
My BMI has been nicely calculated in your BASIC dialect!