blob: 7a3fd54fd49f245b1b508717cbfff325d1355855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
; (c) Copyright 2007-2008 Zilog, Inc.
;-------------------------------------------------------------------------
; Byte Shift Right Signed
; Input:
; Operand1:
; A : 8 bit number to shift
; Operand2:
; B : 8 bit shift count
;
; Output:
; Result: A : 8 bit
; Registers Used:
; flags
;-------------------------------------------------------------------------
.def __bshrs
.assume adl=1
__bshrs:
push bc
inc b
jr test
loop:
sra a
test:
djnz loop
pop bc
ret
|