EASy68K  
It is currently Tue Dec 10, 2019 5:08 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Output problems
PostPosted: Sat Oct 03, 2009 12:45 am 
Offline

Joined: Tue Sep 08, 2009 8:06 pm
Posts: 2
Im working on a program that takes two numbers and outputs the result, only when i have the user enter 2 numbers the result is never printed. even though im writing the code correctly... dunno please help.

Code:
*Add the numbers together
   Add.l   D1, A2      Add D2 and D1 and store in D2
   Move.L   A2, A1      Place the results into A1
   BSR   Print

   BRA   MAIN      Branch back to main.

ENDMAIN

   MOVE.B   #9,D0
   TRAP   #15      Halt Simulator
*--------------Input Method-------------
GetInput
   Move.b   #4, D0
   Trap   #15

   RTS

*--------------Print Method-------------
Print
   Move.b   #14, D0
   Trap   #15
   
   RTS


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 03, 2009 1:47 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
As you haven't listed all of your program I can't see exactly what you're doing but it looks like you're confusing values with pointers to values as well as with pointers to strings.

TRAP #15 tasks 3, 15 or 20 are more suited to outputting values.

Lee.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group