Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6991379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:29:34+00:00 2026-05-27T19:29:34+00:00

I wrote a simple program in assembly and I tried to run it using

  • 0

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:

Screenshot with 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:29:35+00:00Added an answer on May 27, 2026 at 7:29 pm

    Most probably there was no memory reserved for the application’s stack or there was too little of it and either the int 21h or hardware interrupt handler caused a stack overflow and a data/code corruption that led to execution of data or corrupted code.

    mov bl, 2Ah per se could not have caused the problem anyhow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote this simple program today, but I found that cin.get() refuses to work
I'm write a simple graphic-based program in Assembly for learning purpose; for this, I
I wrote this simple C program: int main() { int i; int count =
I wrote this simple program: void sig_ha(int signum) { cout<<received SIGINT\n; } int main()
I wrote this simple Prolog program. man(socrates). mortal(X) :- man(X). immortal(X) :- immortal(X). I
I wrote a simple program that using Class::ArrayObjects but It did not work as
The problem is this: I wrote a simple program that uses FFMPEG. compile as
I'm trying to learn basic assembly. I wrote a simple program in C to
I wrote a simple program, here's what it looks like, some details hidden: using
I wrote a simple program(calculating the number of steps for the numbers 1-10^10 using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.