final hw push
This commit is contained in:
parent
371cfddbde
commit
27b8de1bc2
36 changed files with 1018 additions and 6 deletions
29
ass1/vaje/osnove/horner.lst
Normal file
29
ass1/vaje/osnove/horner.lst
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
00000 HORNER START 0
|
||||
. Pretvorimo polinom x^4 + 2x^3 + 3x^2 + 4x+5 v Hornerjevo obliko
|
||||
. b_n = a_n = 1
|
||||
. b_n-1 = 2 + b_n * x = 2 + 1 * x = 4
|
||||
. b_n-2 = 3 + b_n-1 * x = 3 + 4 * x = 11
|
||||
. b_n-3 = 4 + b_n-2 * x = 4 + 11 * x = 26
|
||||
. b_n-4 = 5 + b_n-3 * x = 5 + 26 * x = 57
|
||||
. kjer x = 2
|
||||
|
||||
00000 010001 LDA #1
|
||||
|
||||
00003 23201B MUL x
|
||||
00006 190002 ADD #2
|
||||
|
||||
00009 232015 MUL x
|
||||
0000C 190003 ADD #3
|
||||
|
||||
0000F 23200F MUL x
|
||||
00012 190004 ADD #4
|
||||
|
||||
00015 232009 MUL x
|
||||
00018 190005 ADD #5
|
||||
|
||||
0001B 0F2006 STA res
|
||||
0001E 3F2FFD HALT J HALT
|
||||
00021 END HORNER
|
||||
|
||||
00021 000002 x WORD 2
|
||||
00024 000000 res RESW 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue