there is a task (A given character array S (n), n≤700. Develop a program that extracts all repeated occurrences of numbers and arithmetic signs from this array.)
I wrote the code, but it is necessary under windows in the MASM32 program help please
org 100h
push start
retn
mess0 db 13,10,10,'ARRAY...'
db 13,10,'------------',13,10,'$'
mess1 db 13,10,10,'FOUND...'
db 13,10,'------------',13,10,'$'
array db 700 dup(0)
len dw 0
start:
in ax,40h
mov bx,700
xor dx,dx
div bx
cmp dx,16
jb start
mov [len],dx
mov di,array
@@: xor cx,cx
loop $
in ax,40h
imul ax,9E35h
and al,7Fh
cmp al,13
je @b
cmp al,10
je @b
stosb
dec dx
jnz @b
mov ah,9
mov dx,mess0
int 21h
mov cx,[len]
mov si,array
@@: lodsb
int 29h
loop @b
mov ah,9
mov dx,mess1
int 21h
mov cx,[len]
mov si,array
mov di,si
xor dx,dx
@@: lodsb
mov bl,al
cmp al,'*'
jz @save
cmp al,'/'
jz @save
cmp al,'+'
jz @save
cmp al,'-'
jz @save
sub bl,30h
cmp bl,9
ja @next
@save: inc dx
stosb
@next: loop @b
mov cx,dx
mov si,array
@@: lodsb
int 29h
loop @b
mov ah,8
int 21h
int 20h