News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Capturing stdout

Started by TomRiddle, February 06, 2007, 06:05:39 PM

Previous topic - Next topic

TNick

> I probably hit Modify on my posts at least 2 times after they actually get posted, just to fix small semantical errors.

Heh, it happens to me too

Just a question: Did you test multiple shl V, 1 against some shl V, x for speed? I didn't do it either but, even if shl x, 1 is a fast instruction, long dependency chains may slow down your code much more than a shl V, x (where 2 < x < 32), I think.

Regards,
Nick

TomRiddle

Hmm, as far as my documents say, you can't shift a register by more than one on an 8086, the only other option would be to use Cl, I suppose a Push Cx/Pop Cx would be fine for it before(preserve Cx).

Those macro's were made for 8086 compliance only, the new ones use immediates. :toothy

From "/Cpu/186/"

; "AddTag" "MultiplyBy*"
MultiplyBy4 Macro V
  Shl V,2
EndM
MultiplyBy8 Macro V
  Shl V,3
EndM
MultiplyBy16 Macro V
  Shl V,4
EndM
MultiplyBy32 Macro V
  Shl V,5
EndM
MultiplyBy64 Macro V
  Shl V,6
EndM
MultiplyBy128 Macro V
  Shl V,7
EndM
MultiplyBy256 Macro V
  Shl V,8
EndM