Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 rem Program for http://www.moria.de/~michael/bas/
- 20 defint a-z
- 30 dim stack(999)
- 40 sp = 0
- 50 var0 = 0
- 60 var1 = 0
- 70 var2 = 0
- 80 var3 = 0
- 90 var4 = 0
- 100 var5 = 0
- 110 var6 = 0
- 120 var7 = 0
- 130 var8 = 0
- 140 var9 = 0
- 150 var10 = 0
- 160 var11 = 0
- 170 var12 = 0
- 180 var13 = 0
- 190 var14 = 0
- 200 dim strings$(0)
- 210 goto 370
- 220 rem Print strings$(i)
- 230 s$ = strings$(i)
- 240 rem Print s$
- 250 n = len (s$)
- 260 i = 1
- 270 if n < i then return
- 280 c$ = mid$(s$, i, 1)
- 290 if c$ = "\" then c$ = mid$(s$, i, 2)
- 300 i = i + len(c$)
- 310 if c$ = "\n" then print ""
- 320 if c$ = "\\" then print "\";
- 330 if len(c$) = 2 then goto 270
- 340 print c$;
- 350 goto 270
- 360 rem End of string printer.
- 370 rem
- 380 goto 390
- 390 rem
- 400 stack(sp) = 420
- 410 sp = sp + 1
- 420 goto 430
- 430 rem
- 440 stack(sp - 1) = -stack(sp - 1)
- 450 goto 460
- 460 rem
- 470 sp = sp - 1
- 480 var0 = stack(sp)
- 490 goto 500
- 500 rem
- 510 stack(sp) = 300
- 520 sp = sp + 1
- 530 goto 540
- 540 rem
- 550 sp = sp - 1
- 560 var1 = stack(sp)
- 570 goto 580
- 580 rem
- 590 stack(sp) = 300
- 600 sp = sp + 1
- 610 goto 620
- 620 rem
- 630 sp = sp - 1
- 640 var2 = stack(sp)
- 650 goto 660
- 660 rem
- 670 stack(sp) = 300
- 680 sp = sp + 1
- 690 goto 700
- 700 rem
- 710 stack(sp - 1) = -stack(sp - 1)
- 720 goto 730
- 730 rem
- 740 sp = sp - 1
- 750 var3 = stack(sp)
- 760 goto 770
- 770 rem
- 780 stack(sp) = 7
- 790 sp = sp + 1
- 800 goto 810
- 810 rem
- 820 sp = sp - 1
- 830 var4 = stack(sp)
- 840 goto 850
- 850 rem
- 860 stack(sp) = 15
- 870 sp = sp + 1
- 880 goto 890
- 890 rem
- 900 sp = sp - 1
- 910 var5 = stack(sp)
- 920 goto 930
- 930 rem
- 940 stack(sp) = 200
- 950 sp = sp + 1
- 960 goto 970
- 970 rem
- 980 sp = sp - 1
- 990 var6 = stack(sp)
- 1000 goto 1010
- 1010 rem
- 1020 stack(sp) = var2
- 1030 sp = sp + 1
- 1040 goto 1050
- 1050 rem
- 1060 sp = sp - 1
- 1070 var7 = stack(sp)
- 1080 goto 1090
- 1090 rem
- 1100 stack(sp) = var7
- 1110 sp = sp + 1
- 1120 goto 1130
- 1130 rem
- 1140 stack(sp) = var3
- 1150 sp = sp + 1
- 1160 goto 1170
- 1170 rem
- 1180 sp = sp - 1
- 1190 if stack(sp - 1) > stack(sp) then goto 1220
- 1200 stack(sp - 1) = 0
- 1210 goto 1230
- 1220 stack(sp - 1) = 1
- 1230 rem
- 1240 goto 1250
- 1250 rem
- 1260 sp = sp - 1
- 1270 if stack(sp) = 0 then goto 4630
- 1280 goto 1290
- 1290 rem
- 1300 stack(sp) = var0
- 1310 sp = sp + 1
- 1320 goto 1330
- 1330 rem
- 1340 sp = sp - 1
- 1350 var8 = stack(sp)
- 1360 goto 1370
- 1370 rem
- 1380 stack(sp) = var8
- 1390 sp = sp + 1
- 1400 goto 1410
- 1410 rem
- 1420 stack(sp) = var1
- 1430 sp = sp + 1
- 1440 goto 1450
- 1450 rem
- 1460 sp = sp - 1
- 1470 if stack(sp - 1) < stack(sp) then goto 1500
- 1480 stack(sp - 1) = 0
- 1490 goto 1510
- 1500 stack(sp - 1) = 1
- 1510 rem
- 1520 goto 1530
- 1530 rem
- 1540 sp = sp - 1
- 1550 if stack(sp) = 0 then goto 4370
- 1560 goto 1570
- 1570 rem
- 1580 stack(sp) = 0
- 1590 sp = sp + 1
- 1600 goto 1610
- 1610 rem
- 1620 sp = sp - 1
- 1630 var9 = stack(sp)
- 1640 goto 1650
- 1650 rem
- 1660 stack(sp) = 0
- 1670 sp = sp + 1
- 1680 goto 1690
- 1690 rem
- 1700 sp = sp - 1
- 1710 var10 = stack(sp)
- 1720 goto 1730
- 1730 rem
- 1740 stack(sp) = 32
- 1750 sp = sp + 1
- 1760 goto 1770
- 1770 rem
- 1780 sp = sp - 1
- 1790 var11 = stack(sp)
- 1800 goto 1810
- 1810 rem
- 1820 stack(sp) = 0
- 1830 sp = sp + 1
- 1840 goto 1850
- 1850 rem
- 1860 sp = sp - 1
- 1870 var12 = stack(sp)
- 1880 goto 1890
- 1890 rem
- 1900 stack(sp) = var12
- 1910 sp = sp + 1
- 1920 goto 1930
- 1930 rem
- 1940 stack(sp) = var6
- 1950 sp = sp + 1
- 1960 goto 1970
- 1970 rem
- 1980 sp = sp - 1
- 1990 if stack(sp - 1) < stack(sp) then goto 2020
- 2000 stack(sp - 1) = 0
- 2010 goto 2030
- 2020 stack(sp - 1) = 1
- 2030 rem
- 2040 goto 2050
- 2050 rem
- 2060 sp = sp - 1
- 2070 if stack(sp) = 0 then goto 4110
- 2080 goto 2090
- 2090 rem
- 2100 stack(sp) = var10
- 2110 sp = sp + 1
- 2120 goto 2130
- 2130 rem
- 2140 stack(sp) = var10
- 2150 sp = sp + 1
- 2160 goto 2170
- 2170 rem
- 2180 sp = sp - 1
- 2190 stack(sp - 1) = stack(sp - 1) * stack(sp)
- 2200 goto 2210
- 2210 rem
- 2220 stack(sp) = 200
- 2230 sp = sp + 1
- 2240 goto 2250
- 2250 rem
- 2260 sp = sp - 1
- 2270 stack(sp - 1) = stack(sp - 1) \ stack(sp)
- 2280 goto 2290
- 2290 rem
- 2300 sp = sp - 1
- 2310 var13 = stack(sp)
- 2320 goto 2330
- 2330 rem
- 2340 stack(sp) = var9
- 2350 sp = sp + 1
- 2360 goto 2370
- 2370 rem
- 2380 stack(sp) = var9
- 2390 sp = sp + 1
- 2400 goto 2410
- 2410 rem
- 2420 sp = sp - 1
- 2430 stack(sp - 1) = stack(sp - 1) * stack(sp)
- 2440 goto 2450
- 2450 rem
- 2460 stack(sp) = 200
- 2470 sp = sp + 1
- 2480 goto 2490
- 2490 rem
- 2500 sp = sp - 1
- 2510 stack(sp - 1) = stack(sp - 1) \ stack(sp)
- 2520 goto 2530
- 2530 rem
- 2540 sp = sp - 1
- 2550 var14 = stack(sp)
- 2560 goto 2570
- 2570 rem
- 2580 stack(sp) = var13
- 2590 sp = sp + 1
- 2600 goto 2610
- 2610 rem
- 2620 stack(sp) = var14
- 2630 sp = sp + 1
- 2640 goto 2650
- 2650 rem
- 2660 sp = sp - 1
- 2670 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 2680 goto 2690
- 2690 rem
- 2700 stack(sp) = 800
- 2710 sp = sp + 1
- 2720 goto 2730
- 2730 rem
- 2740 sp = sp - 1
- 2750 if stack(sp - 1) > stack(sp) then goto 2780
- 2760 stack(sp - 1) = 0
- 2770 goto 2790
- 2780 stack(sp - 1) = 1
- 2790 rem
- 2800 goto 2810
- 2810 rem
- 2820 sp = sp - 1
- 2830 if stack(sp) = 0 then goto 3370
- 2840 goto 2850
- 2850 rem
- 2860 stack(sp) = 48
- 2870 sp = sp + 1
- 2880 goto 2890
- 2890 rem
- 2900 stack(sp) = var12
- 2910 sp = sp + 1
- 2920 goto 2930
- 2930 rem
- 2940 sp = sp - 1
- 2950 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 2960 goto 2970
- 2970 rem
- 2980 sp = sp - 1
- 2990 var11 = stack(sp)
- 3000 goto 3010
- 3010 rem
- 3020 stack(sp) = var12
- 3030 sp = sp + 1
- 3040 goto 3050
- 3050 rem
- 3060 stack(sp) = 9
- 3070 sp = sp + 1
- 3080 goto 3090
- 3090 rem
- 3100 sp = sp - 1
- 3110 if stack(sp - 1) > stack(sp) then goto 3140
- 3120 stack(sp - 1) = 0
- 3130 goto 3150
- 3140 stack(sp - 1) = 1
- 3150 rem
- 3160 goto 3170
- 3170 rem
- 3180 sp = sp - 1
- 3190 if stack(sp) = 0 then goto 3290
- 3200 goto 3210
- 3210 rem
- 3220 stack(sp) = 64
- 3230 sp = sp + 1
- 3240 goto 3250
- 3250 rem
- 3260 sp = sp - 1
- 3270 var11 = stack(sp)
- 3280 goto 3290
- 3290 rem
- 3300 stack(sp) = var6
- 3310 sp = sp + 1
- 3320 goto 3330
- 3330 rem
- 3340 sp = sp - 1
- 3350 var12 = stack(sp)
- 3360 goto 3370
- 3370 rem
- 3380 stack(sp) = var10
- 3390 sp = sp + 1
- 3400 goto 3410
- 3410 rem
- 3420 stack(sp) = var9
- 3430 sp = sp + 1
- 3440 goto 3450
- 3450 rem
- 3460 sp = sp - 1
- 3470 stack(sp - 1) = stack(sp - 1) * stack(sp)
- 3480 goto 3490
- 3490 rem
- 3500 stack(sp) = 100
- 3510 sp = sp + 1
- 3520 goto 3530
- 3530 rem
- 3540 sp = sp - 1
- 3550 stack(sp - 1) = stack(sp - 1) \ stack(sp)
- 3560 goto 3570
- 3570 rem
- 3580 stack(sp) = var7
- 3590 sp = sp + 1
- 3600 goto 3610
- 3610 rem
- 3620 sp = sp - 1
- 3630 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 3640 goto 3650
- 3650 rem
- 3660 sp = sp - 1
- 3670 var9 = stack(sp)
- 3680 goto 3690
- 3690 rem
- 3700 stack(sp) = var13
- 3710 sp = sp + 1
- 3720 goto 3730
- 3730 rem
- 3740 stack(sp) = var14
- 3750 sp = sp + 1
- 3760 goto 3770
- 3770 rem
- 3780 sp = sp - 1
- 3790 stack(sp - 1) = stack(sp - 1) - stack(sp)
- 3800 goto 3810
- 3810 rem
- 3820 stack(sp) = var8
- 3830 sp = sp + 1
- 3840 goto 3850
- 3850 rem
- 3860 sp = sp - 1
- 3870 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 3880 goto 3890
- 3890 rem
- 3900 sp = sp - 1
- 3910 var10 = stack(sp)
- 3920 goto 3930
- 3930 rem
- 3940 stack(sp) = var12
- 3950 sp = sp + 1
- 3960 goto 3970
- 3970 rem
- 3980 stack(sp) = 1
- 3990 sp = sp + 1
- 4000 goto 4010
- 4010 rem
- 4020 sp = sp - 1
- 4030 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 4040 goto 4050
- 4050 rem
- 4060 sp = sp - 1
- 4070 var12 = stack(sp)
- 4080 goto 4090
- 4090 rem
- 4100 goto 1890
- 4110 rem
- 4120 stack(sp) = var11
- 4130 sp = sp + 1
- 4140 goto 4150
- 4150 rem
- 4160 sp = sp - 1
- 4170 print chr$(stack(sp));
- 4180 goto 4190
- 4190 rem
- 4200 stack(sp) = var8
- 4210 sp = sp + 1
- 4220 goto 4230
- 4230 rem
- 4240 stack(sp) = var4
- 4250 sp = sp + 1
- 4260 goto 4270
- 4270 rem
- 4280 sp = sp - 1
- 4290 stack(sp - 1) = stack(sp - 1) + stack(sp)
- 4300 goto 4310
- 4310 rem
- 4320 sp = sp - 1
- 4330 var8 = stack(sp)
- 4340 goto 4350
- 4350 rem
- 4360 goto 1370
- 4370 rem
- 4380 stack(sp) = 10
- 4390 sp = sp + 1
- 4400 goto 4410
- 4410 rem
- 4420 sp = sp - 1
- 4430 print chr$(stack(sp));
- 4440 goto 4450
- 4450 rem
- 4460 stack(sp) = var7
- 4470 sp = sp + 1
- 4480 goto 4490
- 4490 rem
- 4500 stack(sp) = var5
- 4510 sp = sp + 1
- 4520 goto 4530
- 4530 rem
- 4540 sp = sp - 1
- 4550 stack(sp - 1) = stack(sp - 1) - stack(sp)
- 4560 goto 4570
- 4570 rem
- 4580 sp = sp - 1
- 4590 var7 = stack(sp)
- 4600 goto 4610
- 4610 rem
- 4620 goto 1090
- 4630 rem
- 4640 goto 4650
- 4650 rem End of program.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement