The second thing to note in this figure is that the letters are stored backwards each grouping of 4 bytes, or a memory word. This shows that the $a0 parameter to service 8 was actually a memory reference, and the service updated the memory directly. This is the string "Chuck", plus a new line character which is always returned by service 8, the null terminator and an extra byte of memory which was not used. In his figure there are 8 bytes containing the characters "cuhC \0\0\nk". The memory for the input string has been changed to store the value "Chuck", as shown in the circled text in the figure below (be sure to select the ASCII checkbox, or the values will show up in hex). Run the program and enter "Chuck" at the prompt for a string. Note that the memory circled in red is the space which was saved for the input string, and it is all null values. To understand this, the preceding figure shows the program execution string immediately before the program is run.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |