(loader '((title |deriv.lo|)))
(loader'((fentry check-deriv subr0)
(entry check-deriv subr0)
(mov '7 a2)
(mov '(test-deriv 1) a1)
(jmp check-value)
))
(loader'((fentry meter-deriv subr0)
(entry meter-deriv subr0)
(mov 'deriv a2)
(mov '(deriv-run) a1)
(jmp perform-meter)
))
(loader'((fentry test-deriv subr1)
(entry test-deriv subr1)
(cabne a1 '1 104)
(bra deriv-run)
103
(push a1)
(call deriv-run)
(pop a1)
104
(sobgez a1 103)
(mov 't a1)
(return)
))
(loader'((entry deriv-aux subr1)
(push a1)
(push (@ 101))
(push '/)
(call deriv)
(push a1)
(push (& 3))
(mov '3 a4)
(jmp list)
101
(eval ())
(adjstk '1)
(return)
))
(loader'((entry deriv subr1)
(push a1)
(btcons a1 101)
(cabne a1 'x 103)
(mov '1 a1)
(adjstk '1)
(return)
103
(mov '0 a1)
(adjstk '1)
(return)
101
(cabne (car a1) '+ 105)
(push (cdr a1))
(push nil)
107
(bfcons (& 1) 108)
(mov (& 1) a1)
(mov (cdr a1) (& 1))
(mov (car a1) a1)
(call deriv)
(mov (& 0) a2)
(jcall cons)
(mov a1 (& 0))
(bra 107)
108
(mov (& 0) a1)
(jcall nreverse)
(adjstk '2)
(mov a1 a2)
(mov '+ a1)
(adjstk '1)
(jmp cons)
105
(cabne (car a1) '- 109)
(push (cdr a1))
(push nil)
111
(bfcons (& 1) 112)
(mov (& 1) a1)
(mov (cdr a1) (& 1))
(mov (car a1) a1)
(call deriv)
(mov (& 0) a2)
(jcall cons)
(mov a1 (& 0))
(bra 111)
112
(mov (& 0) a1)
(jcall nreverse)
(adjstk '2)
(mov a1 a2)
(mov '- a1)
(adjstk '1)
(jmp cons)
109
(cabne (car a1) '* 113)
(push (@ 115))
(push '*)
(push a1)
(push (cdr a1))
(push nil)
116
(bfcons (& 1) 117)
(mov (& 1) a1)
(mov (cdr a1) (& 1))
(mov (car a1) a1)
(call deriv-aux)
(mov (& 0) a2)
(jcall cons)
(mov a1 (& 0))
(bra 116)
117
(mov (& 0) a1)
(jcall nreverse)
(adjstk '2)
(mov a1 a2)
(mov '+ a1)
(jcall cons)
(push a1)
(mov '3 a4)
(jmp list)
115
(eval ())
(adjstk '1)
(return)
113
(cabne (car a1) '/ 118)
(push (@ 120))
(push '-)
(push (@ 121))
(push '/)
(mov (cdr a1) a1)
(mov (car a1) a1)
(call deriv)
(push a1)
(mov (& 5) a4)
(mov (cdr a4) a4)
(mov (cdr a4) a4)
(push (car a4))
(mov '3 a4)
(jmp list)
121
(eval ())
(push a1)
(push (@ 122))
(push '/)
(mov (& 5) a4)
(mov (cdr a4) a4)
(push (car a4))
(push (@ 123))
(push '*)
(mov (& 8) a3)
(mov (cdr a3) a3)
(mov (cdr a3) a3)
(push (car a3))
(mov (& 9) a3)
(mov (cdr a3) a3)
(mov (cdr a3) a3)
(push (car a3))
(mov (& 10) a1)
(mov (cdr a1) a1)
(mov (cdr a1) a1)
(mov (car a1) a1)
(call deriv)
(push a1)
(mov '4 a4)
(jmp list)
123
(eval ())
(push a1)
(mov '3 a4)
(jmp list)
122
(eval ())
(push a1)
(mov '3 a4)
(jmp list)
120
(eval ())
(adjstk '1)
(return)
118
(mov 'error a1)
(adjstk '1)
(return)
))
(loader'((entry deriv-run subr0)
(mov '5000 a4)
(bra 102)
101
(push a4)
(mov '(+ (* 3 x x) (* a x x) (* b x) 5) a1)
(call deriv)
(pop a4)
102
(sobgez a4 101)
(mov 't a1)
(return)
))
(loader '((end)))