* long shift routines - file 2

 name Long_Shift2

 text

* shift right long

  global shrlong
shrlong tstb
  bne 1f
  rts
1 cmpb #32
  bls 2f
  ldb #32
2 pshs b
3 asr 3,s
  ror 4,s
  ror 5,s
  ror 6,s
  dec 0,s
  bne 3b
  puls b,pc

* unsigned shift right long

  global ushrlong
ushrlong tstb
  bne 1f
  rts
1 cmpb #32
  bls 2f
  ldb #32
2 pshs b
3 lsr 3,s
  ror 4,s
  ror 5,s
  ror 6,s
  dec 0,s
  bne 3b
  puls b,pc

 end
