Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / dude, look what we have got in homework!

Author
Message
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 25th Oct 2004 19:28 Edited at: 25th Oct 2004 19:29
here is the link to the "virtual computer" we are going to program in
http://www.course.com/downloads/computerscience/aeonline/6/4/index.html

and these are our "objectives": (try to make them if you can)

(please forgive me if there are some bad spelling or grammar, I am converting from norwegian to english, and I dont know every word in english so I use synonyms)
Quote: "
make an Assembly program for each of the expressions below:
* x = x + y*z (x,y,z must be <> 0 at start)
* repeat until x = 0 (x = 3 at start, x must be dec. by 1 each loop)
* if x < y then
x = z
else
x=y
endif (at start x=3, y=5, z=7)
the assembly code must be written, tested and documented in your answer. you must also describe how data moves fr4om memory to processor and back again.
"


can somebody help me with this?

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Oct 2004 20:26
That looks like a standard Java education question.

Write the Pseudo-code for it, and go from there.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 25th Oct 2004 20:43
eh.. "Pseudo" - what the?
can you explain what that is?

we are going to use this wierd language Ive never used before, my teacher sais it is almost the same as motorola uses.
but look what I found out: (commands)
add = add value to variable
mul = multiply value with variable
sto = save value to variable
hlt = end program
I dont understand anything. must ask someone, so I got here.
but I can ask my teacher, then he'll get mad. (he's crazy)

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 25th Oct 2004 21:10
dude, I made it:

w = 0
x = 3
y = 5
z = 7
lod w
add y
mul z
sto w
lod x
add w
sto x
hlt

I made it, yes!
two more to go!

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
computer
19
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 26th Oct 2004 01:25
Tell your teacher you're REALLY INTERESED in how these funny chips work. Say you are not sure why it works and get him to demonstrate it. If he won't do that then you best start going to your lessons or pay attention in them. IF he goes mad at you then he's a complete tit. Ask your mates at school if they understand it. If they don't then you best get the teacher to explain.
I went to college and the lecturers could go over and over this stuff until we all had it. Only reason they did that is because the whole class was lazy and didn't care. Show you care about these AMAZING chips because they do control EVERYTHING these days... even your toasters.

bleep bleep
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 26th Oct 2004 18:51
yeah, sure dude. Ill try, its just so hard. we have a computer right infront of us all day so its kind of hard not to look on it and once you do your hooked up. cant look up again .

but hey, I made one task without even knowing how I should do it, so I think I have it in me!!

no. I guess not

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 26th Oct 2004 23:16
Heh, I'd like to help you, but the only ASM I've got any experience with is for the 6502 (used in nintendos) processor. That and the Neander, which I doubt will be of use to anyone.

Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 27th Oct 2004 02:39
wow- u get to do propper computer stuff in schools in norway- here we're still learning how to change text fonts

Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 27th Oct 2004 04:48
ICT Teacher: "And the most advanced lesson of all now follows: The trials and tribulations of SUM in Microsoft Excel. Now most of you will fail this course but its not easy, it took me 12 years to master..."




well ok that was made up but heh its true

I would help but I cant.

[center]:: Doo do do do do - I'll explain when you're older ::
[center]
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 27th Oct 2004 05:14
hah! SUM()! I love it^_^ Any idea how hard it is explaining that concept to a newb tho

[center]
Come write!
Yarr join LoGD, and defeat your fellow coders!
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 27th Oct 2004 05:20
I taught my grandad in 5 minutes .....noobs however, that's a different story

[center]:: Doo do do do do - I'll explain when you're older ::
[center]
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 27th Oct 2004 05:25
I should change my job title :: Master Newb Trainer...

Aye, I train teh newbs... come home every night and gotta take apart and put back my pc completely to wash the newbiness stink off me

But hey! It's still better than flipping burgers at the BK

[center]
Come write!
Yarr join LoGD, and defeat your fellow coders!
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 27th Oct 2004 05:26
true....or worse than a bus driver....I'm actually quite good at training noobs except for the fact I have no patience...

[center]:: Doo do do do do - I'll explain when you're older ::
[center]
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 27th Oct 2004 05:33
x = x + y*z (x,y,z must be <> 0 at start)

in x86 assembly that would be



assuming x,y and z have been declared as 16-bit variables.

AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
Errie
21
Years of Service
User Offline
Joined: 6th Nov 2002
Location: NW England
Posted: 27th Oct 2004 08:31 Edited at: 27th Oct 2004 08:31
That last one's quite fun to do - took me about 5 minutes but I got there in the end.
My answer (if you want it):



If you get any more difficult problems, could you post them? I'd like to give them a try. ASM always sounded like more hassle than it was worth but I'm now tempted to give it a go if it's anything like that.

We rode on the winds of the rising storm, we ran to the sounds of the thunder.
We danced among the ligtning bolts, and tore the world asunder.
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 27th Oct 2004 17:51 Edited at: 27th Oct 2004 17:52


dude.... you did it

you did the most difficult one!

we have these tasks, we can choose either yellow, blue or red.
red is the hardest, yellow is easiest. (I chose red)

my teacher said that last one (the one you just did) was the hardest part. and no student had made it ever. (dont know if thats true).

but you did! dude, you are good. have you trained or did you just think of something and it worked? (like was you born with skills?)
---------------------
edit:

sorry, I dont have any more. but I can ask my teacher if he has any.

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 27th Oct 2004 21:07
Hehe, just noticed the link now. The 2nd one is quite easy too:



This is my solution for the first one


And for the last one



AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 27th Oct 2004 22:26 Edited at: 27th Oct 2004 22:27
heh! ofcorse! now that I see the answer it looks really easy! dude, the next one I think I will be able to do much better! thanks!

its me n0id!

This is a Map Editor ver 2 DEMO Out now! http://www.tiame.tk
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 27th Oct 2004 22:48
Hehe, no worries.
Assembly is a different way of thinking from normal high-level coding, I sometimes find it more enjoyable aswell :-P

AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
computer
19
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 28th Oct 2004 02:17
I enjoyed controling a Motor, LEDs, 7-seg display on a Board with a
PIC 16F84 EEPROM

good stuff. I liked those programming lessons.

bleep bleep

Login to post a reply

Server time is: 2024-09-22 22:34:52
Your offset time is: 2024-09-22 22:34:52