2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
24
Task/Dot-product/360-Assembly/dot-product.360
Normal file
24
Task/Dot-product/360-Assembly/dot-product.360
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
* Dot product 03/05/2016
|
||||
DOTPROD CSECT
|
||||
USING DOTPROD,R15
|
||||
SR R7,R7 p=0
|
||||
LA R6,1 i=1
|
||||
LOOPI CH R6,=AL2((B-A)/4) do i=1 to hbound(a)
|
||||
BH ELOOPI
|
||||
LR R1,R6 i
|
||||
SLA R1,2 *4
|
||||
L R3,A-4(R1) a(i)
|
||||
L R4,B-4(R1) b(i)
|
||||
MR R2,R4 a(i)*b(i)
|
||||
AR R7,R3 p=p+a(i)*b(i)
|
||||
LA R6,1(R6) i=i+1
|
||||
B LOOPI
|
||||
ELOOPI XDECO R7,PG edit p
|
||||
XPRNT PG,80 print buffer
|
||||
XR R15,R15 rc=0
|
||||
BR R14 return
|
||||
A DC F'1',F'3',F'-5'
|
||||
B DC F'4',F'-2',F'-1'
|
||||
PG DC CL80' ' buffer
|
||||
YREGS
|
||||
END DOTPROD
|
||||
Loading…
Add table
Add a link
Reference in a new issue