This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
Z80 & 68k Assembly =>
z80 & ez80 Assembly
Author |
Message |
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 24 May 2009 03:33:10 pm Post subject: |
|
|
"How long does a B_CALL take?" A simple question which I'm not sure has ever been definitively answered. I was bored, so I worked it out.
Code: T-states taken to perform a B_CALL to...
Platform App Page 0 Other OS Boot
--------------------------------------------------------------
TI-83+, OS 1.12 570 541 542 532
TI-83+, OS 1.18 879 819 820 810
TI-83+ SE, OS 1.18 875/880(*) 815 816 806
TI-84+, OS 2.41 1261/1248(**) 1045 1046 1036
TI-84+ SE, OS 2.41 1257/1244(**) 1041 1042 1032
(*) Slightly faster if the app is located in the first 32 pages of
Flash.
(**) Slightly faster if interrupts are disabled.
Returning from a B_CALL takes an extra 75 T-states regardless of the OS version.
So remember, kids, when you B_CALL CpHLDE, your code becomes 25% smaller and over 2000% slower! |
|
Back to top |
|
|
Mapar007
Advanced Member
Joined: 04 Oct 2008 Posts: 365
|
Posted: 24 May 2009 11:16:33 pm Post subject: |
|
|
Over 1000 clocks on a 84???? WOW I'm convinced... |
|
Back to top |
|
|
darkstone knight
Advanced Member
Joined: 07 Sep 2008 Posts: 438
|
Posted: 25 May 2009 04:03:57 am Post subject: |
|
|
whoa, the older OS's are faster?
*goes to download OS 1.12* |
|
Back to top |
|
|
Galandros
Active Member
Joined: 29 Aug 2008 Posts: 565
|
Posted: 26 May 2009 08:16:46 am Post subject: |
|
|
That was a fear I had... |
|
Back to top |
|
|
Galandros
Active Member
Joined: 29 Aug 2008 Posts: 565
|
Posted: 13 Jun 2009 06:13:01 am Post subject: |
|
|
Curiosity:
I did my routine for switching and calling code from others pages in apps and return after the call. Its function is every similar to bcall. Differences are it does relative swapping of pages and all the data is inlined (a word for routine address and a byte for relative position of page) I am not sure if it can work like a bcall but maybe yes.
And it preserves all registers. But the code is obfuscated and abuse of sp and ex's use. I imagine it needs to disable interrupts in one part of the code because of the stack usage, if a call happens it will obliterate important data in the stack. Also while using it don't have a custom interrupt routine in the page that called code, result is 99% not good.
A very good practise while messing a lot with stack is making a scheme in paper of the stack... It also serves to complicated data stuff. I mastered stack use with this by the way...
It is around 430 clocks... And around 50 bytes if my memory is updated. It needs one byte of ram to save the of the page.
I will show the code when I copy it to my computer with internet. I would like to hear what you think about it.
I will try to do a light version of it that only branches to next page... While still preserving all registers, that is the hard part. |
|
Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page