ar kollat på nätet och hittat en del kod för detta, bland annat följande:
Kod: Markera allt
random16
rlf RandHi, W
xorwf RandHi, W ; xor (D15, D14) now in W reg, D7
movwf temp
swapf RandHi, W
rlf RandLo, f
rlf RandHi, f
swapf RandLo, f ; D3 now in RandLo, D0
xorwf RandLo, W ; xor (D12, D3) now in W reg, D0
swapf RandLo, f
rlf temp, f
rlf temp, f
xorwf temp, W
movwf temp
rrf RandLo, f
rrf temp, f
rlf RandLo, f
return
Har även lite svårt att förstå hur något som inte innefattar något slumpmässigt kan ge ett slumptal?
Finns det bättre asm-rutiner som fungerar på en 12F675?