3 Replies - 1736 Views - Last Post: 27 February 2015 - 09:26 AM

#1 beginnermips  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-February 15

how to store a whole string in a register

Posted 26 February 2015 - 11:56 AM

hello i'm new to mips assembly(32bits) so don't judge me for my ignorance. I'd like to ask you how can i store a whole string in a register so that i can print it as an integer. I've used the la command to store the address of the string in a register but it doesn't seem to work as i need the whole string.

i'd really appreciate your help
Is This A Good Question/Topic? 0
  • +

Replies To: how to store a whole string in a register

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 917
  • View blog
  • Posts: 2,358
  • Joined: 28-March 11

Re: how to store a whole string in a register

Posted 26 February 2015 - 12:59 PM

The most you can store in a 32bit register is 4 characters... 1 char is 8 bits... 4 chars x 8 = 32
Was This Post Helpful? 1
  • +
  • -

#3 beginnermips  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-February 15

Re: how to store a whole string in a register

Posted 26 February 2015 - 03:37 PM

View PostGunnerInc, on 26 February 2015 - 12:59 PM, said:

The most you can store in a 32bit register is 4 characters... 1 char is 8 bits... 4 chars x 8 = 32


yes my string is "abc" plus the "\0"
Was This Post Helpful? 0
  • +
  • -

#4 NeoTifa  Icon User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4099
  • View blog
  • Posts: 18,184
  • Joined: 24-September 08

Re: how to store a whole string in a register

Posted 27 February 2015 - 09:26 AM

It's all just binary, it's how you read it that matters.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1