- Need Help With String
- 24 Oct 2017 04:32:27 pm
ex de, hl
ld c, (hl)
ld a, 8
jr nc, $ + 4
ld c, 10 ; limit name length to 8
ret nz ;nz means they are not equal
or a ;set the z flag, which means they are equal
I'm trying to take a string stored in ans and compare it to a predetermined password. However, I'm getting an error and I don't know what is causing it. Most of the codes are copied from the forum so the codes may feel weird.
And does a password with all numbers cause it not to be a string?