The language program is as follows:
<u>Explanation:</u>
ORG 100 / Calculation of the maximum
Load First /loading 1st array member
Store Next /address of next pointer,stores
Load Array /Loading 1st element
Store Max /maximum value with 1st element
Loop, Clear
AddI Next /Load next element!
Subt Max /Comparing with the maximum once
Skipcond 000 /If negative ->skip
Jump NewMax /If not negative ->max value
NextIdx, Load Next
Add One /pointer++
Store Next
Load Count /counter--
Subt One
Skipcond 800 /counter is positive ->same proceeding
Jump Print /else - printing the result
Store Count /counter decresed and stored
Jump Loop
NewMax, Clear / new maximum value
AddI Next
Store Max
Jump NextIdx
Print, Load Max
Output
Halt /Terminate program
First, Hex 11E /starting is location 11E(change as per...,as code changes don't forget to change it too)
Next, Hex 0 /next element index (memory location)
Max, Dec 0 /maximum value
Count, Hex 8 / loop counter decreases
One, Dec 1 /Loop stops
say array:
[Dec -5, Dec 15, Dec -17, Dec 20, Dec -23, Dec 12, Dec 130, Dec -12]