How to store at byte addresses in MIPS assembly?

0

My homework says:

  1. Ask the user for an integer P; store this in symbolic address p

  2. Ask the user for a 21-character string S with the 21st character always being null

  3. 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)

assembly
mips
asked on Stack Overflow Mar 18, 2018 by MonkeyD • edited Mar 18, 2018 by MonkeyD

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0