I have finished the program now, and everything works. I want to optimize my code. I generated values for x from [-100,100] as such:
LD R0, LABEL
LD R1, LABEL ;I used this for a comparison test
;subroutine here which calculates the function for current value of x
;
;
ADD R0, R0, #1 ;this increments x
ADD R2, R1, R0 ;if R1 - R0 > 0, program is done
BRp DONE
BRnz ;Calculate subroutine again
LABEL .FILL #-100
Doing it this way was simple enough. I am just wondering if there is an OPCODE that will generate an array of x values for me internally.
This post was edited by Krister on Dec 2 2015 10:27am