Originally Posted by
itsmeGames
Originally Posted by
Vash
There's no conditional for when you compare and it's not equal.
After Check F, get rid of b exit and add bne checkF. Also, after Check L, get rid of b exit and add bne checkF
wouldn't bne checkF make it start over from the most recent character?
I want it to check if you typed FLA (only as first 3 characters) and if you did it makes your first inventory slot a blue rose, if not it doesn't do anything
Well yes, but when it compares and it's not equal you want the entire check to start over. If it confirms F then not L and you make it keep checking L instead of going back to F you could get something like this:
Character says: Fart!
Check reads F and moves on to second check for L
Character then says: SLOW connection.
Check reads L in
second message and moves on to A check.
Character finally says: SCAMMER!
Check reads A in the
third message and you get the final code effect.
I know it's highly unlikely, but each time you encounter a Not Equal in your compare you want to completely restart the check. It's really up to you, though. You at least need to add something for NE. Even if it is restarting the current check instead of all the checks.
I hope this wasn't too confusing...
Code:
ldr r0, =0x021D88FE
ldr r5, =0x022AF136
@check if code should run
checkF:
ldrb r6, [r5]
add r5,#1
cmp r6,#0x06
beq checkL
bne checkF
checkL:
ldrb r6, [r5]
add r5,#1
cmp r6,#0x0C
beq checkA
bne checkF
checkA:
ldrb r6, [r5]
add r5,#2
cmp r6,#0x01
beq run
bne checkF
run:
mov r8, #0x0019
strh r8, [r0]
b exit
exit:
bx lr