Question: Code A MOV r0,#256 LDRB r1,Table Loop LDRB r2,[r1] ;load a byte LSLB r2,r2,#2 ;multiply if by 4 ADDB r2,r2,#1 ;add 1 STRB r2,[r1] ;store

Code A

MOV r0,#256

LDRB r1,Table

Loop LDRB r2,[r1] ;load a byte

LSLB r2,r2,#2 ;multiply if by 4

ADDB r2,r2,#1 ;add 1

STRB r2,[r1] ;store it

ADDB r1,r1,#1 ;increment the pointer

SUBS r0,r0,#1 ;subtract 1 from the loop count

BNE Loop ;repeat

Code B

MOV r0,#64

LDR r1,Table

Loop PLDRB r2,[r1] ;parallel load 4 bytes

PADDAB r2,#1 ;parallel add 1 to each byte

PLSLB r2,#2 ;parallel shift 4 bytes

STRB r2,[r1,#1]! ;store it

COUNT r0,Loop

Explain each line of this code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!