.model small
.data
num db 14
arr db 3,5,8,12
.code
mov ax,@data
mov ds,ax
mov cx,4
mov BX,0000
L1:
mov dh,arr[BX]
cmp dh,num
jl incBX
jmp Ins1
incBX:
add BX,1
Loop L1
Ins1:
mov DX,BX
mov BX,3
Shft:
mov ch,arr[BX]
mov arr[BX+1],ch
sub BX,1
cmp DX,BX
jle Shft
mov ah,num
mov BX,DX
mov arr[BX],ah
mov ax,4C00h
int 21h
end