0 ' POKE &HE6C6,33 10 CLEAR 2000 20 POKE 65497,0:CLEAR 2000 30 DIM CF$(128),FA$(128) 40 FOR A=1 TO 7:HBUFF A,1050:NEXT A 50 ON BRK GOTO 700 60 ON ERR GOTO 5500 70 PALETTE 0,1:PALETTE 1,17:HCOLOR 0,1 80 GOSUB 3000 ' LOAD FONTS 85 WH=640 ' VARIABLES DE ENTORNO 88 WIDTH 40 89 GOSUB 5020 ' SET SCREEN SIZE 90 FO$="HELP.HTM":GOTO 4000 100 HE=4:CE=0:HR=0:HC=0:UN=0:RK=0 110 HDRAW "S4" 115 CP=0:LP=10 ' INITIAL POSITION 120 HCLS 130 GOSUB 2000 ' DRAW BUTTONS 140 HDRAW"BM1,10" 150 ' SEARCH FOR TAGS 155 A$=A$+" " 'REM EXTRA SPACE AT THE END OF EACH LINE 160 FOR PT=1 TO LEN(A$) 165 HPUT (229,0)-(245,8),1,NOT 170 CC$=MID$(A$,PT,1) 180 IF LP+10*HE/4>190 THEN PLAY "AFAFAF":GOTO 670 190 IF CC$="<" GOSUB 1000 200 IF MID$(A$,PT,3)="-->" THEN RK=0:PT=PT+3:GOTO 170 ' END OF REMARK 210 IF RK=1 THEN 580 220 IF TG=1 THEN TG=0:GOTO 500 ' THERE IS A TAG, DO NOT PRINT IT 225 IF TT=1 THEN TT$=TT$+CC$:NEXT PT 226 'PRINT CC$,TG 230 HDRAW CF$(ASC(CC$)) 240 IF BO THEN HDRAW"BL7;"+CF$(ASC(CC$))+"BR1" ' FOR BOLD GO BACK 9, REDRAW, AND 1 FORWARD 250 IF UN THEN HDRAW "BD8NL7NR1BU8" 260 IF IT THEN HDRAW "BL7;"+CF$(ASC(CC$))+"BR1" 'FOR ITALICS, DO BOLD :-( 270 HDRAW "BR3" ' SEPARATION BETWEEN CHARS 280 CP=CP+9*HE/4:IF CP>WH*.95 THEN CP=0:BR=1 500 REM 510 IF BR AND CE THEN GOSUB 4500 ' IF GOING DOWN A LINE AND CENTERED, CENTER IT 520 IF HR AND CP>0 THEN BR=1 ' IF
AND NOT FIRST CHAR IN LINE THEN BR 530 IF CR AND CP>0 THEN BR=1 ' THE SAME BUT WITH CENTER 540 CR=0 ' CLEAR THE "CENTER" FLAG USED FOR
550 IF BR THEN CP=0:BR=0:LP=LP+10*HE/4:HDRAW"BM2,"+STR$(LP) 560 IF HR THEN HE=HU:HR=0:HDRAW "S"+STR$(HE) 570 IF HC=1 THEN HDRAW"S4":HC=0:HE=4 ' IF TAG WAS CLOSED ... 580 NEXT PT 590 POKE 65496,0 600 REM 610 LINEINPUT #1,A$ 630 PRINT A$ 640 IF LEN(A$)=0 THEN 600 650 POKE 65497,0 660 GOTO 150 670 I$=INKEY$:IF I$="" THEN 670 680 IF I$="O" GOTO 4010 ' OPEN FILE FROM DISK 683 IF ASC(I$)=9 GOTO 115 685 IF I$="g" GOSUB 5000 689 GOTO 670 690 ' CLOSE FILES AND EXIT 700 PALETTE CMP 710 POKE 65496,0 720 CLOSE:UNLOAD 730 END 1000 ' IDENTIFY TAGS 1010 TG=1 ' FLAG IF THERE IS A TAG, SO IT WONT WRITE THE < 1020 T$=MID$(A$,PT,6) 1025 IF T$="" OR T$="" THEN PT=PT+4:BR=1:CE=0:GOSUB 4500:RETURN 1030 IF T$="" OR T$="" THEN PT=PT+5:RETURN 1040 IF T$="" OR T$="" THEN PT=PT+5:RETURN 1050 IF T$="" OR T$="" THEN PT=PT+5:RETURN 1060 T$=MID$(A$,PT,7) 1070 IF T$="" OR T$="" THEN PT=PT+6:RETURN 1080 IF T$="" OR T$="" THEN PT=PT+6:RETURN 1090 IF T$="" OR T$="" THEN PT=PT+6:RETURN 1100 IF T$="" OR T$="<title>" THEN TT=1:PT=PT+6:RETURN 1110 T$=MID$(A$,PT,3) 1120 IF T$="<B>" OR T$="<b>" THEN PT=PT+2:BO=1:RETURN 1130 IF T$="<U>" OR T$="<u>" THEN PT=PT+2:UN=1:RETURN 1140 IF T$="<I>" OR T$="<i>" THEN PT=PT+2:IT=1:RETURN 1150 IF T$="</H" OR T$="</h" THEN PT=PT+4:BR=1:HC=1:RETURN 1160 IF T$="<HR" OR T$="<hr" THEN PT=PT+3:LP=3+LP+10*HE/4:HLINE(0,LP-3)-(639,LP-3),PSET:CP=0:HDRAW"BM2,"+STR$(LP):RETURN 1170 IF T$="<P>" OR T$="<p>" THEN PT=PT+2:RETURN 1180 T$=MID$(A$,PT,4) 1190 IF T$="</B>" OR T$="</b>" THEN PT=PT+3:BO=0:RETURN 1200 IF T$="</U>" OR T$="</u>" THEN PT=PT+3:UN=0:RETURN 1210 IF T$="</I>" OR T$="</i>" THEN PT=PT+3:IT=0:RETURN 1220 IF T$="<BR>" OR T$="<br>" THEN PT=PT+3:BR=1:RETURN 1230 IF T$="<H1>" OR T$="<h1>" THEN PT=PT+3:HR=1:HU=12:UN=1:RETURN 1240 IF T$="<H2>" OR T$="<h2>" THEN PT=PT+3:HR=1:HU=12:RETURN 1250 IF T$="<H3>" OR T$="<h3>" THEN PT=PT+3:HR=1:HU=8:RETURN 1270 IF T$="<!--" THEN RK=1:PT=PT+3:RETURN ' THERE IS A REMARK 1280 T$=MID$(A$,PT,5) 1290 IF T$="<META" OR T$="<meta" THEN 600 1300 IF T$="<DIV " OR T$="<div " GOSUB 6500:RETURN 1320 T$=MID$(A$,PT,8) 1330 IF T$="<CENTER>" OR T$="<center>" THEN PT=PT+7:CR=1:CE=1:RETURN 1340 IF T$="" OR T$="" THEN PT=PT+7:TT=0:GOSUB 6000:RETURN 1350 T$=MID$(A$,PT,9) 1360 IF T$="" OR T$="" THEN PT=PT+8:BR=1:CE=0:GOSUB 4500:RETURN 1370 TG=0 ' THERE REALLY WAS NO TAG, SO FLAG GOES OFF 1990 RETURN ' NO TAGS FOUND 2000 REM DRAW SCREEN 2010 HLINE(0,8)-(640,8),PSET 2020 HCIRCLE (15,4),9,0,.5,.25,.75 2030 HPRINT(3,0),"Prev. Page" 2040 HCIRCLE(120,4),9,0,.5,.75,.25 2050 HPRINT(17,0),"Next Page" 2060 HDRAW"BM 230,1;R10D5L10NU5E4R9G4L9" 2070 HPRINT(31,0),"Open File" 2080 HGET(229,0)-(245,8),1 2090 RETURN 3000 REM LOAD FONTS 3010 'HSCREEN 2:HCLS 3020 'HDRAW"BM9,100" 3030 FOR A=32 TO 122 3040 READ C$ 3050 CF$(A)=C$ 3060 'IF A>86 THEN HDRAW C$: HDRAW"BR3" 3070 NEXT A 3080 RETURN 3090 DATA "BR6","BR3D3BD2D1BU6BR3",,,,,,, 3100 DATA ,,,"BD5BR3ND2BR3BU5","BD3R6BU3","BD6BR3R1BR2BU6", 3110 DATA "BR2R2F2D2G2L2H2U2E2BR4NG6","BR3NG2D6NL1NR1U6BR3","ND1R6D2G1L4G1D2R6BU6","R6D2G1F1D2NL6BU6","BR6G1L1G1L1G1L1R6ND3U3","BD3R5F1D1G1L5BU6R6" 3120 DATA "BR2NR4G2D3F1R4E1U1H1NL5BU3R1","R6NG6","D6NR6U3NR6U3R6ND6","ND3R6D3NL6NG3U3" 3130 DATA "BR3D1BD4D1BR3BU6","BR3D1BD4D2BR3BU7",,,,"BD1E1R4F1D1G1L1D2BD1D1BR3BU7", 3140 DATA "ND6R6D3NL6D3BU6","D6R4E1U1H1NL3E1U1H1L4BR6","D6R6BU6NL6","D6R4E2U2H2NL4BR2","D6NR6U3NR6U3R6","D6U3NR4U3R6" 3150 DATA "D6R6U3NL4BU3NL6","D3ND3R6ND3U3","BR3ND6BR3","BD4F2R2E2U4","D6U3R3NF3E3 3160 DATA "D6R6BU6","ND6F3E3ND6","ND6F6U6","D6R6U6NL6","R6D3L6ND3U3R6" 3170 DATA "D6R6NF1NH2U6NL6","D6U3R3NF3R3U3NL6","D3R6D3L6BU6R6","R3ND6R3","D6R6U6" 3180 DATA "D2R1D2R1D2R2U2R1U2R1U2","D6E3F3U6","F6H3G3E6","F3ND3E3","R6G6R6BU6" 3190 DATA ,,,,, 3200 REM MINUSCULAS 3210 DATA "BD2R5D2L5D2R5U4BU2BR1","D6R5U3L5U3BR6","BD2NR5D4NR5BU6BR6","BR6D6L5U3R5U3","BD2R5D2L5NU2D2R5BR1BU6" 3220 DATA "BD2NR5D2NR5ND3BR6BU4","BR1BD2ND4R5D4NL5D2NL4BU8","D6U3R5D3BU6BR1","BR3D1BD2D3NL1BR3BU6","BR3D1BD2D5NL2BU8BR3" 3230 DATA "D6U2R1NE2NF2BR5BU4","D6R2BR4BU6","BD2ND4R2F1ND3E1R2D4BU6","BD2ND4R5D4BR1BU6","BD2BR1R4D4L4U4RBR5BU2","BD2R5D4L5NU4ND3BR6BU6" 3240 DATA "BD2D4R5ND3U4NL5BR1BU2","BD1D5U4R4BR2BU2","BD2NR5D2R5D2NL5BU6BR1","BR3D2NL2NR2D4BR3BU6" 3250 DATA "BD2BR1D4R4U4BR1BU2","BD2BR1D2F2E2U2BR1BU2","BD2D4E3F3U4BU2","BR3BD4NE2NF2NG2NH2BR3BU4" 3260 DATA "BR1BD2D2F1R2E1D3U5BU2","BR1BD2R4G4R4BR1BU6" 3270 DATA ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 4000 REM OPEN A FILE FROM DISK 4010 HSCREEN 0:CLS 6 4020 CLOSE #1 4025 DIR 4030 PRINT:PRINT"Drive #";PEEK(&H95A); 4031 FOR Z=0 TO 23:LOCATE20,Z:PRINT"!";:NEXT Z 4032 LOCATE 22,1:PRINT"To change the";:LOCATE 22,2:PRINT"disk drive, enter"; 4033 LOCATE 22,3:PRINT"D0 to D3 as the";:LOCATE 22,4:PRINT"file name"; 4040 LOCATE 22,10:PRINT"FILE TO OPEN";:LOCATE 22,11:PRINTSTRING$(17," "); 4042 LOCATE 22,11:INPUT FO$ 4043 IF FO$>="D0" AND FO$<="D3" THEN DRIVE VAL(RIGHT$(FO$,1)):GOTO 4010 4050 POKE 65496,0 4060 OPEN "I",#1,FO$ 4070 IF EOF(1)=-1 GOTO 4120 4080 LINEINPUT #1,A$ 4090 POKE 65497,0 4100 GOSUB 5020 4110 GOTO 100 4120 CLOSE #1 4130 POKE 65497,0 4140 GOTO 670 4500 REM CENTER TEXT 4505 DX=INT((WH-CP)/2) 4510 Y=HE/4 4511 X=INT(CP/160)+1 4512 FOR GY=1 TO Y 4515 GC=0 4516 FOR GX=1 TO X 4518 GC=GC+1 4520 HGET(160*(GX-1),LP+(9*(GY-1)))-(160*GX,LP+9*GY-1),GC 4525 PRINT LP+(8*(GY-1));LP+8*GY-1 4527 HLINE(160*(GX-1),LP+(9*(GY-1)))-(160*GX,LP+9*GY-1),PRESET,BF 4530 NEXT GX 4533 GC=0 4534 PRINT 4535 FOR GX=1 TO X 4537 GC=GC+1 4549 PRINT LP+(8*(GY-1));LP+8*GY-1 4550 HPUT(160*(GX-1)+DX,LP+(9*(GY-1)))-(160*GX+DX,LP+9*GY-1),GC,PSET 4555 NEXT GX,GY 4560 RETURN 5000 ' SWITCH SCREEN RESOLUTION 5010 IF WH=640 THEN WH=320 ELSE WH=640 5020 IF WH=640 THEN HSCREEN 4 ELSE HSCREEN 2 5030 RETURN 5500 ' ERROR TRAPPING ROUTINE 5510 IF ERNO=31 THEN EM$="INVALID FILE NAME":GOTO 5600 5540 IF ERNO=22 THEN GOTO 670 5560 IF ERNO=23 AND ERLIN=700 THEN 4120 5570 IF ERNO=23 AND ERLIN=610 THEN CLOSE:GOTO 670 5580 IF ERNO<>26 THEN PRINT"ERROR #";ERNO;" IN LINE";ERLIN:END 5589 IF LEN(FO$)<4 THEN FO$=FO$+".HTM":GOTO 4050 5590 IF MID$(FO$,LEN(FO$)-3,1)<>"." AND MID$(FO$,LEN(FO$)-3,1)<>"/" THEN FO$=FO$+".HTM":GOTO 4050 5595 EM$="FILE NOT FOUND" 5600 LOCATE 22,13:ATTR 0,5,B:PRINT EM$:ATTR 0,5:GOTO 4040 6000 REM PRINT TITLE OF WEB PAGE 6010 HPRINT(45,0),TT$ 6020 TT$="" 6030 RETURN 6500 REM SEARCH WITHIN DIV TAG 6510 AL=0 6520 FOR PD=PT+4 TO LEN (A$) 6530 IF MID$(A$,PD,1)=">" THEN 6590 6540 ST$=MID$(A$,PD,5) 6550 IF ST$="ALIGN" OR ST$="align" THEN AL=1 6560 ST$=MID$(A$,PD,6) 6570 IF (ST$="CENTER" OR ST$="center") AND AL=1 THEN CR=1:CE=1 6580 NEXT PD 6590 PT=PT+PD-1 6600 RETURN