Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 15:17:02 *
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 1256 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« on: 18 February, 2012, 08:57:59 »
0

Hi,
I was wondering if somebody could make me a .8xp in ASM that counts to 10,000 and displays the number it is on on the screen. This is so I can test the speed of my calc and compare it to other stuff.

Thanks, and have a nice day,
nxtboy III
Logged

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: 19 May, 2013, 19:18:47
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #1 on: 18 February, 2012, 17:39:29 »
0

Well, you could use this, but how are you planning to test speed with it?
Quote from: Z80 Assembly
#include    "ti83plus.inc"
#define     progStart   $9D95
.org        progStart-2
.db         $BB,$6D
   bcall(_ClrLCDFull)
   bcall(_HomeUp)
    ld  HL, 0
Loop:
    push    HL
    bcall(_DispHL)
    bcall(_NewLine)
    pop     HL
    inc HL
    ld  DE, 10000
    xor A
    sbc HL, DE
    add HL, DE
    jr  nz, Loop
    ret
Generated by the BBify'r (http://clrhome.org/resources/bbify/)
But it's not very useful at all, since most of the time it takes is to display the number, so it's not much faster than doing it in TI-BASIC (left side is ASM, right side is BASIC):


* hello.gif (422.12 KB, 384x128 - viewed 125 times.)
* hello.8xp (0.1 KB - downloaded 13 times.)
Logged




nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #2 on: 18 February, 2012, 17:43:11 »
0

Is there a way to make it not display a new line each time? Just on the same line?
Logged

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: 19 May, 2013, 19:18:47
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #3 on: 18 February, 2012, 17:48:22 »
0

It would just keep going to the right, and after three numbers you wouldn't be able to see any more.
Logged




nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #4 on: 18 February, 2012, 17:49:30 »
0

Oh. Well I was doing this so I could test the speed between my NXT and my calc.
Logged

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

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


Total Post Ratings: +260

View Profile
« Reply #5 on: 18 February, 2012, 17:50:56 »
0

maybe add extra clrLCDFull somewhere in the loop? even though it will slow things down? or set pencol or whatever it's called?
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: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #6 on: 18 February, 2012, 17:53:38 »
0

I made a program for it on my NXT in assembly that counts and displays the number.(It displays the number in the same place the whole time.) It counts to 10,000 in about 4 seconds.

EDIT: i'm sorry. i accidentally hit the modify button instead of quote =/
*shmibs
« Last Edit: 20 February, 2012, 08:50:39 by shmibs » Logged

Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 05:42:54
Date Registered: 02 July, 2009, 06:38:05
Posts: 1679


Total Post Ratings: +492

View Profile
« Reply #7 on: 18 February, 2012, 18:07:00 »
+2

Without displaying numbers, an optimized z80 assembly loop structure could count to 10000 in about 1/30th of a second. Although I would not recommend comparing processor/language speed by seeing how fast they can count to 10000, simply because there are multiple variables that will skew the results an extreme amount; display or not, scroll or not, how fast the system text routine is, how the screen is updated, and so on. If you have a project in mind, I would say the best way to compare speed is simply to start coding the project for both platforms and compare simplified, test versions of them.
« Last Edit: 18 February, 2012, 18:08:39 by Runer112 » Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #8 on: 18 February, 2012, 18:08:58 »
0

Huh? Are you sure it can count to 10,000 in about 1/30th of a second?
That seems super fast.......
Well, here it is for my NXT:(Sorry it's an avi)

For the calc one:
Could you edit the TI 84 program so it stops when it gets to 10,000?

* NXTcount0001.avi (154.53 KB - downloaded 30 times.)
« Last Edit: 18 February, 2012, 18:09:18 by nxtboy III » Logged

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

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


Total Post Ratings: +260

View Profile
« Reply #9 on: 18 February, 2012, 18:15:57 »
0

you could add this at the end of the loop: If Ans=10000:Stop
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: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #10 on: 18 February, 2012, 18:16:43 »
0

Do you think you could add it and compile it to an 8xp for me? I don't know how.
Logged

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

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


Total Post Ratings: +260

View Profile
« Reply #11 on: 18 February, 2012, 18:17:58 »
0

I don't have the source file XP
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: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #12 on: 18 February, 2012, 18:19:55 »
0

Well there's this if this helps:

#include    "ti83plus.inc"
#define     progStart   $9D95
.org        progStart-2
.db         $BB,$6D
   bcall(_ClrLCDFull)
   bcall(_HomeUp)
    ld  HL, 0
Loop:
    push    HL
    bcall(_DispHL)
    bcall(_NewLine)
    pop     HL
    inc HL
    ld  DE, 10000
    xor A
    sbc HL, DE
    add HL, DE
    jr  nz, Loop
    ret
Logged

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

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


Total Post Ratings: +260

View Profile
« Reply #13 on: 18 February, 2012, 18:23:15 »
0

oh. I thought you were asking about TI-BASIC file Big smile
sorry, I don't have a compiler.
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: Today at 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #14 on: 18 February, 2012, 18:24:00 »
0

What about in BASIC?
Is there another easy way I can compare speed?


EDIT: My NXT counts to 1 million in about 39 seconds in assembly.
« Last Edit: 18 February, 2012, 18:29:30 by nxtboy III » Logged

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.332 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.