Welcome to Dream.In.Code
Become an Expert!

Join 149,606 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,902 people online right now. Registration is fast and FREE... Join Now!




Simple assembly program runtime error!

 
Reply to this topicStart new topic

Simple assembly program runtime error!

vraifreud
20 Sep, 2007 - 10:23 PM
Post #1

New D.I.C Head
*

Joined: 20 Sep, 2007
Posts: 1


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


CODE

.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?

User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Simple Assembly Program Runtime Error!
21 Sep, 2007 - 03:13 AM
Post #2

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 7,136



Thanked: 76 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
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.au/~barry/interrupts.html
http://www.vijaymukhi.com/vmis/vmchap7.htm
User is online!Profile CardPM
+Quote Post

1lacca
RE: Simple Assembly Program Runtime Error!
21 Sep, 2007 - 05:06 AM
Post #3

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
Moved to other languages since it wasn't C.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 11:59PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month