6502 Assembly: Processor Speed?

Last Page >>
Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:41 p.m.

so i'm using this to measure the cycles per second:

@wait: phx phy ldx #0 ldy #0 _loop1: dex ;256*256 times ; 2 cycles = 131072 bne _loop1 ;256*256 times (255*256 times succeeds); 2 cycles (+1 if branch succeeds) = 196352 ldx #255 ;256 times ; 2 cycles = 512 dey ;256 times ; 2 cycles = 512 bne _loop1 ;255 times succeeds ; 2 cycles (+1 if branch succeeds) = 768 ply ; => 329216 cycles wasted \o/ this took ~5.5 seconds cycles_per_second=cycles/seconds plx ; ~=> 59857 cycles per second rts

Can anyone confirm this ? (notes: 1. i know its a terrible way to wait 2. that cycles per second is the same as the takt rate in Hz so 60000 cycles per second would be 60kHz 3. i used a rather in accurate timing measure meant 4. sorry if i used a lot of cpu when trying this 5. hopefully timing will come soon )


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:42 p.m.

(notes:

  1. i know its a terrible way to wait

  2. that cycles per second is the same as the takt rate in Hz so 60000 cycles per second would be 60kHz

  3. i used a rather in accurate timing measure meant

  4. sorry if i used a lot of cpu when trying this

  5. hopefully timing will come soon

  6. i suck at markdown :/

)


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:44 p.m.

'@wait: phx phy ldx #0 ldy #0 _loop1: dex ;256256 times ; 2 cycles = 131072 bne _loop1 ;256256 times (255*256 times succeeds); 2 cycles (+1 if branch succeeds) = 196352 ldx #255 ;256 times ; 2 cycles = 512 dey ;256 times ; 2 cycles = 512 bne _loop1 ;255 times succeeds ; 2 cycles (+1 if branch succeeds) = 768 ply ; => 329216 cycles wasted \o/ this took ~5.5 seconds cycles_per_second=cycles/seconds plx ; ~=> 59857 cycles per second rts '


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:45 p.m.

@wait: phx phy ldx #0 ldy #0 _loop1: dex ;256*256 times ; 2 cycles = 131072 bne _loop1 ;256*256 times (255*256 times succeeds); 2 cycles (+1 if branch succeeds) = 196352 ldx #255 ;256 times ; 2 cycles = 512 dey ;256 times ; 2 cycles = 512 bne _loop1 ;255 times succeeds ; 2 cycles (+1 if branch succeeds) = 768 ply ; => 329216 cycles wasted \o/ this took ~5.5 seconds cycles_per_second=cycles/seconds plx ; ~=> 59857 cycles per second rts


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:46 p.m.

Last attempt:

@wait: phx phy ldx #0 ldy #0 _loop1: dex ;256*256 times ; 2 cycles = 131072 bne _loop1 ;256*256 times (255*256 times succeeds); 2 cycles (+1 if branch succeeds) = 196352 ldx #255 ;256 times ; 2 cycles = 512 dey ;256 times ; 2 cycles = 512 bne _loop1 ;255 times succeeds ; 2 cycles (+1 if branch succeeds) = 768 ply ; => 329216 cycles wasted \o/ this took ~5.5 seconds cycles_per_second=cycles/seconds plx ; ~=> 59857 cycles per second rts


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:47 p.m.

so this is weird

``` this forum markdown will remove single newlines

but leave double newlines (i think?)

in code blocks (```)

```


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:47 p.m.

``` test1 test2

test3 ``` (btw please work :()


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:47 p.m.

well ``` wtf

```


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:48 p.m.

``` why can't i do code blocks anymore ??

```


Processor Speed?
bauen1(Game Moderator)
Aug. 29, 2016, 5:49 p.m.

test ``` test2 test3

test4 ```


1 2 >>
Page 1 of 2.