EASy68K  
It is currently Mon Sep 16, 2019 5:11 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Dec 03, 2011 2:14 am 
Offline

Joined: Fri Dec 02, 2011 5:36 pm
Posts: 1
I just started to learn 68K assembly language. Can anybody plz tell me how to finish the following by by 68K program?

1. calculate D2*D3+D4, where D2=2, D3=5, D4=8 and then display " 2 * 5 + 8 = 18" when the program runs.

2. calculate and display the mean value of 8, 3, 1 and 4
"(8 + 3 + 1 + 4) / 4 = 4"

thank you all :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 03, 2011 12:53 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1101
MULS instruction multiplies two numbers
ADD instruction adds

Use the trap tasks to display. Such as:

Code:
   move   #3,d0   task number 3 into D0
* task number 3 is used to display the contents of D1.L as a number
   trap   #15   display number in D1.l


Check out the tutorial1 example in the EASy68K examples folder. Also read the online tutorials here:www.easy68k.com/tutorials.htm

_________________
Prof. Kelly


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 4 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:  
Powered by phpBB® Forum Software © phpBB Group