|
OK, let's hit these a little at a time... >D SS S 1 DIM(11) Array of characters, 11 elements, each one character long >D DS >D SSNO 1 11 >D S1 1 3 >D S3 4 7 >D S5 8 11 Data structure which shares storage between SSNO, S1, S2 and S3. SSNO ABCDEFGHIJK S1 ABC S2 DEFG S3 HIJK >c MOVEA S1 SS(1) SS ABCxxxxxxxx Because S1 is three bytes long, it loads the first three elements of array SS >c MOVEA S3 SS(5) SS ABCxDEFGxxx Because we told it to start at element 5, we'll skip element 4, which will remain whatever it was before this operation. Because S3 is four bytes long, it gets loaded into elements 5,6,7 and 8, leaving all the other elements "as-is." >c MOVEA S5 SS(9) SS ABCxDEFGHIJ Note that the "K" wasn't loaded in the array because it is 4 characters long, starting at element 9, so 9,10,11 get loaded. >C MOVEA '-' SS(4) SS ABC-DEFGHIJ >C MOVEA '-' SS(7) SS ABC-DE-GHIJ I hope this helps clarify what the code is doing. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.