EASy68K  
It is currently Sat Apr 04, 2020 8:50 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Nov 03, 2010 4:57 am 
Offline

Joined: Tue Oct 26, 2010 1:57 am
Posts: 3
Hello :D I am trying to display/print the location of a specific memory location, such as:

E.g. User input integers ranging from 0-9.
At the end of the loop, the program will print the memory location of the biggest and smallest number entered. (location like $0B or $14).
More advanced, i heard that i am actually able to recognise MULTIPLE entries? :?
Such as 1 is the smallest input then if the user input multiple 1's then i can print ALL the memory location? (vice versa for biggest) :shock:

THANK YOU for your attention :wink:

Additional:
what is parameter passing?
print an integer in multi-digit hex?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 03, 2010 12:44 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
Your question is far to general to be answered on this forum. We will answer specific questions about EASy68K or 68000 programming. We will not do your homework for you. We're just :twisted: that way.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2010 3:29 am 
Offline

Joined: Tue Oct 26, 2010 1:57 am
Posts: 3
.... sorry if my multiple questionings gave you the impressions of a homework..... then I'll make it short.

How do I print the EXACT location of a memory as a output?
Such as user inputs "1 2 3 4 5 1 2 1 7" then it can output:

The smallest number entered is 1, and the locations of the smallest input is $0D... etc.

Using only parameter passing / subroutines to accomplish this, if any is required.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 06, 2010 1:14 am 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
JRICE wrote:
.... sorry if my multiple questionings gave you the impressions of a homework.

There are plenty of books on 68K programming, and assembler programming, that cover such material.

Quote:
How do I print the EXACT location of a memory as a output?
Such as user inputs "1 2 3 4 5 1 2 1 7" then it can output:

Enumerate through the list using an address register as an index, and a data register to keep track of the lowest (minimum) number. Then enumerate it a second time, and if the number matches the previous minimum print out the number in the data register, and then copy the address register to another data register and print that out.

Quote:
The smallest number entered is 1, and the locations of the smallest input is $0D... etc.

Probably not going to be in a low memory address, the 68K stores vectors down there.

Quote:
Using only parameter passing / subroutines to accomplish this, if any is required.

Parameters are are passed to subroutines either in registers on or the stack. Languages like C and PASCAL usually put them on the stack, whereas an assembler programmer might use the registers for simple routines. Books on assembler should have pretty good coverage of such.

If not homework, provide some context for your questions or details of your current reading list.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 06, 2010 5:14 am 
Offline

Joined: Tue Oct 26, 2010 1:57 am
Posts: 3
as helpful as that is clive.
i can understand what you mean, but thats the theory... i know that from the beginning ==
I'm asking whats the instruction to do such thing...
can give me a example?
I appreciate your time, but what you said is much similar to saying what I already know.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 06, 2010 12:55 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
JRICE wrote:
I appreciate your time, but what you said is much similar to saying what I already know.

Ok, so provide some context, or example of the code you have so far, or how you would achieve the task in C.
Code:
* task number 3 is used to display the contents of D1.L as a number

   moveq   #3,d0   task number 3 into D0
   move.l  (a0),d1 load content of address into D1
   trap   #15   display number in D1.l

* task number 15 is used to display the contents of D1.L as a number in D2 base

   moveq   #15,d0   task number 15 into D0
   moveq   #16,d2   base 16, hex
   move.l  a0,d1   load address into D1
   trap   #15   display address in D1.l in hex


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] 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:  
cron
Powered by phpBB® Forum Software © phpBB Group