Phu Tran Hoang
2022-07-22 05:19:55 UTC
;Replace "rep movsb" by the following code
test di,1 ; alaign by word
jz $+4
movsb
dec cx
shr cx,1
rep movsw
jnc $+3
movsb
;Replace "rep stosb" by the following code
mov ah, al
test di,1 ; alaign by word
jz $+4
stosb
dec cx
shr cx,1
rep stosw
jnc $+3
stosb
test di,1 ; alaign by word
jz $+4
movsb
dec cx
shr cx,1
rep movsw
jnc $+3
movsb
;Replace "rep stosb" by the following code
mov ah, al
test di,1 ; alaign by word
jz $+4
stosb
dec cx
shr cx,1
rep stosw
jnc $+3
stosb