cpu 8086 org 256 start: mov ah, 4Ah mov bx, 1000h int 21h mov di, array xor cx, cx loopalloc: mov ah, 48h mov bx, 1000h int 21h jc endalloc stosw inc cx jmp loopalloc endalloc: cmp cx, 4 jb errorinit mov es, word [array + 4] mov ah, 49h int 21h mov es, word [array + 2] mov ah, 49h int 21h mov es, word [array + 0] mov ah, 49h int 21h mov dx, msg.success mov ah, 09h int 21h mov ax, 4C00h int 21h errorexit: mov dx, msg.errorexit jmp error errorinit: mov dx, msg.errorinit error: mov ah, 09h int 21h mov ax, 4C01h int 21h msg: .errorinit: db "Too small initial allocation!",13,10,36 .errorexit: db "Failed last allocation!",13,10,36 .success: db "Success!",13,10,36 align 2 array: