Advertisement
STANAANDREY

risc lfsr shifter

Oct 22nd, 2024
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         BRA main
  2. main    LDR R3, SEED
  3.         MOV R0, R3
  4. loop    JMS LFSRSh
  5.         OUT R0
  6.         CMP R0, R3
  7.         BNE loop
  8.         HLT
  9. LFSRSh  MOV R1, R0
  10.         AND R1, #1
  11.         LSR R0, #1
  12.         CMP R1, #1
  13.         BEQ xorit
  14.         RET
  15. xorit   LDR R2, MASK
  16.         XOR R0, R2
  17.         RET
  18. MASK    DAT 12
  19. SEED    DAT 15
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement