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 ;/ Π—Π°Π²Π΅Ρ€ΡˆΠ΅Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ ;---------------------------------------------------------- 
  • What exactly do you need help with? Need to write for you? - Sergey Gornostaev
  • I am new to this, so far I only managed to create an array. And how to determine how many zeros are up to the minimum value in the array I do not know yet. Help with this at least. - Saturday
  • one
    Edit the question. Add the code of your attempts to it and explain in detail the essence of your problems. This will increase the chances of help. - Sergey Gornostaev
  • Generally no longer correct. interrupt function 9h 21h prints a string, up to the terminating $ 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
  • The book "Fundamentals of assembly language," CG Finogenov - it is exactly what you need. - Alexander Petrov

0