1; GEOS KERNAL by Berkeley Softworks
2; reverse engineered by Maciej Witkowiak, Michael Steil
3;
4;
5
6.include "const.inc"
7.include "geossym.inc"
8.include "geosmac.inc"
9.include "config.inc"
10.include "gkernal.inc"
11.include "c64.inc"
12
13.ifdef wheels
14.import BBMult_ret
15.endif
16
17.global _DShiftRight
18
19.segment "math1a2"
20
21;---------------------------------------------------------------
22;---------------------------------------------------------------
23_DShiftRight:
24	dey
25.ifdef wheels
26.ifdef wheels
27.if 0 ; XXX cc65 issue: branch can't cross segment
28	bmi BBMult_ret
29.else
30	.byte $30, <(BBMult_ret - (* + 1))
31.endif
32.else
33	bmi @1
34.endif
35.else
36	bmi @1
37.endif
38	lsr zpage+1,x
39	ror zpage,x
40	jmp _DShiftRight
41.ifndef wheels
42@1:	rts
43.endif
44
45