10 FOR I=&HC000 TO &HC021 20 READ A$ : A=VAL("&H"+A$) 30 POKE I,A : NEXT 40 DEFUSR=&HC000:S=USR(0):NEW 50 DATA F3,21,00,00,E5,3A,20,C0 60 DATA D3,A8,E1,7E,F5,E5,3A,21 70 DATA C0,D3,A8,E1,F1,77,7C,FE 80 DATA 80,28,03,23,18,E6,FB,C9 90 DATA F0,FF 100 ' No Expert mude a linha 90 para DATA A0,AA
10 OPEN"GRP:" FOR OUTPUT AS#1 15 COLOR N 20 PSET(100,40):PRINT#1,"...TEXTO..."Onde N é a cor desejada para a escrita. Abaixo é apresentado um programa exemplo mostrando os seus recursos.
10 COLOR 1,15,9 20 SCREEN 2 30 FOR F=0 TO 191 STEP 20 40 LINE(0,96)-(255,F),11: LINE(255,96)-(0,F),11 50 NEXT 60 OPEN"GRP:" FOR OUTPUT AS#1 70 COLOR 1 80 PSET(40,40):PRINT#1,"Andre" 85 COLOR 13 90 PSET(60,180):PRINT#1,"Programa Escrita" 100 GOTO 100
10 CLS:E=&HF309:A$="> "+CHR$(29)+ CHR$(29) 20 PRINT A$;:I$=INPUT$(1):POKE E,ASC (I$):PRINT I$;:IF I$=CHR$(8) AND E> &HF309 THEN E=E-1:GOTO 20 ELSE IF I$=CHR$(13) THEN POKE E+1,13:POKE E+2,10:POKE E+3,0:END ELSE E=E+1: GOTO 20 1000 CLEAR 200,&HF300:FOR F=&HFF07 TO &HFF09: READ A$:POKE F,VAL("&H" +A$):NEXT 1010 FOR F=&HF300 TO &HF313:READ A$: POKE F,VAL("&H"+A$):NEXT 1020 DATA C3,0,F3,CD,23,73,21,9,F3, C3,31,41,52,65,61,64,79,7,7,7,D,A,0
10 SCREEN 1:IC=BASE(6):READ JC:K=0 20 FOR I=IC TO IC+31 30 K=K+1:IF K=1 THEN READ A,B 40 IF K<=JC THEN VPOKE I,(A*16+ B):NEXT I:END:ELSE K=0:READ JC: GOTO 30 50 DATA 2,7,1,2,1,3,1,7,1,1,15,1,2, 12,1,4,13,1,9,10,1,1,12,1,1,10,1, 1,12,1,4,11,8,3,7,1,1,10,1
1. POKE 62384,N Faz o tabulamento horizontal semelhante a WIDTH. (mínimo 1 e máximo 40) 2. POKE 62385,N Faz o tabulamento vertical. (mínimo 1 e máximo 24) 3. POKE 62428,N Coloca o cursor na linha N. (mínimo 1 e máximo 24) 4. POKE 62429,N Coloca o cursor na coluna N. (mínimo 1 e máximo 40)
5. POKE 64681,N Se N for qualquer valor exceto 0, o cursor irá aparecer após uma impressão. 6. POKE 64683,N Se N for qualquer valor exceto 0, só poderão ser impressas letras maiúsculas. 7. POKE 64687,255 Executa um CLS. Se estiver em uma linha de programação, o CLS será executado após STOP.
10 STOP ON 20 ON STOP GOSUB 100 30 PRINT"MICRO SISTEMAS" 40 GOTO 40 100 CLS:PRINT"Uma tentativa de BREAK foi feita." 110 FOR I=1 TO 2000:NEXT I 120 RETURN 30
10 COLOR 13,1:F=1:SCREEN 2 20 FOR X=1 TO 90 30 CIRCLE(120,100),F 40 F=F+1:NEXT X 50 GOTO 50
PRINT 28815-FRE(1)O resultado será a memória ocupada pelo seu programa.
10 CLS 20 OPEN"GRP:" AS#1 30 SCREEN 3 40 PRESET(80,72) 50 PRINT#1,"MSX" 60 COLOR RND(1)*15 70 GOTO 40
10 SCREEN 3 20 OPEN"GRP" AS#1 30 PRESET(10,20):PRINT#1,"MAURICIO" 40 PRESET(50,70):PRINT#1,"M S X" 50 PRESET(70,130):PRINT#1,"1986" 60 FOR I=1 TO 3000:NEXT I 70 CLOSE
10 SCREEN 2 20 C=2+14*RND(-TIME) 30 R=70*RND(-TIME) 40 CIRCLE(255*RND(-TIME), 191*RND (-TIME)),R,C 50 GOTO 20
10 READ N$:SCREEN 2:FOR A=1 TO LEN(N$) 20 C=&H1BBF+8*ASC(MID$(N$,A,1)) 30 Y=60:FOR C=C TO C+7:X=X1 40 B$=BIN$(256+PEEK(C)):FOR B=2 TO 9 50 IF VAL(MID$(B$,B,1)) THEN LINE (X,Y)-(X+2,Y+4),8,BF 60 X=X+2:NEXT B:Y=Y+5:NEXT C 70 X1=X1+15:NEXT A:B$=INPUT$(1) 80 DATA "Clodoaldo"
1 CLS 2 KEY OFF 4 INPUT "DE UM VALOR PARA G (0 ATE 254 )";G 9 COLOR 15,1,1 10 SCREEN 2 11 H=0 12 H=H+2 13 IF H=G THEN GOTO 20 14 LINE(127,0)-(H,92),15 15 LINE(127,192)-(H,92),4 16 GOTO 12 20 FOR F=0 TO 255 30 PSET(0,F),15 40 PSET(F,0),15 41 PSET(255,F),15 42 PSET(F,191),15 45 NEXT F 50 FOR R=0 TO 450:NEXT 60 GOTO 1
10 TIME=0:N=1 20 SCREEN 2 30 FOR I=0 TO 60 40 K=INT(RND(-TIME)*15) 50 CIRCLE(120,100),N,K 60 N=N+2 70 NEXT 80 FOR I=0 TO 1000:NEXT:GOTO 20Depois, experimente mudar a linha 50 para:
50 CIRCLE(120,100),N,K,,,.4E acrescente:
55 CIRCLE(120,100),N,K,,,3
10 COLOR 15,1,1:SCREEN 2 20 H=255 30 V=191 40 LINE(255-H,191-V)-(H,V),,B 50 H=H-6 60 V=V-6 70 IF H=69 AND V=5 THEN 90 80 GOTO 40 90 C=INT(RND(-TIME)*15)+1 100 SOUND 0,200:SOUND1,0:SOUND6,20: SOUND7,238:SOUND8,16:SOUND9,16: SOUND11,90:SOUND12,1:SOUND13,10 110 COLOR ,,C 120 GOTO 90Atenção: se você sofre de algum tipo de FOTOFOBIA ou alguma sensibilidade a luz piscante, NÃO RODE este programa.
5 SCREEN 1:CLS:FOR X=0TO255:VPOKE X+ 6144,X:NEXTX 10 FOR X=0 TO 2048 STEP 8 20 VPOKE X,VPEEK(X)/8 30 VPOKE X+1,VPEEK(X+1)/8 40 VPOKE X+2,VPEEK(X+2)/4 50 VPOKE X+3,VPEEK(X+3)/4 60 VPOKE X+4,VPEEK(X+4)/2 70 VPOKE X+5,VPEEK(X+5)/2 80 NEXT X:LOCATE 6,12 90 PRINT"TABELA REDEFINIDA"
1 A=PEEK(&HF6C2)+256*PEEK(&HF6C3)-1 2 FOR K=A TO &H8000 STEP -1 3 IF PEEK(K-5)=0 AND PEEK(K)=143 THEN POKE(K-1),255:POKE(K-2),250:GOTO 5 4 NEXT 5 END
5 SCREEN 2 10 '****************** 20 '* TUNEL DO TEMPO * 30 '****************** 40 LET X=30:LET Y=25 50 LET C=INT(RND(-TIME)*16) 60 FOR X=30 TO 220 STEP 5 70 CIRCLE(X,Y),15,C 80 LINE(125,100)-(X,Y),C 90 NEXT X:BEEP 100 FOR Y=25 TO 165 STEP 5 110 CIRCLE(X,Y),15,C 120 LINE(125,100)-(X,Y),C 130 NEXT Y:BEEP 140 FOR X=225 TO 30 STEP -5 150 CIRCLE(X,Y),15,C 160 LINE(125,100)-(X,Y),C 170 NEXT X:BEEP 180 FOR Y=170 TO 25 STEP -5 190 CIRCLE(X,Y),15,C 200 LINE(125,100)-(X,Y),C 210 NEXT Y:BEEP 220 GOTO 40
10 CLS:INPUT"ENDERECO ";E:IF E<0 THEN E=E+65536! 20 PRINT RIGHT$("000"+HEX$(E),4):PRINT USING" ##### ";E;:PRINT RIGHT$("0"+ HEX$(PEEK(E)),2);" - ";:POKE&HFCAB,255: A$=INPUT$(2):PRINTA$:C=VAL("&H"+A$):IF A$<>RIGHT$("0"+HEX$(C),2) THEN END ELSE POKE E,C:E=E+1:GOTO 20
10 OPEN"GRP:" FOR OUTPUT AS#1 20 CLS:INPUT H,M,S:SCREEN 3 30 ON INTERVAL=60 GOSUB 1000: INTERVAL ON 40 GOTO 40 1000 BEEP:CLS:S=S+1:IF S=60 THEN S=0:M=M+1:IF M=60 THEN M=0: H=H+1:IF H=13 THEN H=1 1010 PRESET(0,90):PRINT#1,USING"##:" ;H;M;:PRINT#1,USING"##";S:RETURN
10 REM ALIENIGENAS 20 SCREEN 2,3 30 A$=CHR$(&B01000010) 40 B$=CHR$(&B00100100) 50 C$=CHR$(&B00011000) 60 D$=CHR$(&B01111110) 70 E$=CHR$(&B10000001) 80 F$=CHR$(&B01000010) 90 G$=CHR$(&B11111111) 100 H$=CHR$(&B10000001) 110 SPRITE$(0)=A$+B$+C$+D$+E$+F$+G$+H$ 120 FOR F=127 TO 1000 130 PUT SPRITE 0,(F-120,F-5),7,0 140 PUT SPRITE 1,(F+20,F-20),4,0 150 PUT SPRITE 2,(F-50,F+120),8,0 160 PUT SPRITE 3,(F-20,F+20),12,0 170 NEXT 180 GOTO 120
10 SOUND 7,247:SOUND 8,16:SOUND 13,8 20 SOUND 6,11:SOUND 11,0:SOUND 12,7 30 FOR F=1 TO 1000:NEXT 40 SOUND 12,3:SOUND 6,5 50 FOR F=1 TO 200:NEXT 60 GOTO 20
10 GOSUB 20 20 A=INP(170):B=(240 AND A) OR 7:OUT 170,B:C=INP(169):IF C=191 THEN PLAY "CDEFGAB":RETURN 30 GOTO 10Obs: se trocar o 191 por 247, você ativará a tecla <TAB>.
10 REM * SUPER EFEITO * 20 REM 30 SCREEN 0:WIDTH 40 40 COLOR 4,15,14 50 KEY OFF 60 FOR A=0 TO 879 70 PRINT CHR$(255); 80 NEXT A 90 PRINTApós digitá-la, pressione a tecla F5, espere um pouco, e quando aparecer um OK, passe o cursor em cima do nome escrito e veja o que acontece.
10 REM MSX SUL 20 DEFINT R:SOUND 10,9:SOUND 5,0: SOUND 9,9:SOUND 3,0:FOR G=4 TO 127 STEP .25:FOR R=0 TO 255 STEP G: SOUND 4,R:SOUND 2,63+R*.5:NEXT 30 FOR R=255 TO 0 STEP -G: SOUND 4,R: SOUND 2,63+R*.5:NEXT:NEXT:SOUND 10,0: SOUND 9,0
10 REM CARLOS 20 SCREEN 2:PSET(128,96) 30 FOR X=0 TO 255 40 FOR T=0 TO 3 50 V=INT(RND(TIME)*15):COLOR V 60 DRAW"U18F18D8H18" 70 DRAW"S=X;":DRAW"A=T;" 80 SOUND 0,X:SOUND 1,T:SOUND 8,15 90 NEXT T 100 NEXT X 110 GOTO 110Tente estes exemplos alterando a linha 60:
60 DRAW"E20F20G20H20"Catavento:
60 DRAW "E2F2L4"
10 COLOR 7,4,4:SCREEN 2:PI=4*ATN(1) 20 FOR N=0 TO 2*PI STEP .1 30 X1=128+90*COS(N):X2=128+90*COS (N+PI/1.5):Y1=96+90*SIN(N):Y2=96+ 90*SIN(N+PI/1.5) 40 LINE(X1,Y1)-(X2,Y2) 50 NEXT N 60 FOR R=45 TO 0 STEP -1 70 CIRCLE(128,96),R 80 NEXT R 90 GOTO 90
10 COLOR15,1,1:SCREEN 2:OPEN"GRP:"AS#1 20 LINE(20,20)-(240,180),14,BF 30 LINE(25,15)-(245,175),15,BF 40 FOR A=0 TO 1:RESTORE 80 50 FOR B=1 TO 4:READ M$:COLOR 1 60 PRESET(A+35, (B*10)+20):PRINT#1,M$ 70 NEXT:NEXT 80 DATA Nelson, Mogi das Cruzes - SP, MICRO SISTEMAS, 12 de marco de 1987 90 GOTO 90
10 SCREEN 2 20 FOR X1=0 TO 255 30 X2=255-X1 40 C=C+1:IF C=16 THEN C=0 50 LINE(X1,0)-(X2,191),C 60 NEXT X1 70 FOR Y1=0 TO 191 80 Y2=191-Y1 90 F=F+.1:IF F=16 THEN F=0 100 D=INT(F) 110 LINE(0,Y1)-(255,Y2),D 120 NEXT Y1
10 REM ESCULTURAS 20 K=75 30 C=150 40 SCREEN 2 50 PSET(128,177) 60 FOR I=0 TO C*2 STEP C/30 70 K=K-.25 80 IF K<0 THEN 140 90 X=128+K*SIN(I) 100 Y=88+K*COS(I)*1.2 110 LINE-(X,Y) 120 NEXT 130 GOTO 60 140 GOTO 140
10 SCREEN 2:DEFUSR1=&H41:DEFUSR2=&H44: R=RND(-TIME):C=1 20 A=USR1(0) 30 FOR T=1 TO 14:A=RND(1)*256:B=RND(1) *191:R=RND(1)*50:C=C+1 40 CIRCLE(A,B),R,C:PAINT(A,B),C 50 NEXT:BEEP 60 A=USR2(1) 70 IF INKEY$="" THEN 70 ELSE SCREEN 0: LIST
10 ON ERROR GOTO 10000: ' VAI P/ O FINAL DO PROGRAMA 20 : 30 : 40 : 9999 END 10000 CLS:PRINT "ERRO N.";ERR; "NA LINHA";ERL 10010 LIST.: 'LISTA A LINHA ONDE OCORREU O ERRO 10020 END
10 'exemplo de entrada de dados por janela em tela de alta resolucao 20 'JOCELYN 30 'PORTO ALEGRE 40 'BRASIL 50 COLOR 1,14,4:SCREEN 2:CLS: DIM A$(30):LET N=1:LET C=80 60 LINE(22,22)-(232,172),1,BF 70 LINE(20,20)-(230,170),11,BF 80 LINE(25,25)-(225,165),1,BF 90 LINE(26,26)-(224,164),11,BF 100 OPEN"GRP:" FOR OUTPUT AS#1 110 PSET(30,30),11:PRINT#1,"nome:" 120 A$(N)=INPUT$(1) 130 IF A$(N)=CHR$(127) THEN C=C-8: N=N-1:PSET(C,30),11:COLOR11: PRINT#1," ":GOTO 120 140 IF A$(N)=CHR$(13) THEN 180 150 COLOR 1 160 PSET(C,30),11:PRINT#1,A$(N) 170 N=N+1:C=C+8:GOTO 120 180 FOR F=1 TO N:W$=W$+A$(F): NEXT F 190 PSET(30,100):PRINT#1,W$ 200 GOTO 200
10 SCREEN 2:COLOR 15,1,1:CLS: DEFINT A-X 20 OPEN"GRP:" FOR OUTPUT AS#1 30 PRESET(60,80):PRINT#1,"MICRO SISTEMAS":REM FORMATO NORMAL 40 A$="MICRO SISTEMAS":REM STRING A SER ESCRITA EM 40 COLUNAS 50 C=10:L=12:REM SUBSTITUI LOCATE 60 GOSUB 1000 70 A$="NOTOU A DIFERENCA ?" 80 C=10:L=14 90 GOSUB 1000 100 LINE(50,70)-(182,128),10,B 110 GOTO 110 1000 REM ROTINA 40 COLUNAS 1010 FOR P=1 TO LEN(A$) 1020 B$=MID$(A$,P,1) 1030 PRESET(C*6,L*8):PRINT#1,B$ 1040 C=C+1:IF C>40 THEN C=0:L=L+1 1050 NEXT P 1060 RETURN
POKE &HFF89,&HC1Este destrava:
POKE &HFF89,&HC0
5 '------------------ EFEITOS GRAFICOS ------------------ 10 COLOR 15,1,1:SCREEN 2 20 C=1.71 30 FOR I=1 TO 45 40 PSET(SIN(I)*C*20+100,COS(I) *C*20+95) 50 DRAW"U50R50D50L50" 60 NEXT I 70 GOTO 70
10 CLEAR100:DIM E$(10):KL=0:CLS 20 E$(1)="PROGRAMADO POR" 30 E$(2)="Sidney" 40 DF=8:KL=KL+1:IF KL=3 THEN KL=1 50 FOR L=1 TO LEN(E$(KL)) 60 A$=MID$(E$(KL),L,1):DF=DF+1: A=1:B=1 70 LOCATE A,B:PRINT A$ 80 LOCATE A-1,B-1:PRINT SPC(1) 90 A=A+1:B=B+1:IF A=DF THEN GOTO 110 100 GOTO 70 110 B=B-1 120 LOCATE A-1,B:PRINT A$ 130 LOCATE A-1,B+1:PRINT SPC(1) 140 B=B-1:IF B=6 THEN GOTO 160 150 GOTO 120 160 NEXT L 170 FOR H=34 TO 0 STEP -1 180 LOCATE H,7:PRINT CHR$(208);SPC(1) 190 NEXT H:LOCATE 0,7:PRINT" ": GOTO 40
5 SCREEN 3 10 FOR A=150 TO 1 STEP -2 15 CIRCLE(125,90),A,RND(1)*16 16 N=N+1:IF N=16 THEN N=2 17 COLOR ,,N 20 NEXT 25 FOR A=1 TO 150 STEP 2 30 CIRCLE(125,90),A,RND(1)*16 32 N=N+1:IF N=16 THEN N=2 33 COLOR ,,N 35 NEXT 40 GOTO 10
10 COLOR 15,1,1:SCREEN 2 20 FOR C=2 TO 15 30 FOR Y=-1 TO 8:FOR X=-1 TO 10 40 A=X*20:B=Y*30 50 LINE(11+A,11+B)-(29+A,19+B),C,BF 60 LINE(26+A,26+B)-(44+A,34+B),C,BF 70 LINE(16+A,21+B)-(24+A,39+B),C,BF 80 LINE(31+A,6+B)-(39+A,24+B),C,BF 90 NEXT:NEXT:NEXT:GOTO 20
10 DATA 3E,EC,21,0,0,11,1D,EC,1,0,4, F5,3A,AF,FC,B9,28,2,26,18,F1,BA,CA, 59,0,EB,C3,5C,0 20 FOR Y=0 TO 28:READ X$:POKE &HEC00 +Y,VAL("&H"+X$):NEXT Y 30 X=&HEC00:DEFUSR=X:DEFUSR1=X+2 40 FOR X=0 TO 479:PRINT".*";:NEXT X: X=USR(0) 50 CLS:PRINT"Pressione algo para recuperar a tela ...":A$=INPUT$(1): X=USR1(0)Usar:
10 PLAY"O5L14S10M2000","O6L14S2M4500" 20 PLAY"BBBBDGBDGBDGBDGA#DGA#DGA#", "BBBBDGBDGBDGBDGA#DGA#DGA#" 30 PLAY"DGA#DGBDGBDGBC#C#C#BBBBA#AG#G ..","DGA#DGBDGBDGBC#C#C#BBBBA#AG#G..." 40 ' A LINHA 10 DEFINE O TIMBRE
10 CLEAR 200,&HC000:FOR A=&HC000 TO &HC027:READ A$:POKE A,VAL("&H"+A$): NEXT 20 DEFUSR=&HC000 30 A=USR(0):END 40 ' 50 DATA AF,32,17,FC,0E,08,06,F7,2A,24 60 DATA F9,C5,CD,A5,0B,1E,17,0E,08,43 70 DATA 10,FE,CD,45,07,0E,08,09,C1,10 80 DATA EC,0D,20,E4,CD,C3,00,C3,1E,07
10 Y=(RND(1)*3)+1:FOR R=1 TO Y 20 G=RND(1)*8: FOR T=1 TO G 30 FOR F=1 TO 50:SOUND 0,F:SOUND 1,0: SOUND 7,254: SOUND 8,15 40 NEXT F 50 H=RND(1)*15:FOR T=1 TO H 60 FOR F=50 TO 60:SOUND 0,F:SOUND 1,0:SOUND 7,254:SOUND 8,15:NEXT F 70 NEXT T,R 80 SOUND 8,0 90 C=(RND(1)*50)+200:FOR V=1 TO C: NEXT V 100 GOTO 10
10 REM Enderecos em disco 20 CLS:INPUT"QUAL O NOME DO PROGRAMA"; A$ 30 OPEN A$ FOR INPUT AS#1 40 A$=INPUT$(1,#1) 50 B$=INPUT$(6,#1) 60 FOR K=1 TO 6 70 D(K)=ASC(MID$(B$,K,1)) 80 NEXT 90 FOR P=1 TO 6 100 BN$(P)=HEX$(D(P)*256) 110 NEXT 120 FOR P=1 TO 6 130 IF LEN(BN$(P))=1 THEN BN$(P)=BN$(P) +"000" 140 BN$(P)=MID$(BN$(P),1,2):NEXT 150 PRINT"END INICIAL: ";"&H";BN$(2)+ BN$(1) 160 PRINT"END FINAL : ";"&H";BN$(4)+ BN$(3) 170 PRINT"END EXEC. : ";"&H";BN$(6)+ BN$(5) 180 CLOSE 1 190 INPUT"RETURN PARA NOVA PESQUISA";D: GOTO 10
10 CLEAR 200,&HD600 20 CLS 30 INPUT"NOME DO ALFABETO";A$ 40 BLOAD A$,&H4400 50 POKE &HF91F,INP(&HA8)/&H40:POKE &HF920,0:POKE &HF921,&HD6 60 SCREEN 1Obs: para voltar com o alfabeto original do MSX, digite:
POKE &HF91F,0 : ' Slot ID POKE &HF920,&HBF : ' Endereco POKE &HF921,&H1B : ' SCREEN 0
10 SCREEN 1 20 E=&HC000 30 FOR I=E TO E+24:READ A$:POKE I,VAL ("&H"+A$):NEXT 40 DEFUSR=E:A=USR(0) 50 DATA 21,00,00,CD,4A,00,47,CB 60 DATA 0F,B0,CD,4D,00,23,3E,07 70 DATA BC,20,F0,3E,FF,BD,20,EB,C9
1 ' --------- --------- 2 ' : ABRE - TELA : 3 ' --------- --------- 4 ' 10 DATA 06,10,C5,11,01,18,06 20 DATA 18,DD,21,1D,00,C5,D5 30 DATA DD,19,06,0F,DD,E5,D5 40 DATA E1,CD,4A,00,2B,CD,4D 50 DATA 00,13,E1,CD,4A,00,23 60 DATA CD,4D,00,DD,2B,10,E8 70 DATA 2B,3E,20,CD,4D,00,EB 80 DATA 2B,3E,20,CD,4D,00,D1 90 DATA C1,21,20,00,19,EB,10 100 DATA C8,C1,10,BF,C9 110 FOR X=&HA000 TO &HA043 120 READ M$:POKE X,VAL("&H"+M$) 130 NEXT 140 SCREEN 1 150 LIST 160 DEFUSR=&HA000Após digitar e rodar o programa, dê o comando direto:
A=USR(0)
10 SCREEN 2 20 FOR F=0 TO 285 30 Z=RND(1)*255:X=RND(1)*192 40 PSET(Z,X),15 50 NEXT 60 FOR D=0 TO 85 STEP 2 70 Z=RND(1)*255:X=RND(1)*192: H=RND(1)*14+1 80 LINE(128,80)-(Z,X),4 90 CIRCLE(Z,X),8,H 100 PAINT(Z,X),H 110 NEXT 120 OPEN"GRP:" AS#1 130 PSET(48,8) 140 PRINT#1,"Ednei" 150 GOTO 150
1 ' Gere o texto usando o HOT-ASM 2 ' Peca a funcao MAP 3 ' Chame o BASIC 4 ' Grave o texto em disco usando BSAVE"A:NOME.HAS",INIC,FIM onde: INIC= &H8100 FIM = end. final HAS = ext. do HOT-ASM 5 ' Salve no disco os dados da funcao MAP com o nome do arquivoPara ler, siga este procedimento:
1 ' Leia o texto com BLOAD"A:NOME.HAS" 2 ' Leia os dados da funcao MAP no arquivo gerado como acima 3 ' Chame o editor do HOT-ASM com CALL EDT 4 ' Chame a funcao 'M EC00' do editor do HOT-ASM e modifique os dados dos seguintes enderecos: &HEC00 - 3D &HEC01 - 00 &HEC02 - 81 &HEC03 - LSB-1 &HEC04 - MSB 5 ' MSB e LSB do endereco final dado pela funcao MAP
10 DEFINT A: FOR A=0 TO 58:READ A$:POKE &HD000+A,VAL("&H"+A$):NEXT 20 DATA 2A,24,F9,11,00,01,19,E5,11,20, 04,19,EB,E1,01,D8,02,CD,4A,00,2F,EB, CD,4D,00,EB,23,13,0B,78,B1,20,F0,C9,3A, 63,F6,FE,03,C0,1A,B7,C8,47,EB,23,5E,23, 56,1A,C6,84,CD,A2,00,13,10,F7,C9 30 DEFUSR=&HD000:DEFUSR1=&HD022: A=USR(0)Veja um exemplo de como obter o efeito de FLASH:
10 CLS:KEYOFF:WIDTH39 20 LOCATE11,10:PRINT" Micro Sistemas " 30 LOCATE3,13:PRINT"a primeira revista brasileira de":PRINTTAB(11);"micro computadores" 40 FOR A=1 TO 500:NEXT:LOCATE 11,10 50 A$=USR1(" Micro Sistemas ") 80 FOR A=1 TO 500:NEXT:GOTO 20
10 A$="V15M2000S11T255O3CCEEGGAAA#A#AA GGEE" 20 B$="V15FFAACCDDD#D#DDCCO3AA" 30 C$="V15GGBBO4DDEEO3FFAAO4CCDD" 40 PLAY A$+A$:PLAY B$+A$:PLAY C$+A$ 50 PLAY"O4":BEEP 60 END
10 CLEAR 200,&HDE00 20 FOR J=0 TO 62:READ A$:POKE &HDE00+J, VAL("&H"+A$):NEXT 30 DATA DB,A8,4F,32,3D,DE,E6,30,1F,1F, B1,32,3E,DE,21,0,0,11,0,40,1,0,40,D3, A8,CD,50,0,F3,CD,14 40 DATA 7,3A,3D,DE,D3,A8,C9,3A,3E,DE, 21,0,0,11,0,40,1,0,40,D3,A8,CD,53,0, F3,CD,48,7,18,E3,0,0Exemplo:
10 SCREEN 2 20 FOR J=0 TO 10 30 X=RND(1)*255:Y=RND(1)*192:C=RND (1)*15:X1=RND(1):X2=RND(1)*192 40 LINE(X,Y)-(X1,X2),C,BF 50 NEXT 60 DEFUSR1=&HDE00 : ' Arquiva 70 DEFUSR2=&HDE26 : ' Repoe 80 A=USR1(0) 90 A$=INKEY$:IF A$="" THEN GOTO 90 100 CLS:A=USR2(0) 110 GOTO 110
10 H=RND(-TIME) 20 SOUND 8,13:SOUND 7,254: SOUND 1,0 30 SO=RND(1)*85 40 FOR MA=15 TO SO 50 SOUND 0,MA 60 NEXT 70 GOTO 20
10 PLAY"T90","T90","T90" 20 PLAY"V15L16O4EE-CO3AA-AO4CD-EE- CO3AA-AO4CE-","V15O3E2E-4F4","V15 O2A2A-4F4" 30 PLAY"V15L16O4AA-ECBCO3BO4AA-EC O5CO4BDAE","V15O3E2E-4F4","V15O2A 2A-4F4" 40 PLAY"V15L16O4EE-CO3AA-AO4CD-EE- CO3AA-AO4CE-","V15O3E2E-4F4","V15 O2A2A-4F4" 50 PLAY"V15L16O4AA-ECBCO3BO4AA-EC O5CO4BDAE","V15O3E2E-4F4","V15O2A 2A-4F4" 60 PLAY"V15T35O4A4","V15T35O4C4", "V15T35O2A4"Experimente alterar o valor de T na linha 10.
10 CLS 20 X=60000!:DEFUSR=X 30 READ A$:IF A$="FIM" GOTO 60 40 POKE X,VAL("&H"+A$):X=X+1:GOTO 30 50 DATA 21,90,EA,3E,00,77,23,77,23,77, 2B,2B,16,01,06,0A,DB,AA,E6,F0,05,B0, 04,C5,D3,AA,DB,A9,06,08,CB,3F,38,02, 72,23,14,10,F7,C1,10,E6,C9,FIM 60 O=2^(1/12):DEFINT P:DIM P(100,1) 70 INPUT"Qual a frequencia de seu do"; DO:INPUT"1 ou 2 teclados";TE 80 IF TE=1 THEN GOTO 250 90 INPUT"Quantas oitavas de diferenca entre os teclados";DI 100 GOSUB 280 110 PRINT" q 2 w 3 e r 5 t 6 y 7 u i 9 o 0 p" 120 GOSUB 160 130 DO=DO*2^DI:GOSUB 280 140 PRINT" z s x d c v g b h n j m , l . ç ; /" 150 GOSUB 160:GOTO 210 160 X=0 170 F=DO*(O^X):A=3575611#/8192/F: H=INT(A):L=INT(.5+256*(A-H)) 180 V=USR(0):K=PEEK(&HEA90):IF K=0 OR K=W GOTO 170 190 P(K,0)=L:P(K,1)=H:W=K:X=X+1: IF STICK(0) <> 1 GOTO 170 200 RETURN 210 SOUND 7,248:SOUND 8,14: SOUND 9,14:SOUND 10,14 220 V=USR(0):A=PEEK(&HEA90):B= PEEK(&HEA91):C=PEEK(&HEA92) 230 SOUND 0,P(A,0):SOUND 1,P(A,1): SOUND 2,P(B,0):SOUND 3,P(B,1): SOUND 4,P(C,0):SOUND 5,P(C,1) 240 GOTO 220 250 GOSUB 280 260 PRINT" a w s e d f t g y h u j k o l p ç" 270 GOTO 150 280 PRINT"Digite a seguinte sequencia, e em":PRINT"seguida a tecla do cursor para cima":PRINT:RETURNObs: deve-se digitar a seqüência que aparece na tela antes de teclar para cima. Assim, o programa libera o teclado com as respectivas letras para tocar.
10 COLOR 15,1,12:DEFINT A-Z:SCREEN 2 20 C=99:L=53 ' coluna/linha 30 CO=4 ' cor 40 AL=2:LA=4 ' altura/largura 50 ES=12 ' espacamento 60 S$="Micro"' mensagem 70 GOSUB 100 80 C=27:L=72:CO=15:AL=4:ES=6: S$="Sistemas":GOSUB 100 90 GOTO 90 100 L1=L:C1=C 110 FOR T=1 TO LEN(S$):E=&H1BBF+8*ASC (MID$(S$,T,1)):FOR K1=0 TO 7:A$= RIGHT$("00000000"+BIN$(PEEK(E+K1)),8) :C1=C 120 FOR K=1 TO 8:IF MID$(A$,K,1)="1" THEN LINE(C1,L1)-(C1+LA,L1+AL),CO,BF 130 C1=C1+LA:NEXT:L1=L1+AL:NEXT:L1=L: C=C+ES*AL:NEXT 140 RETURN
10 POKE 62470,55 20 POKE 62471,61 30 POKE 62472,25 40 POKE 62473,30 50 POKE 62474,23
10 PLAY"O5L14S10M2000","O6L14S10M500" 20 PLAY"BBBBDGBDGBC#DGA#DGA#", "BBBBDGBDGBC#DGA#DGA#" 30 PLAY"DGA#DGBDGBDGBC#C#C#BBBBA#AG# G..","DGA#DGBDGBDGBC#C#C#BBBBA#AG#G..."
10 E=&HC000:DEFUSR=E 15 FOR K=E TO E+59:READ A$: POKE K,VAL("&H"+A$):NEXT 20 SCREEN 1:A=USR(1):LIST 25 DATA 23,23,7E,B7,2A,24,F9,11 30 DATA 00,08,20,11,CD,4A,00,47 35 DATA CB,3F,B0,CD,4D,00,23,1B 40 DATA 7A,B3,20,F0,C9,0E,04,41 45 DATA CD,4A,00,10,13,CD,4D,00 50 DATA CB,43,28,05,0D,20,02,0E 55 DATA 04,23,1B,7A,B3,20,E8,C9 60 DATA CB,3F,18,E7
10 FOR J=&HD000 TO &HD012:READ A$: POKE J,VAL("&H"+A$):NEXT 20 DEFUSR=&HD000:X=USR(0) 30 NEW 40 DATA 21,0D,D0,22,9C,FD,21,F7,02, 22,9A,FD,C9,3E,FF,32,A8,FC,C9Obs: ao rodar o programa, mova o cursor até um texto e dê um espaço em branco.
10 DEFINTA-Z:SCREEN2:COLOR1,15:CLS 20 OPEN"grp:"AS#1:IN=10:T=0 30 X=10:Y=10:A$="Este texto esta ": GOSUB1000 40 X=10:Y=Y+10:A$="no modo SHADE ...": GOSUB1000 50 T=1:X=10:Y=Y+20:A$="E este mostra o modo ":GOSUB1000 60 X=10:Y=Y+10:A$="OUTLINE ...": GOSUB1000 70 X=10:Y=Y+10:A$="TECLE ":GOSUB1000: A$="[ENTER]":T=0:GOSUB1000 80 A$=INPUT$(1):X=0:Y=Y+20 90 FORA=1TO255:IFA<32THENA$=CHR$(1) +CHR$(A+64)ELSEA$=CHR$(A) 100 FORT=0TO1:GOSUB1000:NEXT 110 IFY=0THENA$=INPUT$(1):CLS:Y=10 120 NEXT:GOTO90 1000 FORL=1TOLEN(A$):AL$=MID$(A$,L,1): IFAL$=CHR$(1)THENL=1:NEXT 1010 IFAL$>" "THENGOSUB1500 1020 X=X+IN:IFX>235THENX=0:Y=Y+IN:IF Y>182THENY=0 1030 NEXT:RETURN 1500 COLOR1:FORXL=XTOX+2:FORYL=YTO Y+2:PSET(XL,YL),POINT(XL,YL) 1510 IF FL THEN PRINT#1,CHR$(1); 1520 PRINT#1,AL$:NEXT:NEXT 1530 COLOR15:PSET(X+T,Y+T),POINT STEP(0,0) 1540 IF FL THEN PRINT#1,CHR$(1); 1550 PRINT#1,AL$:COLOR1:FL=0:RETURN
10 DATA 3A,63,F6,FE,02,28,05,1E 20 DATA 05,C3,72,40,2A,F8,F7,F3 30 DATA DB,A8,E6,F0,47,0F,0F,0F 40 DATA 0F,B0,D3,A8,6E,78,D3,A8 50 DATA FB,26,00,22,F8,F7,C9,00 60 DATA 3A,63,F6,FE,02,28,05,1E 70 DATA 05,C3,72,40,DB,A8,E6,F0 80 DATA 47,0F,0F,0F,0F,B0,F3,D3 90 DATA A8,2A,F8,F7,3A,27,F0,77 100 DATA 78,D3,A8,FB,C9,FF,00,00 110 FOR A=&HF000 TO &HF04D 120 READ B$ 130 POKE A,VAL("&H"+B$) 140 S=S+VAL("&H"+B$) 150 NEXT 160 IF S<>10160 THEN PRINT"Erro na digitacao das linhas DATA":END 170 DEFUSR=&HF000 180 DEFUSR1=&HF028Exemplo de utilização:
10 DEFINT X ' o parametro X deve ser inteiro 20 INPUT"Digite o seu nome:";N$ 30 FOR X=1 TO LEN(N$) 40 Y=ASC(MID$(N$,X,1)) 50 POKE &HF027,Y 60 ZZ=USR1(X) ' poke x,y 70 NEXT 80 PRINT"Conteudo da memoria do endereco 0 ao 20:" 90 KEY OFF 100 FOR X=0 TO 20 110 Y=USR(X) ' y=peek(x) 120 PRINT X" : "Y,CHR$(Y) 130 NEXT
10 FOR I=&HFFDB TO &HFFFD:READ A$: POKE I,VAL("&H"+A$):NEXT 20 FOR I=&HFF9F TO &HFF9D STEP -1: READ A$:POKE I,VAL("&H"+A$):NEXT 30 DATA F5,C5,D5,E5,21,C6,F7,7E 40 DATA FE,2C,28,0A,FE,2E,28,0A 50 DATA B7,28,0B,23,18,F1,36,2E 60 DATA 18,F9,36,2C,18,F5,E1,D1 70 DATA C1,F1,C9,FF,DB,C3 80 CLS:A=999999999999.99#:PRINTA: PRINT 90 PRINT USING"NCz$############ ##,.##";A
10 FOR I=&HFFF5 TO &HFFFD 20 READ A$:POKE I,VAL("&H"+A$) 30 NEXT 40 FOR I=&HFDE0 TO &HFDE3 50 READ A$:POKE I,VAL("&H"+A$) 60 NEXT:NEW 70 DATA 3E,3A,DF,3E,20,DF,C3 80 DATA D5,23,E1,C3,F5,FFObs: substitui o ponto de interrogação por dois pontos no INPUT.
10 INPUT"Nome";n$
10 KEYOFF:CLS:DIMA$(2,5):FOR J=1 TO 2 20 READA$(J,1),A$(J,2),A$(J,3),A$(J,4) ,A$(J,5) 30 N$="V14O4EFEDCDD.":K=1800:N=1: GOSUB 150 40 N$="EGFEDFF.":N=2:GOSUB 150 50 N$="GO5CO4BAGAA.":N=3:GOSUB 150 60 N$="BO5DCO4BABBO5CCO4GGG":K=2860: N=4:GOSUB 150 70 N$="CR64C.DE..":K=1370:N=5: GOSUB 150 80 PRINT:PRINT 90 NEXT J:END 100 DATA "YOU MUST REMEMBER THIS", "A KISS IS JUST A KISS" 110 DATA "A SIGH IS JUST A SIGH", "THE FUNDAMENTAL THINGS APPLY" 120 DATA "AS TIME GOES BY", "AND WHEN TWO LOVERS WOO" 130 DATA "THEY STILL SAY I LOVE YOU", "ON THAT YOU CAN RELY" 140 DATA "NO MATTER WHAT THE FUTURE BRINGS","AS TIME GOES BY" 150 PRINT A$(J,N):PLAY N$:FOR I=1 TO K:NEXT I:RETURN
<< Anterior | Basic | Próxima >> |