I'm working on a project and I have 2 tables of values like so...
letters: db 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
map: db 007, 008, -1, -1, -1, 012, -1, -1, -1, -1, -1, -1, -1, 010, -1, -1, -1, 013, -1, 009, -1, 011, -1, -1, -1, -1
I'm trying to use ecx as counter to iterate through "letters" and once I find a certain letter, I find it in "map" . Why can't I do something like...
mov al, [map + ecx] ; al should contain 007 or \a
so if the user enters an 'a', I find 'a' at 0 (ecx), then add 0 (ecx) to map to get 007 in al.
Thanks