EASy68K  
It is currently Wed May 24, 2017 7:57 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Sep 14, 2013 10:57 pm 
Offline

Joined: Sat Sep 14, 2013 10:51 pm
Posts: 1
I am trying to display the number in D4 onto the screen. How do I go about doing this.
how do I display the number in a data register?
Code:
         ORG   $1000
NUMBER: DC.B    '8102'
   DC.B   0
TOKEN:    DS.L   1
   DC.B   0
   ORG   $2000
START:   MOVEA.L   #NUMBER,A3
   MOVEA.L   #TOKEN,A4
   CLR.L   D5
   CLR.L   D2
   MOVE.B   (A3)+,D0   
   ANDI.B   #$F,D0
   MOVE.B   D0,D1
   MOVE.B   D1,D4
LOOP:   MOVE.B   (A3)+,D0
   ANDI.B   #$F,D0
   MULU.W   #10,D4
   ADD.B   D0,D4
   ADD.B   #1,D2
   CLR.L   D0
   CMP.B   #3,D2
   
   BNE   LOOP
LOOP2:   
        MOVE.B     D4,(A4)+
   ADD.B   #1,D5
   CMP.B   #4,D5
   BNE   LOOP2

   MOVE.L   (A4),(A1)
   MOVE.B   #13,D0
   TRAP   #15

   MOVE.B   #9,D0
   TRAP   #15      

   END   START


Top
 Profile  
 
PostPosted: Sun Sep 15, 2013 12:54 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Trap task 3 displays the contents of D1.L as a number. Move the number from D4 to D1 then use the trap task to display it.
Code:
    MOVE.L  D4,D1       number to display to D1
    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

_________________
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 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