0 Members and 3 Guests are viewing this topic.
Lbl PAR"PARSE :)" -> Str1"PARTY :D" -> Str2Length(Str1) -> BFor(A,0,B!If {Str1+A} = {Str2+A}-1 -> A (this is a -1, not a negative 1)EndIf A = B //do stuff that needs to be done if it parsed the sameEnd
LD HL, Example LD DE, StringToBeParsed LD B, LengthOfExampleLoop EX DE,HL LD A,(HL) EX DE,HL CPD JR NZ,NotSame DJNZ LoopSame ;code for what to do hereNotSame RET
Haha lol it won't be that long I think Thanks!
Never assume that when it comes to users
POP HL POP DE POP BC XOR ALoop EX DE,HL LD A,(HL) EX DE,HL CPD JR NZ,NotSame DEC BC JP PE,LoopSame INC ANotSame LD H,0 LD L,A PUSH HL
Length(Str2) -> nStr2 -> nStr1 -> nAsm(the opcode)n -> A