Timing of code (Risc OS)

bbc micro/electron/atom/risc os coding queries and routines
Post Reply
thoughstar
Posts: 12
Joined: Wed Jul 15, 2020 10:43 am
Location: Oslo, Norway
Contact:

Timing of code (Risc OS)

Post by thoughstar » Sat Jul 18, 2020 8:47 pm

Hi,

So I appear to have been roped into coding for Risc OS / ARM again.

Can anyone remember how we used to determine if we had any raster time left?

Is this the way to do it? (vasm)

adr r0,redborder
mov r1,#6
swi OS_WriteN
<do something>
adr r0,blackborder
mov r1,#6
swi OS_WriteN

redborder: .byte 19,0,24,255,0,0
.align 4
redborder: .byte 19,0,24,0,0,0
.align 4

Tor

User avatar
SarahWalker
Posts: 1312
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Timing of code (Risc OS)

Post by SarahWalker » Sat Jul 18, 2020 8:57 pm

That looks about right. Other than two labels called 'redborder' obviously.

thoughstar
Posts: 12
Joined: Wed Jul 15, 2020 10:43 am
Location: Oslo, Norway
Contact:

Re: Timing of code (Risc OS)

Post by thoughstar » Sat Jul 18, 2020 10:45 pm

SarahWalker wrote:
Sat Jul 18, 2020 8:57 pm
That looks about right. Other than two labels called 'redborder' obviously.
:roll: ;)

User avatar
kieranhj
Posts: 921
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Timing of code (Risc OS)

Post by kieranhj » Sun Jul 19, 2020 10:38 am

Coming from the Beeb I always forget the Archie has a border. I will borrow this idea for raster timing!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

Post Reply

Return to “programming”