EASy68K  
It is currently Sun Dec 16, 2018 11:12 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: bsr to address
PostPosted: Fri Jun 04, 2010 11:50 am 
Offline

Joined: Fri Jun 04, 2010 11:37 am
Posts: 1
Hello,
is there a possibility to call
Subroutines like this ?

Code:
Un = $1000;

while Un <= $5000
   bsr Un
   Un = Un +$1000
end while
   

*Un nterprogramme
org $2000
U1:
   ...
end_u1:
   rts

org $3000
U2:
   ...
end_u2:
   rts

org $4000
U3:
   ...
en_u3:
   rts

org $5000
Un:
   ...
end_un:
   rts
[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 05, 2010 12:30 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1087
Something like this.
Code:
    ORG   $1000
START:              ; first instruction of program
    lea U1,A0
    while A0 <le> #U3 do.s
        pea next
        jmp (A0)
next:   add #$1000,A0
    endw   

    MOVE.B   #9,D0
    TRAP   #15     ; halt simulator

    org     $2000
U1: nop
    rts
    org     $3000
U2: nop
    rts
    org     $4000
U3: nop
    rts

   END   START      ; last line of source

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