*----------------------------------------------------------- * Title : * Written by : * Date : * Description: *----------------------------------------------------------- ORG $1000 START: ; first instruction of program * Put program code here MOVE.B C,D0 ; D0 carattere da cercare MOVE.B #0,D1 ; D1 posizione del caratteere; 0 non presente MOVE.B #0,D3 ; D3 trovato 0=falso LEA S,A0 LOOP CMP.B #1,D3 BEQ FINELOOP MOVE.B (A0)+,D2 BEQ FINELOOP ; se fine string => non trovato CMP.B D0,D2 BNE NONTROV MOVE #1,D3 NONTROV ADDQ.B #1,D1 BRA LOOP FINELOOP CMP #0,D3 BNE fine MOVE #0,D1 fine SIMHALT ; halt simulator * Put variables and constants here ORG $2000 S DC.B 'stringa di prova',0 C DC.B 'z' ; carattere da cercare END START ; last line of source *~Font name~Courier New~ *~Font size~10~ *~Tab type~1~ *~Tab size~4~