ð» Processor Status WordïŒããã»ããµã®ç¶æ ã瀺ãã¯ãŒã

ããã»ããµã®ç¶æ ã瀺ãã¯ãŒããé称ãProcessor Status WordïŒPSWïŒãã¯ãã³ã³ãã¥ãŒã¿ã®ããã»ããµããã®æç¹ã§ã©ã®ãããªç¶æ ã«ãããã瀺ãéèŠãªæ å ±ã§ããããã¯ãããã»ããµãå®è¡ããŠããåœä»€ã®çš®é¡ãçŸåšã®å®è¡ã¢ãŒããå²ã蟌ã¿ã®æå¹æ§ããããŠãšã©ãŒç¶æ ãªã©ãå€ãã®æ å ±ãå«ãã§ããŸããæ¬èšäºã§ã¯ãPSWã®è©³çŽ°ãšãã®éèŠæ§ã«ã€ããŠæ·±æ ï¿œããŸããããã»ããµã®åäœãç解ããããã«ãPSWãã©ã®ããã«æ©èœããã©ã®ãããªæ å ±ãæäŸããããåŠã¶ããšã¯éåžžã«äŸ¡å€ãããã§ãããã
- PSWãšã¯ïŒ
- ããã»ããµã®ç¶æ ã瀺ãã¯ãŒãïŒProcessor Status Word
- ããã»ããµã¹ããŒã¿ã¹ã¯ãŒããšã¯äœã§ããïŒ
- PSWãšã¯ããœã³ã³ã§äœã§ããïŒ
- ãããã質å
- ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒãšã¯äœã§ããïŒ
- ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã¯ã©ã®ããã«äœ¿çšãããŸããïŒ
- ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã®äž»èŠãªèŠçŽ ã¯äœã§ããïŒ
- ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒãå€æŽããæ¹æ³ã¯äœã§ããïŒ
PSWãšã¯ïŒ
PSWã¯ããã¹ã¯ãŒã ã管çããããã®ããŒã«ã®äžçš®ã§ããäž»ã«ã³ã³ãã¥ãŒã¿ãŒããããã¯ãŒã¯ã®ã»ãã¥ãªãã£ã匷åããããã«äœ¿çšãããŸãã
PSWã®äž»ãªæ©èœ
PSWã®äž»ãªæ©èœã¯ããã¹ã¯ãŒãã®çæããã¹ã¯ãŒãã®ä¿åãããã³ãã¹ã¯ãŒãã®ç®¡çã§ãã
- ãã¹ã¯ãŒãã®çæïŒPSWã¯ãã©ã³ãã ãªãã¹ã¯ãŒããçæããããšãã§ããŸãã
- ãã¹ã¯ãŒãã®ä¿åïŒPSWã¯ãçæããããã¹ã¯ãŒããä¿åããããšãã§ããŸãã
- ãã¹ã¯ãŒãã®ç®¡çïŒPSWã¯ãä¿åããããã¹ã¯ãŒãã管çããããšãã§ããŸãã
PSWã®å©ç¹
PSWã®å©ç¹ã¯ãã»ãã¥ãªãã£ã®åäžããã¹ã¯ãŒãã®ç®¡çã®å®¹æåãããã³æéã®ç¯çŽã§ãã
- ã»ãã¥ãªãã£ã®åäžïŒPSWã¯ã匷åãªãã¹ã¯ãŒããçæããããšãã§ããŸãã
- ãã¹ã¯ãŒãã®ç®¡çã®å®¹æåïŒPSWã¯ãè€æ°ã®ãã¹ã¯ãŒãã管çããããšãã§ããŸãã
- æéã®ç¯çŽïŒPSWã¯ããã¹ã¯ãŒãã®ç®¡çã«è²»ããæéãç¯çŽããããšãã§ããŸãã
PSWã®äœ¿çšæ¹æ³
PSWã®äœ¿çšæ¹æ³ã¯ãPSWã®ã€ã³ã¹ããŒã«ãPSWã®èšå®ãããã³PSWã®äœ¿çšã§ãã
- PSWã®ã€ã³ã¹ããŒã«ïŒPSWãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã
- PSWã®èšå®ïŒPSWã®èšå®ãè¡ãå¿ èŠããããŸãã
- PSWã®äœ¿çšïŒPSWã䜿çšããŠãã¹ã¯ãŒãã管çããããšãã§ããŸãã
ããã»ããµã®ç¶æ ã瀺ãã¯ãŒãïŒProcessor Status Word
ããã»ããµã®ç¶æ ã瀺ãã¯ãŒãïŒProcessor Status WordãPSWïŒã¯ãã³ã³ãã¥ãŒã¿ã®ããã»ããµãçŸåšã©ã®ãããªç¶æ ã«ãããã瀺ãç¹å¥ãªã¬ãžã¹ã¿ã§ããããã»ããµã¯ãããã°ã©ã ãå®è¡ããéã«æ§ã ãªç¶æ³ã«çŽé¢ããŸãããããã®ç¶æ³ã¯ãããã»ããµã®åäœã«åœ±é¿ãäžããå¯èœæ§ããããŸããPSWã¯ããããã®ç¶æ³ã远跡ããããã»ããµãé©åã«å¯Ÿå¿ã§ããããã«ããŸãã
PSWã®æ§é
PSWã¯ãéåžžãè€æ°ã®ãããã§æ§æãããŠãããããããã®ããããç¹å®ã®ç¶æ ãæ¡ä»¶ãè¡šããŸããäŸãã°ããªãŒããŒãããŒãå²ã蟌ã¿ã®çºçããŒããã©ã°ããã£ãªãŒãã©ã°ãªã©ãå«ãŸããŸãããããã®ãããã®çµã¿åããããããã»ããµã®çŸåšã®ç¶æ ã決å®ããŸãã
ããã | æå³ | |
0 | ãã£ãªãŒãã©ã° | |
2 | ããªãã£ãã©ã° | |
6 | ãŒããã©ã° | |
7 | ã·ã°ãã«ãã©ã° |
PSWã®åœ¹å²
PSWã¯ãããã»ããµãçŸåšã®åœä»€ã®å®è¡ãé©åã«å¶åŸ¡ã§ãããããå¿ èŠãªæ å ±ãæäŸããŸããäŸãã°ãç®è¡æŒç®ã®çµæããªãŒããŒãããŒããå ŽåãPSWã¯ãªãŒããŒãããŒããããã»ããããŸããããã«ãããããã»ããµã¯ãªãŒããŒãããŒãçºçããããšãèªèããé©åãªå¯ŸåŠãè¡ãããšãã§ããŸãã
PSWãšããã»ã¹ã®åãæ¿ã
å€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ã¯ãããã»ã¹éã®åãæ¿ããé »ç¹ã«çºçããŸãããã®åãæ¿ãã®éãçŸåšã®ããã»ã¹ã®ç¶æ ïŒPSWãå«ãïŒãä¿åããæ°ããããã»ã¹ã®ç¶æ ã埩å ããå¿ èŠããããŸããããã«ãããåããã»ã¹ã¯ãåãæ¿ããçºçããããšãèªèããããšãªããåŠçãç¶ç¶ã§ããŸãã
PSWã®ç®¡çæ¹æ³
PSWã¯ãéåžžãããã»ããµã®ç¹æš©ã¢ãŒãã§ããã¢ã¯ã»ã¹ã§ããªãããèšèšãããŠããŸããããã¯ãPSWãããã»ããµã®åäœã«çŽæ¥åœ±é¿ãäžããå¯èœæ§ããããããäžæ£ãªæäœãè¡ãããªãããã«ããããã§ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãç¹æš©ã¢ãŒãã§åäœããããšã§ãPSWãé©åã«ç®¡çããã·ã¹ãã ã®å®å®æ§ãä¿ã¡ãŸãã
PSWã®æŽå²ãšçºå±
PSWã®æŠå¿µã¯ãã³ã³ãã¥ãŒã¿ã®æŽå²ãšå ±ã«çºå±ããŸãããåæã®ã³ã³ãã¥ãŒã¿ã§ã¯ãããã»ããµã®ç¶æ ãè¡šãããã«ãåçŽãªãã©ã°ã¬ãžã¹ã¿ã䜿çšãããŠããŸãããããããã³ã³ãã¥ãŒã¿ãããè€éã«ãªããšãããã»ããµã¯ããå€ãã®ç¶æ³ãæ±ãå¿ èŠããããŸãããããã«ãããPSWã¯ããè€éã§è©³çŽ°ãªæ§é ã«ãªããŸãããçŸä»£ã®ããã»ããµã¯ãéåžžã«é«åºŠãªPSWãæã¡ãããã»ããµã®ç¶æ ã詳现ã«ç£èŠã»å¶åŸ¡ããŠããŸãã
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒããšã¯äœã§ããïŒ
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãïŒPSWïŒãšã¯ãããã»ããµã®çŸåšã®ç¶æ ã瀺ãç¹å¥ãªã¬ãžã¹ã¿ã§ããPSWã¯ãããã»ããµãå®è¡ããŠããåœä»€ã®ç¶æ ãå²ã蟌ã¿ã®æç¡ãç¹æš©ã¢ãŒããªã©ã®æ å ±ãä¿æããŠããŸããPSWã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãããã°ã©ã ãããã»ããµã®ç¶æ ãç£èŠãå¶åŸ¡ããããã«äœ¿çšãããŸãã
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã®åœ¹å²
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã¯ãããã»ããµã®åäœç¶æ ã瀺ãéèŠãªåœ¹å²ãæã¡ãŸããããã«ã¯ä»¥äžã®ãããªæ å ±ãå«ãŸããŸãã
- ããã»ããµã®åäœã¢ãŒã: ã«ãŒãã«ã¢ãŒãããŠãŒã¶ãŒã¢ãŒããªã©ãããã»ããµãçŸåšã©ã®ç¹æš©ã¬ãã«ã§åäœããŠãããã瀺ããŸãã
- å²ã蟌ã¿ã®æç¡: å²ã蟌ã¿ãçºçããŠãããã©ããããããŠãã®çš®é¡ã瀺ããŸãã
- ãã©ã°ããã: æŒç®çµæããšã©ãŒç¶æ ãªã©ãããã»ããµã®çŸåšã®ç¶æ ã瀺ãåçš®ãã©ã°ãå«ãŸããŸãã
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã®æ§é
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã®æ§é ã¯ããã»ããµã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸãããäžè¬ã«ã¯ä»¥äžã®ãããªãã£ãŒã«ããå«ãŸããŸãã
- ãã©ã°ãã£ãŒã«ã: ãã£ãªãŒãã©ã°ããªãŒããŒãããŒãã©ã°ããŒããã©ã°ãªã©ãæŒç®çµæããšã©ãŒç¶æ ã瀺ããã©ã°ãå«ãŸããŸãã
- å¶åŸ¡ããã: ããã»ããµã®åäœã¢ãŒããå²ã蟌ã¿ã®èš±å¯/çŠæ¢ãå¶åŸ¡ããããããå«ãŸããŸãã
- ã¹ããŒã¿ã¹ããã: çŸåšå®è¡äžã®åœä»€ã®ç¶æ ããå²ã蟌ã¿ã®çºçæºã瀺ãããããå«ãŸããŸãã
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã®äœ¿çšæ¹æ³
ããã»ããµã¹ããŒã¿ã¹ã¯ãŒãã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãããã»ããµã®ç¶æ ãç£èŠãå¶åŸ¡ããããã«äœ¿çšãããŸããå ·äœçã«ã¯ä»¥äžã®ããã«ãªããŸãã
- å²ã蟌ã¿åŠç: å²ã蟌ã¿ãçºçãããšãPSWã¯èªåçã«ä¿åãããå²ã蟌ã¿åŠçã«ãŒãã³ãå®è¡ãããŸãã
- ç¹æš©ã¢ãŒãã®åãæ¿ã: ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãPSWãå€æŽããããšã§ãã«ãŒãã«ã¢ãŒããšãŠãŒã¶ãŒã¢ãŒãéã®åãæ¿ããè¡ããŸãã
- ãšã©ãŒãã³ããªã³ã°: PSWã®ãã©ã°ãããããã§ãã¯ããããšã§ããªãŒããŒãããŒãªã©ã®ãšã©ãŒç¶æ ãæ€åºã§ããŸãã
PSWãšã¯ããœã³ã³ã§äœã§ããïŒ
PSWãšã¯ãããœã³ã³ã®äžçã§ã¯ãããã°ã©ã ã¹ããŒã¿ã¹ã¯ãŒãããŸãã¯ãããã°ã©ã ã¹ããŒãã¡ã³ãã¯ãŒãããšããŠç¥ãããŠããŸããããã¯ãã³ã³ãã¥ãŒã¿ã®ããã»ããµãããã°ã©ã ãå®è¡ããéã«ããã®ç¶æ ãä¿æããããã®ç¹å¥ãªã¬ãžã¹ã¿ã§ããPSWã¯ãããã°ã©ã ã®å®è¡äžã«çºçããããŸããŸãªæ¡ä»¶ãã€ãã³ãã远跡ããããã»ããµãé©åãªã¢ã¯ã·ã§ã³ã決å®ããã®ã«åœ¹ç«ã¡ãŸãã
PSWã®åœ¹å²
PSWã¯ãã³ã³ãã¥ãŒã¿ã®ããã»ããµãããã°ã©ã ãå®è¡ããéã«ãçŸåšã®ç¶æ ãä¿æããå¶åŸ¡ããããã«äœ¿çšãããŸããPSWã¯ã次ã®ãããªéèŠãªæ å ±ãæ ŒçŽããŠããŸãã
- ããã°ã©ã ã«ãŠã³ã¿: çŸåšå®è¡ãããŠããåœä»€ã®ã¢ãã¬ã¹
- ã¹ããŒã¿ã¹ãã©ã°: å ç®çµæã®æ£è² ããŒããéãŒããããªãŒããŒãããŒãªã©ã®æ¡ä»¶ã瀺ã
- å²ã蟌ã¿ãã¹ã¯: å²ã蟌ã¿ã®èš±å¯ãçŠæ¢ãå¶åŸ¡ãã
PSWã®éèŠæ§
PSWã¯ãã³ã³ãã¥ãŒã¿ã®ããã»ããµãå¹ççã«åäœããããã«äžå¯æ¬ ã§ããPSWãæäŸããæ å ±ã«ãããããã»ããµã¯é©åãªã¢ã¯ã·ã§ã³ã決å®ããããã°ã©ã ã®å®è¡ãå¶åŸ¡ã§ããŸããå ·äœçã«ã¯ã以äžã®ãããªéèŠãªæ©èœãæãããŠããŸãã
- ããã°ã©ã ã®å¶åŸ¡ãããŒã®ç®¡ç
- äŸå€åŠçãå²ã蟌ã¿åŠçã®ããã®ã³ã³ããã¹ãã¹ã€ããã³ã°
- ããã°ã©ã ã®å®è¡ç¶æ ã®ç£èŠãšå¶åŸ¡
PSWã®äœ¿çšäŸ
PSWã¯ãã³ã³ãã¥ãŒã¿ããã°ã©ã ã®å®è¡äžã«ããŸããŸãªã·ãã¥ãšãŒã·ã§ã³ã§äœ¿çšãããŸãã以äžã«ãPSWã掻çšãããããã€ãã®äŸã瀺ããŸãã
- æ¡ä»¶åå²: PSWã®ã¹ããŒã¿ã¹ãã©ã°ããã§ãã¯ããŠãããã°ã©ã ã®åå²ã決å®ãã
- ã«ãŒãå¶åŸ¡: PSWã®ã«ãŠã³ã¿ã䜿çšããŠãã«ãŒãã®ç¹°ãè¿ãåæ°ã管çãã
- å²ã蟌ã¿åŠç: PSWã䜿çšããŠãå²ã蟌ã¿ãçºçãããšãã«çŸåšã®ç¶æ ãä¿åããå²ã蟌ã¿åŠçãçµäºãããå ã®ç¶æ ã«æ»ã
ãããã質å
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒãšã¯äœã§ããïŒ
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã¯ãããã»ããµã®çŸåšã®ç¶æ ã瀺ãç¹å¥ãªã¬ãžã¹ã¿ã§ããPSWã¯ãããã»ããµãå®è¡ããŠããåœä»€ã®ç¶æ ãå²ã蟌ã¿ã®æå¹/ç¡å¹ãç¹æš©ã¢ãŒãã®æå¹/ç¡å¹ãªã©ãããã»ããµã®åäœã«é¢é£ããããŸããŸãªæ å ±ãä¿æããŠããŸããPSWã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããœãããŠã§ã¢ãããã»ããµã®ç¶æ ãç£èŠããé©åãªåŠçãå®è¡ããããã«äœ¿çšãããŸãã
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã¯ã©ã®ããã«äœ¿çšãããŸããïŒ
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãœãããŠã§ã¢ãããã»ããµã®ç¶æ ãç£èŠããé©åãªåŠçãå®è¡ããããã«äœ¿çšãããŸããäŸãã°ãå²ã蟌ã¿åŠçã®å ŽåãPSWã¯çŸåšã®ããã»ããµã®ç¶æ ãä¿åããæ°ããå²ã蟌ã¿åŠçãéå§ããããšãã«ä»¥åã®ç¶æ ã«åŸ©å ãããŸãããŸããç¹æš©ã¢ãŒãã®åãæ¿ããããšã©ãŒç¶æ ã®æ€åºã«ãPSWã䜿çšãããŸãã
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã®äž»èŠãªèŠçŽ ã¯äœã§ããïŒ
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒã®äž»èŠãªèŠçŽ ã«ã¯ã次ã®ãããªãã®ãå«ãŸããŸãã - ç¶æ ãããïŒããã»ããµã®çŸåšã®åäœç¶æ ïŒäŸïŒåäœäžãåæ¢äžããšã©ãŒç¶æ ãªã©ïŒã瀺ããŸãã - å²ã蟌ã¿ãã¹ã¯ïŒã©ã®å²ã蟌ã¿ãèš±å¯ãããŠãããããŸãã¯çŠæ¢ãããŠãããã瀺ããŸãã - ç¹æš©ãããïŒããã»ããµãçŸåšç¹æš©ã¢ãŒãã§åäœããŠãããã©ããã瀺ããŸãã - æ¡ä»¶ã³ãŒãïŒçŽåã®æŒç®ã®çµæïŒäŸïŒZeroãCarryãOverflowãªã©ïŒã瀺ããŸãã ãããã®èŠçŽ ã¯ãããã»ããµã®ç¶æ ãæ£ç¢ºã«ææ¡ããé©åãªåŠçãå®è¡ããããã«éèŠã§ãã
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒãå€æŽããæ¹æ³ã¯äœã§ããïŒ
ããã»ããµã®ç¶æ ã¯ãŒãïŒPSWïŒãå€æŽããæ¹æ³ã¯ãããã»ããµã®ã¢ãŒããã¯ãã£ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ãã£ãŠç°ãªããŸããäžè¬çã«ã¯ãç¹æš©åœä»€ã䜿çšããŠPSWãçŽæ¥å€æŽããããšãã§ããŸããäŸãã°ãå²ã蟌ã¿ã®æå¹/ç¡å¹ãåãæ¿ããããã®åœä»€ããç¹æš©ã¢ãŒããžã®ç§»è¡ãè¡ãåœä»€ããããŸãããããã®åœä»€ã¯éåžžããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ã«ãŒãã«ãããã€ã¹ãã©ã€ããªã©ã®ç¹æš©ã¬ãã«ã®ãœãããŠã§ã¢ã§ã®ã¿äœ¿çšãããŸãã
ð» Processor Status WordïŒããã»ããµã®ç¶æ ã瀺ãã¯ãŒã ã«é¡äŒŒããä»ã®èšäºãç¥ãããå Žåã¯ãWord æåã»æç« ç·šé ã«ããŽãªã«ã¢ã¯ã»ã¹ããŠãã ããã
ã³ã¡ã³ããæ®ã
é¢é£èšäº