How do I save a list of characters I have entered from the keyboard, I have just started assembly(obviously). I can save one at a time by just moving them into a register but cannot figure out how to store strings.
There is an excellent explanation of how to define a string in assembly such that each character in that string is stored in a separate byte, each of which can then be referenced through the respective offsets from the initial address where the string's storage area begins.
This is covered in the 2nd chapter, "Character Strings", of Randall Hyde's excellent and comprehensive "The Art of Assembly Language", which you can view at:
Be forewarned, however, that the HLA compiler uses a syntax very similar to Pascal and C/C++, and so the examples you see are very high-level, as opposed to MASM/TASM/etc. syntax equivalents.
I am new to assembly myself, so don't feel like the Lone Ranger if you have to read a LOT before you even *begin* to start understanding the above in the larger context of general assembly language programming, especially with regard to translating the gist of it back down to MASM-level syntax, for example.
Cheers
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.