My homework says:
Ask the user for an integer P; store this in symbolic address p
Ask the user for a 21-character string S with the 21st character always being null
Interpret P as a byte address and store S starting at P(even if S has less than 21 characters, store the characters sequentially still starting at byte address P)
what I don't understand is, we are using .data which starts with 0x10010000 and we have to use the integer P as a byte address so the possible addresses for P is 0x00000000 + integer.
How can I access addresses 0x00000000 + integer ? It would produce an error address out of range: 0x00000001 (for example)
User contributions licensed under CC BY-SA 3.0