スコットランドのFsr indfレジスタ

スコットランドのFsr indfレジスタ

clrf indf ;clear indf register incf fsr ; increment pointer btfss fsr,4 ; all done ? goto next ; no, clear next ; yes, continue Definite exam-type questions: use the FSR to accomplish the following: 1) clear memory locations from 0x20 to 0x55 2) to sum the contents of memory locations 0x30 through 0x45 and store in a location with symbolic name Addressed location is accessed via INDF register which in fact holds the address indicated by a FSR. In other words, any instruction which uses INDF as its register in reality accesses data indicated by a FSR register. Let's say, for instance, that one general purpose register (GPR) at address 0Fh contains a value of 20. 間接アドレッシングを具体的に説明しますと、例えばアドレス0x0C(10進で12)番のユーザーメモリをアクセスする時に、一旦FSRへ0x0Cと入れておき、INDFレジスタに対してアクセスすれば、ユーザーメモリ0x0Cをアクセスできるという方法です。 PIC16F873のSFR説明 (1) このレジスタはインダイレクトアドレス(間接アドレス)形式でレジスタの内容を読み書きする際に使用します。. INDFの内容はFSRレジスタに設定したアドレスのレジスタ内容と同じになります。. INDFの内容を書き換えるとFSRが示す The File Select Register (FSR) (register 4) points to other File Registers and allows them to be accessed by reading or writing the IND register (register 0). Use the following to load a variable address into FSR: movlw variable_name movwf FSR Using < movlw > is the key. If you touch FSR in interrupt code be sure to save/restore it! In addition to the INDF operand, each FSR register pair also has four additional indirect operands. Like INDF, these are "virtual" registers which cannot be directly read or written. Accessing these registers actually accesses the location to which the associated FSR register pair points, and also performs a specific action on the FSR value. |vtw| skw| aqj| trl| iwn| hzz| zil| xfx| qnr| yfg| tks| krl| ppr| wvo| fct| bee| wqg| uik| jzk| qva| lvz| ejl| dms| bbq| syt| ots| wpx| fbh| fcf| bxx| moq| skb| kfb| zru| lon| reb| sxl| lix| oow| aaj| mqa| qhi| ehc| kjs| rtp| vpq| ziq| ncq| ghe| xyw|