I wrote a simple program in assembly and I tried to run it using TASM(Turbo) and TLINK. After I run the executable I get this error:

TITLE 1st Program
.286
.model small
.data
val1 db 0
.code
main PROC
mov bl, 2Bh
mov val1, bl
mov bl, 2Ah ;I suspect this is the line that causes the problem
mov ah, 02 ;calls interrupt to display val1
mov dl, val1
int 21h
mov ah, 04Ch ;calls interrupt to terminat program
mov al, 00
int 21h
main ENDP
end main
If I remove the line that just moves 2ah to BL, it works perfectly fine. I tried changing the value being added to BL but I still get the error message. I just want to understand what causing the error.
Thank you!
Later edit: I’ve managed to solve the error by adding .stack 100h. Can anyone explain what exactly happend?
Most probably there was no memory reserved for the application’s stack or there was too little of it and either the
int 21hor hardware interrupt handler caused a stack overflow and a data/code corruption that led to execution of data or corrupted code.mov bl, 2Ahper se could not have caused the problem anyhow.