I am trying to write a code in LC-3 for finding the minimum and maximum values entered. So far I have completed what is below but am missing some major parts and I can't figure out what to do. ---- the lines like this is where I know something is needed. Is there ANYONE CAN HELP ME?????? please please please
.ORIG 0x3000
;R0 = MIN
;R1 = MAX
;R2 = ADDRESS OF DATA----INCREMENT THIS IN PLACE--TREAT AS COUNTER OF SORTS
;R3 = COUNTER current value
;R4 = COMPARATOR (-COUNT)
;R6 = - DATA VALUE
;R5 = TEST VALUE
LEA R2, DATA
LDR R0, R2, #0
LDR R1, R2, #0
AND R3, R3, #0 ; CLEAR R3
LEA R4, COUNT
LDR R4, R4, #0
NOT R4, R4
ADD R4, R4, #1
TEST ADD R7, R3, R4 ; SETS C.C NZP
BRzp QUIT
;COMPARISON TO MIN (R0)
;COMPARISON TO MAX (R1)- VALUE TO NEGATE IS DATA VALUE FROM BELOW
;
ADD R3, R3, #1
BRnzp TEST
----
QUIT RTN
LDR r6, r2, #0
negate r6
add r7, r0, r6
-
-
-
add r7, r1, r6
-----
COUNT .FILL 10
DATA .FILL 1
.FILL 2
.FILL 3
.FILL 4
.FILL 5
.FILL 6
.FILL 7
.FILL 8
.FILL 9
.FILL 10
.END