1
0
mirror of https://github.com/wfjm/w11.git synced 2026-02-09 01:51:12 +00:00
Files
wfjm.w11/tools/asm-11/lib/randzp.mac
2019-07-20 10:10:08 +02:00

29 lines
568 B
Plaintext

; $Id: randzp.mac 1184 2019-07-10 20:39:44Z mueller $
; SPDX-License-Identifier: GPL-3.0-or-later
; Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
;
; pseudo random number generator
; seen in zpcae0; certainly not crypto grade quality !!
;
; Call:
; jsr pc, randzp
;
; All registers preserved
;
randzp: mov 1000$,r0
rol r0
rol r0
add 1001$,r0
mov r0,1000$
rol r0
rol r0
add 1001$,r0
rol r0
rol r0
mov r0,1001$
mov 1000$,r0
rts pc
;
1000$: .word 001233
1001$: .word 007622