Help to write the program on TASM.
It is necessary to create an array of N numbers. Determine how many zeros are up to the minimum value in the array (if several minimum values, then the minimum value is the last value, if the minimum value is at the end of the array, then output a message about it and stop processing) and the arithmetic mean of positive numbers after the minimum value ( if there are no positive numbers, then print a message about it).
maybe something like this
use16 ;ΠΠ΅Π½Π΅ΡΠΈΡΠΎΠ²Π°ΡΡ 16-Π±ΠΈΡΠ½ΡΠΉ ΠΊΠΎΠ΄ org 100h ;ΠΡΠΎΠ³ΡΠ°ΠΌΠΌΠ° Π½Π°ΡΠΈΠ½Π°Π΅ΡΡΡ Ρ Π°Π΄ΡΠ΅ΡΠ° 100h jmp start ;ΠΠ΅Π·ΡΡΠ»ΠΎΠ²Π½ΡΠΉ ΠΏΠ΅ΡΠ΅Ρ
ΠΎΠ΄ Π½Π° ΠΌΠ΅ΡΠΊΡ start ;---------------------------------------------------------- length db 10 ;Π΄Π»ΠΈΠ½Π° ΠΌΠ°ΡΡΠΈΠ²Π° array db -1,2,-3,4,5,0,-2,2,8,4 ;ΠΌΠ°ΡΡΠΈΠ² ;---------------------------------------------------------- start: mov bx,array ;Π DX Π°Π΄ΡΠ΅Ρ ΡΡΡΠΎΠΊΠΈ. movzx cx,[length] ;CX = Π΄Π»ΠΈΠ½Π° ΠΌΠ°ΡΡΠΈΠ²Π° xor al,al ; ΡΠΊΠ°Π·Π°ΡΠ΅Π»Ρ Π½Π° 1-ΠΉ ΡΠ»Π΅ΠΌΠ΅Π½Ρ, ΠΏΡΠΈΠ½ΡΡΡΠΉ Π·Π° Π½Π°ΡΠ°Π»ΡΠ½ΡΠΉ ΠΌΠΈΠ½ΠΈΠΌΡΠΌ cmp al,[dx] ;ΡΡΠ°Π²Π½Π΅Π½ΠΈΠ΅ AL ΠΈ DX jnc min ;ΠΏΠ΅ΡΠ΅Ρ
ΠΎΠ΄ ΠΊ min Π΅ΡΠ»ΠΈ Π±ΠΎΠ»ΡΡΠ΅ mov al,[dx] ;ΠΠΎΠΌΠ΅ΡΡΠΈΡΡ DX Π² ΡΠ΅Π³ΠΈΡΡΡ Al min: inc dx ;ΡΠ²Π΅Π»ΠΈΡΠ΅Π½ΠΈΠ΅ Π½Π° 1 dec cx ;Π£ΠΌΠ΅Π½ΡΡΠΈΡΡ CX Π½Π° Π΅Π΄ΠΈΠ½ΠΈΡΡ jnz start ;ΠΏΠ΅ΡΠ΅Ρ
ΠΎΠ΄ ΠΊ start exit: mov ax,4C00h ;\ int 21h ;/ ΠΠ°Π²Π΅ΡΡΠ΅Π½ΠΈΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ;----------------------------------------------------------
$character. And you have an array of numbers and if you want to display it on the screen you will need a procedure for converting numbers from a binary form to decimal (or another number system) and casting it to printed characters. And what is the basis of the problem, take the first element of the array into the register, go through the array and compare the value with the saved one. If less, memorize the new and its position in the array. Reaching the end you know the minal element and its position. go through the array from this position to the top and count the zeros - Mike