It is currently Fri Apr 10, 2020 2:29 am

 All times are UTC

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: how to do these simple tasks by 68K?Posted: Sat Dec 03, 2011 2:14 am

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

Top

 Post subject: Posted: Sat Dec 03, 2011 12:53 pm

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

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 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 forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ EASy68K Forum    FAQ    Latest Features    EASy68K Questions    68000 Programming Questions    Wish List    Wishes Granted    Undocumented Features    Documented Features    General Discussion    EASy68K Projects