|
Atari coding BBS
Re: optimize me! |
Posted by: Alien / ST-CNX
|
Apr,15.2010-04:48
|
Assuming the code were in Assembler, on a 68000 one would dedicate a register to the task and do something like:
<code>
jmp (a0)+ or jmp -(a0)
(It's been a while). This avoids writing to the stack, and the set of transitions are all written to a tablen. But as pointed out earlier, you really need to start with 68000 for all your subroutines.
IIRC, I did something like this for a Z80 emulator on the ST... I think I put it all in the lower 64Kb so that I could do a jmp.w and simply load 2 bytes instead of 4, but it's so long ago I'm no longer sure.
Alternatively you can simply push the table to the stack, and then return from each routine.
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
optimize me!
|
PeP
|
Mar,11.2010-00:55
|
Re: optimize me!
|
PeP
|
Mar,11.2010-01:28
|
Re: optimize me!
|
mikro
|
Mar,11.2010-10:09
|
Re: optimize me!
|
sqward
|
Mar,11.2010-11:58
|
Re: optimize me!
|
PeP
|
Mar,11.2010-14:32
|
Re: optimize me!
|
PeP
|
Mar,11.2010-14:31
|
Re: optimize me!
|
PeP
|
Mar,11.2010-14:44
|
Re: optimize me!
|
sqward
|
Mar,11.2010-15:50
|
Re: optimize me!
|
PeP
|
Mar,11.2010-16:05
|
Re: optimize me!
|
Alien / ST-CNX
|
Apr,15.2010-04:48
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|