]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/CMD/FC/MOVE.ASM
13 cProc Move
,<PUBLIC>,<DS,SI,DI>
19 jcxz NoByte
; No characters to move
20 les di,dst
; grab pointers
25 jnz SimpleMove
; segments are NOT the same, no opt
26 cmp si,di ; is the start of source before dest
27 jb TestMove
; yes, try to optimize
38 sub ax,si ; ax = difference between regions
39 cmp ax,cx ; is difference greater than region?
40 jae SimpleMove
; yes, no optimize
41 mov ax,cx ; optimize by copying down from top
46 rep movsb ; no word optimization here
52 cProc Fill
,<PUBLIC>,<DI>