פורסם 2008 בפברואר 1817 שנים היי,שאלה בקשר לפקודות באסמבלי בפקודות SHR , SAR, SHL/SAL : מתי הדגלים OF ו-CF נדלקים? ???
פורסם 2008 בפברואר 1817 שנים http://faydoc.tripod.com/cpu/shr.htmAt the end of the shift operation, the CF flag contains the last bit shifted out of the destination operand.The OF flag is affected only on 1-bit shifts. For left shifts, the OF flag is cleared to 0 if the most-significant bit of the result is the same as the CF flag (that is, the top two bits of the original operand were the same); otherwise, it is set to 1. For the SAR instruction, the OF flag is cleared for all 1-bit shifts. For the SHR instruction, the OF flag is set to the most-significant bit of the original operand.
פורסם 2008 בפברואר 1817 שנים מחבר אוקי נראה לי שהבנתי, לגבי OF - כשיש הזזה של סיבית אחת : בפקודה SHR ה-OF שווה לסיבית הכי שמאלית ובפקודה SAR ה-OF תמיד שווה ל-0 ובפקודה SHL/SAL ה-OF שווה ל-0 אם למספר המקורי ולמספר החדש יש את אותו סימן, אחרת 1=OF אני צודקת..? :
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.