InvestorsHub Logo
Followers 0
Posts 297
Boards Moderated 0
Alias Born 04/26/2004

Re: mmoy post# 51599

Tuesday, 02/01/2005 8:12:19 PM

Tuesday, February 01, 2005 8:12:19 PM

Post# of 97730
Thinking about rgb->bgr

the best way is probably the simplest:

;esi ->src & dst
;ecx -> # triplets

;*************************************************

top:
mov al,[esi+0]
xchg al,[esi+2]
mov [esi+0],al
add si,3
dec ecx
jnz top

Only problem is that xchg locks the bus, so you may wish to do:

top:
mov al,[esi+0]
mov ah,[esi+2]
mov [esi+2],al
mov [esi+0],ah
add si,3
dec ecx
jnz top

Isn't that easier? And write allocation takes care of the memory accesses for you.

Volume:
Day Range:
Bid:
Ask:
Last Trade Time:
Total Trades:
  • 1D
  • 1M
  • 3M
  • 6M
  • 1Y
  • 5Y
Recent AMD News