Programming ARM Assembly Matrix Multiplication Program

User Generated

zrgevp

Programming

Description

Write a matrix multiplication program in ARM assembly

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Please view explanation and answer below.

.extern printf
.extern scanf
.global main
.text
main:
push {ip, lr}
@--collect matrix column and rows
ldr r0, =scanf2
ldr r1, =lines
ldr r2, =columns
bl scanf

@--compile values of matrix
ldr r4, =row
ldr r4, [r4]
ldr r5, =columns
ldr r5, [r5]
mul r6, r4, r5
ldr r7, =matrix
While
loop1:
cmp r6, #0
ble endloop1
ldr r0, =scanf1
mov r1, r7

bl scanf
sub r6, r6, #1
add r7, r7, #4
b loop1
endloop1:

@--read Matri...


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags