Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 16:52:54 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: Count to 10,000 in ASM -  (Read 1254 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Keoni29
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: Today at 15:42:44
Date Registered: 15 March, 2011, 16:23:33
Location: The Netherlands
Posts: 1113


Total Post Ratings: +146

View Profile WWW
« Reply #15 on: 18 February, 2012, 18:31:15 »
0

You might wanna skip frames Smiley
Logged


Spoiler for Hidden:
Last signature update 10:55 april 22nd 2013
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #16 on: 18 February, 2012, 18:32:56 »
0

Too bad I do not have a compiler. I just want the program for the calc to stop when it gets to 10,000 , without displaying the number.
Logged

MGOS
LV5 Advanced (Next: 300)
*****
Online Online

Gender: Male
Last Login: Today at 16:30:11
Date Registered: 29 July, 2011, 16:54:53
Location: Germany
Posts: 295


Total Post Ratings: +73

View Profile
« Reply #17 on: 18 February, 2012, 18:42:08 »
0

Why don't you use axe? You'll get a less optimized, but decent asm program.

1
2
3
4
5
0->C
While C+1->C-10000
End
Disp "Finished"
My TI 83+ does that in less than a second.
Logged

Click those to see more information Smiley
Current   
Projects: 
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 01:44:48
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #18 on: 18 February, 2012, 18:43:38 »
0

and if you use TI-84+ speed, it's 2.5 times faster than TI 83+ does, so... you do the math Big smile
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #19 on: 18 February, 2012, 18:54:45 »
0

How many seconds does it take for it to get to 100,000 in Axe? I can't calculate it because all you said was "less than a second."

BTW, what does the -> mean in Axe?

EDIT: Could you send me the .8xp?
« Last Edit: 18 February, 2012, 18:57:32 by nxtboy III » Logged

Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 01:44:48
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #20 on: 18 February, 2012, 18:57:00 »
0

it's actually →, which is used for storing.
also, axe only goes up to 65535. Big frown
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #21 on: 18 February, 2012, 19:00:47 »
0

Ok, then make it count to 60,000.

EDIT: So I guess Axe can only handle 16-bit values. The max for a 16-bit value on my NXT is also 65535, if it is unsigned (Can only be a postitive number). But the NXT can handle 32-bit values. The max for an unsigned 32-bit value is 4294967295.
« Last Edit: 18 February, 2012, 19:04:30 by nxtboy III » Logged

MGOS
LV5 Advanced (Next: 300)
*****
Online Online

Gender: Male
Last Login: Today at 16:30:11
Date Registered: 29 July, 2011, 16:54:53
Location: Germany
Posts: 295


Total Post Ratings: +73

View Profile
« Reply #22 on: 18 February, 2012, 19:05:01 »
0

My TI 83+ takes 1.39 seconds from 0 to 60000 (interrupts turned off).
« Last Edit: 18 February, 2012, 19:05:59 by MGOS » Logged

Click those to see more information Smiley
Current   
Projects: 
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #23 on: 18 February, 2012, 19:06:24 »
0

My NXT takes about 1.5 seconds to count from 60000 to 0.

EDIT: Actually, it takes about 2.2 seconds.
« Last Edit: 18 February, 2012, 19:10:01 by nxtboy III » Logged

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:28:22
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50204


Total Post Ratings: +2611

View Profile WWW
« Reply #24 on: 18 February, 2012, 21:40:05 »
0

The reason why nxtboy III asked this program is because he wanted to compare the speed of the LEGO Mindstorm NXT with the TI-84 Plus. Assuming his Mindstorm program did not display a counter or update the LCD until the very end, then it seems like the 84+ is much faster despite being 15 MHz instead of over 40.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: 18 May, 2013, 00:41:29
Date Registered: 15 August, 2010, 09:18:54
Posts: 3187


Total Post Ratings: +218

View Profile
« Reply #25 on: 18 February, 2012, 22:14:05 »
0

My NXT takes about 1.5 seconds to count from 60000 to 0.

EDIT: Actually, it takes about 2.2 seconds.

Did you make sure to turn off whatever OS overhead the lego thing has and write the test in a compiled language? The z80 is a very old chip, so I'd be a bit surprised if the more modern chip in an NXT is beaten by it.

EDIT:

Huh? Are you sure it can count to 10,000 in about 1/30th of a second?
That seems super fast.......


The z80 in an 84+ is running at around 15MHz in full speed. That's 15 million cycles per second, which gives a couple million operations per second. counting to 10,000 in a fraction of a second seems a lot more reasonable in that light. Also, counting isn't the best way to compare CPUs. More modern CPUs are going to be able to take advantage of counter hardware or very, very fast ALUs.
« Last Edit: 18 February, 2012, 22:19:48 by Qwerty.55 » Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #26 on: 19 February, 2012, 00:42:42 »
0

I don't think there is a way to turn off the OS overhead, unless it already does.
Well the NXT's processor runs at 48 Mhz, though it seems slower.

What's an ALU?

EDIT: Looked it up. The ALU is the part that calculates math stuff.
« Last Edit: 19 February, 2012, 01:06:32 by nxtboy III » Logged

AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: 18 May, 2013, 00:41:29
Date Registered: 15 August, 2010, 09:18:54
Posts: 3187


Total Post Ratings: +218

View Profile
« Reply #27 on: 19 February, 2012, 01:08:25 »
0

Looks like the NXT has an ARM7 chip inside. I can pretty much guarantee that an ARM7 at 48 MHz is faster than the z80 in the 84+. It's RISC, it has a real pipeline, caching, etc. If it's indeed an ARM7, then there's no real need to do anything more than compile this in with whatever your favorite NXT C/C++ compiler is and compare it to the Axe code given previously.


1
2
3
4
5
6
7
8
9
#include <stdio.h>
int main(){
  a=60000;
  while(a){
    a=a-1;
  }
  printf("Done\n");
  return 0;
}

Edit: Forgot main()...
« Last Edit: 19 February, 2012, 01:09:39 by Qwerty.55 » Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 15 May, 2013, 02:00:51
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #28 on: 19 February, 2012, 01:15:05 »
0

Well... That's not exactly how to program it but I made a program that basically does that, and it goes slower than the calc. It would be better if I had a .8xp that does that for the calc so I can test it. Could someone post a .8xp for that?
Logged

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:28:22
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50204


Total Post Ratings: +2611

View Profile WWW
« Reply #29 on: 19 February, 2012, 09:29:46 »
0

Well the above code is written in C so someone would need to turn it in Z80.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.191 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.