arm

Can someone explain the following load and store instructions as part of the ARM ISA?

梦想的初衷 提交于 2021-02-06 06:31:31
问题 I'm just starting to learn ARM and I'm having trouble understanding what the load and store instructions do exactly. Load instructions: ldrsb ldrb ldrsh ldrh ldr Store instructions: strb strh str What does it mean to "load halfword" signed or unsigned? Or to "load byte" signed or unsigned? What is the difference between signed and unsigned, and in what particular applications would some of the load/store instructions be practical to use? All in all, I'm looking for an intuitive understanding

Can someone explain the following load and store instructions as part of the ARM ISA?

白昼怎懂夜的黑 提交于 2021-02-06 06:29:50
问题 I'm just starting to learn ARM and I'm having trouble understanding what the load and store instructions do exactly. Load instructions: ldrsb ldrb ldrsh ldrh ldr Store instructions: strb strh str What does it mean to "load halfword" signed or unsigned? Or to "load byte" signed or unsigned? What is the difference between signed and unsigned, and in what particular applications would some of the load/store instructions be practical to use? All in all, I'm looking for an intuitive understanding

Reverse numbers in a variable [closed]

一笑奈何 提交于 2021-02-05 09:27:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 13 days ago . Improve this question I have to reverse 20 numbers in a variable (src) and put te result in another variable (dst) in ARM 7 but I can't do it. I have src = 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4 and I want that dst = 4,3,2,1,8,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1. Could someone help me please ? Here is

Reverse numbers in a variable [closed]

纵然是瞬间 提交于 2021-02-05 09:27:03
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 13 days ago . Improve this question I have to reverse 20 numbers in a variable (src) and put te result in another variable (dst) in ARM 7 but I can't do it. I have src = 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4 and I want that dst = 4,3,2,1,8,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1. Could someone help me please ? Here is

How to fix 'Error: junk at end of line, first unrecognized character 0xe2' in Assembly

半世苍凉 提交于 2021-02-05 08:41:08
问题 I am trying to write a basic arm assembly file on my raspberry pi 3 that has access to printf and scanf through the gcc compiler, but upon compiling my code I get a strange error. This is my third application written in assembly to use the gcc compiler, so I wanted to do incremental testing so I set up my prompts and strings, and I try and exit cleanly; however, this is my code that throws the error: .data .balign 4 promptNum1: .asciz “Please enter some number that you want to work with”

ARM AArch64 stack management

﹥>﹥吖頭↗ 提交于 2021-02-05 08:06:53
问题 Is there no ability to have a 64 bit stack for ARMv8? I understand there is no push and pop instructions on AArch64 so is stack management left to AArch32 for parameter passing and such? How can we pass the 48 bit addresses? I'm overall confused how function calls will work when operating in AArch64. 回答1: Much like in 32-bit * , SP is a valid base register for any load/store instruction, so the mechanics aren't all that different. What is different is that SP is no longer a general-purpose

ARM AArch64 stack management

[亡魂溺海] 提交于 2021-02-05 08:06:25
问题 Is there no ability to have a 64 bit stack for ARMv8? I understand there is no push and pop instructions on AArch64 so is stack management left to AArch32 for parameter passing and such? How can we pass the 48 bit addresses? I'm overall confused how function calls will work when operating in AArch64. 回答1: Much like in 32-bit * , SP is a valid base register for any load/store instruction, so the mechanics aren't all that different. What is different is that SP is no longer a general-purpose

How to return a number larger than 8 bits from main()?

自闭症网瘾萝莉.ら 提交于 2021-02-05 07:55:29
问题 So as far as I can tell, the exit code returned from r0 only uses the lowest 8 bits of this register. How wouuld I return a value higher than 8 bits? Here is the ARMv7 code: @ looping.s @ calculates sum of integers from 1 to 100 .text .balign 4 .global main main: MOV r1, #0 @ r1 = 0 as sum MOV r2, #0 @ r2 = 0 as counter loop: ADD r2, r2, #1 @ counter = counter + 1 ADD r1, r1, r2 @ sum = sum + counter CMP r2, #100 @ counter - 100 BLT loop @ if counter < 100 go to start of loop MOV r0, r1 @

Arm Assembly Rasperry-Pi: Converting a string to Upper case

╄→尐↘猪︶ㄣ 提交于 2021-02-05 06:44:15
问题 I´m working on a program in which the user enters his name, and the program should convert all lower case letters to upper case: I am using the %s format to read the string: .text ldr r0,=msj bl printf ldr r0,=format ldr r1,string bl scanf .data .align 2 msj: .asciz "Enter you name: " format: .asciz "%s" string: .asciz "" I have tried substracting 32 to each character but I think the strings are not in ascii numbers format. Is there any way I can convert the entire word to Upper Case? 回答1:

How to determine if ARM processor running in a usual locked-down “world” or in Secore “world”?

会有一股神秘感。 提交于 2021-02-05 05:50:26
问题 For example, virt-what shows if you are running inside hardware virtualization "sandbox". How to detect if you are running in ARM "TrustZone" sandbox? 回答1: TrustZone maybe different than what you think. There is a continuum of modes. From 'a simple API of trusted functions' to 'dual OSs' running in each world. If there was more context given to the question, it would be helpful. Is this for programatically determining or for reverse engineering considerations? For the current Linux user-space