|
Atari coding BBS
Re: Optimisation question |
Posted by: defjam
|
May,03.2012-17:33
|
regarding using SP:
move.l #set_super,$80.w ; trap #0 vector
move #$0300,SR ; goto user-mode
;-- you can savely use SP from this point
;--
back_to_super:
trap #0
rts
set_super:
move.b #$23,(SP)
rte
Only drawback is - you can't use the USP register (f.e. for fast pointer copy)
You can use SP & USP,
but SP needs to have some savety-space (decrementing buffer-space)
f.e.:
example_sub:
move.l SP,$140.w
lea coords,SP
lea output,a6
move #100-1,d7
process:
move.w (sp)+,d0
move.w (sp)+,d1
muls d0,d1
move.l d1,(a6)+
dbf d7,process
move.l $140.w,SP
rts
ds.b 256 ; SP savety (interrupts!!)
coords:
ds.w 2*100
output:
ds.l 100
coords will be trashed if interrupt occurs.
(interrupt SR & SP save)
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
Optimisation question
|
Sallafranque/Thadoss
|
May,02.2012-19:07
|
Re: Optimisation question
|
Sallafranque/Thadoss
|
May,02.2012-19:10
|
Re: Optimisation question
|
Cyprian
|
May,02.2012-19:39
|
Re: Optimisation question
|
Bod/STAX
|
May,02.2012-22:02
|
Re: Optimisation question
|
evil
|
May,03.2012-14:43
|
Re: Optimisation question
|
evil
|
May,03.2012-17:16
|
Re: Optimisation question
|
defjam
|
May,03.2012-17:33
|
Re: Optimisation question
|
mikro
|
May,03.2012-10:11
|
Re: Optimisation question
|
mikro
|
May,03.2012-10:12
|
Re: Optimisation question
|
gloky
|
May,03.2012-03:50
|
Re: Optimisation question
|
Sallafranque/Thadoss
|
May,03.2012-18:46
|
Re: Optimisation question
|
ggn
|
May,04.2012-08:01
|
Re: Optimisation question
|
gloky
|
May,04.2012-17:16
|
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.
|