EASy68K  
It is currently Sat Apr 04, 2020 7:01 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Oct 24, 2006 3:26 am 
Offline

Joined: Tue Oct 24, 2006 2:46 am
Posts: 3
hi,i am Josip(joseph) from croatia and I am a student of 2 year at the college of informatics. I have a course called arhitecture of computer systems and i have a essay in easy68k to write. The problem is that i know some parts of my assignement(like changing color,drawing a rectangle...) but i don't know how to work with files in easy68k.My task is this--read the coordinates of a rectangle from a file.then draw a rectangle in green color and write out the coordinates of the center of the rectangle(that must be seen on the screen like this->coordinates are:xxx yyy). my professor told us that this task has about 30 lines of code so could someone pliz help with it. if someone could write it i would be very grateful cause i don't have a clue and i heard that you guys here are profesionalls so this would be a piece of cake for you. i am not lazy,i know how to work in c,c++,pascal,logo,qbasic but this thing is too complicated for me...thank you for time...bye


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 7:59 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
It would not be appropriate to give you specific help with an assignment. There are examples included with EASy68K that demonstrate file I/O and graphics.

_________________
Prof. Kelly


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 10:35 pm 
Offline

Joined: Mon Dec 20, 2004 6:03 pm
Posts: 50
mysantrop wrote:
i know how to work in c,c++,pascal,logo,qbasic but this thing is too complicated for me...thank you for time...bye


The idea of the assignment is to learn assembly so that you know how to write in c,c++,pascal,logo,qbasic, and assembly too!

But seriously, if you understand those languages, it shouldn't be too hard to come up with the assembly code for that. The EASy68k help file has lots of information (I know because I helped write it.)

I haven't used assembly language ever since my Assembly Language class ended....it is not something I like to work with. However, it is very important to understand assembly language because it gives you an idea of what the processor is really doing when you run code written in another language (such as C++). This understanding allows you to write more efficient code.


Top
 Profile  
 
 Post subject: hej it's me again
PostPosted: Fri Nov 03, 2006 10:10 pm 
Offline

Joined: Tue Oct 24, 2006 2:46 am
Posts: 3
hy.i started working on my own as u suggested and i encountered a problem.i have a file and in it says 100 200 300 400. I did the part with typing the name of the file,opening it and reading it contects and saving it in memory of a1. when i go to the specified adress(11A0) on the right i see my numbers 100 200 300 400. the problem is how to put the first number (100) in D0,the second number(200) in D1,the third number(300) in D2 and the fourth number(400) in D3?? i gotta make a green rectangle and i know how to do it with console inputs for coordinates but i wasn't able to do it with coordinates stored in memory specified in A1. i tried move.l (a1),d0 but it only moved my array in the memory for 2 places to the right. i would be very grateful i someone could give a hand with that! thanks in advance


Top
 Profile  
 
 Post subject: Re: hej it's me again
PostPosted: Sat Nov 04, 2006 2:54 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
mysantrop wrote:
hy.i started working on my own as u suggested and i encountered a problem.i have a file and in it says 100 200 300 400. I did the part with typing the name of the file,opening it and reading it contects and saving it in memory of a1. when i go to the specified adress(11A0) on the right i see my numbers 100 200 300 400. the problem is how to put the first number (100) in D0,the second number(200) in D1,the third number(300) in D2 and the fourth number(400) in D3?? i gotta make a green rectangle and i know how to do it with console inputs for coordinates but i wasn't able to do it with coordinates stored in memory specified in A1. i tried move.l (a1),d0 but it only moved my array in the memory for 2 places to the right. i would be very grateful i someone could give a hand with that! thanks in advance


If A1 contains the address of the number 100 then MOVE.L (A1),D0 will place 100 in D0. From your question is sounds like this is what you wanted. I'm not sure I understand the problem. Please post your code along with a specific question.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject: hey
PostPosted: Sat Nov 04, 2006 6:00 pm 
Offline

Joined: Tue Oct 24, 2006 2:46 am
Posts: 3
START ORG $1000

* ispis teksta
MOVE #14,D0
LEA tekst1,A1
TRAP #15

*unos naziva datoteke
MOVE #2,D0
LEA unos1,A1
TRAP #15

* otvaranje datoteke
MOVE #51,D0
TRAP #15

* odredjivanje broja znakova za citanje
MOVE.L #20,D2
LEA unos2,A1
MOVE #53,D0
TRAP #15

* ispis teksta
MOVE #14,D0
LEA unos2,A1
TRAP #15

XXXXXXXXXXXXin this part i gotta pull out the coordinates for the rectangle so i can draw it.cordinates are put at the memory adress 11A0
___
000011A0: 31 30 30 20 32 30 30 20 33 30 30 20 34 30 30 00 100 200 300 400
how to put 100 in d0,200 in d1,300 in d2,400 in d3?the numbers are separated with a spaceXXXXXXXXXXXXX

* crtaj kvadrat
MOVE.L #90,D0
TRAP #15





MOVE.B #9,D0
TRAP #15 Halt Simulator


STOP #$2000
tekst1 DC.B 'Unesite naziv datoteke:',$D,$A,0
unos1 DS.L 80
unos2 DS.L 80


Top
 Profile  
 
 Post subject: Re: hey
PostPosted: Mon Nov 06, 2006 5:16 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
mysantrop wrote:
XXXXXXXXXXXXin this part i gotta pull out the coordinates for the rectangle so i can draw it.cordinates are put at the memory adress 11A0
___
000011A0: 31 30 30 20 32 30 30 20 33 30 30 20 34 30 30 00 100 200 300 400
how to put 100 in d0,200 in d1,300 in d2,400 in d3?the numbers are separated with a spaceXXXXXXXXXXXXX


The data appears to be represented in ASCII.
11A0: 31 -- ASCII code for '1'
30 -- ASCII code for '0'
30 -- '0'
20 -- ASCII code for Space

You will need to convert the data from ASCII to binary. Another possible solution would be to start with binary data in the file and read it into memory.

_________________
Prof. Kelly


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

All times are UTC


Who is online

Users browsing this forum: Bing [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:  
Powered by phpBB® Forum Software © phpBB Group