napisal poly.asm
This commit is contained in:
parent
5bc9d33952
commit
adfb9848ed
1 changed files with 47 additions and 0 deletions
47
ass1/poly.asm
Normal file
47
ass1/poly.asm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
poly START 0
|
||||
LDA x
|
||||
MUL x
|
||||
STA x2
|
||||
|
||||
LDA x2
|
||||
MUL x
|
||||
STA x3
|
||||
|
||||
LDA x2
|
||||
MUL x2
|
||||
STA x4
|
||||
|
||||
LDA x4
|
||||
STA term1
|
||||
|
||||
LDA x3
|
||||
MUL #2
|
||||
STA term2
|
||||
|
||||
LDA x2
|
||||
MUL #3
|
||||
STA term3
|
||||
|
||||
LDA x
|
||||
MUL #4
|
||||
STA term4
|
||||
|
||||
LDA term1
|
||||
ADD term2
|
||||
ADD term3
|
||||
ADD term4
|
||||
ADD #5
|
||||
STA result
|
||||
|
||||
halt J halt
|
||||
|
||||
x WORD 2
|
||||
x2 RESW 1
|
||||
x3 RESW 1
|
||||
x4 RESW 1
|
||||
term1 RESW 1
|
||||
term2 RESW 1
|
||||
term3 RESW 1
|
||||
term4 RESW 1
|
||||
result RESW 1
|
||||
END poly
|
||||
Loading…
Add table
Add a link
Reference in a new issue