2 Replies - 1940 Views - Last Post: 21 September 2007 - 06:06 AM Rate Topic: -----

#1 vraifreud  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-September 07

Simple assembly program runtime error!

Post icon  Posted 20 September 2007 - 11:23 PM

I'm new to assembly language and the VS2005 environment. When I wrote a simple program as follows:


.386 
.model flat,stdcall 
.stack 100h 
.code 
start: 
mov ah,1 
int 21h 
end start 




The compilation and linkage all passed well, but at runtime a dialogbox displayed: "filename.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

No difference is made when "mov ah,1
int 21h" is changed to any other code.

Can anybody help me?

Is This A Good Question/Topic? 0
  • +

Replies To: Simple assembly program runtime error!

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5365
  • View blog
  • Posts: 27,328
  • Joined: 10-May 07

Re: Simple assembly program runtime error!

Posted 21 September 2007 - 04:13 AM

What are you expecting to have happen?

You are not telling it to do anything.

Start, read, stop.

Try adding a data section & using some generic (stdout) output, like a hello world program.

http://spike.scu.edu...interrupts.html
http://www.vijaymukh...mis/vmchap7.htm
Was This Post Helpful? 0
  • +
  • -

#3 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Simple assembly program runtime error!

Posted 21 September 2007 - 06:06 AM

Moved to other languages since it wasn't C.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1