PIC12F1822

解決"Warning[202] Argument out of range. Least significant bits used"問題


原始

list p=12f1822, r=hex

.org 0x00
movlw 0xff

lst

LOC    OBJECT CODE    LINE  SOURCE TEXT
  VALUE

                      00001   list p=12f1822, r=hex
                      00002  
0000                  00003   org 0x0000
Warning[202]: Argument out of range. Least significant bits used. 597 (0x255) => 85 (0x55)
0000   3055           00004   movlw 255 
                      00005   end 

P.S. 由於使用16進制(r=hex),因此,255被當成0x255,導致出現警告

修改後

list p=12f1822, r=dec

.org 0x00
movlw 0xff

lst

LOC    OBJECT CODE    LINE  SOURCE TEXT
  VALUE

                      00001   list p=12f1822, r=dec
                      00002  
0000                  00003   org 0x0000
0000   30FF           00004   movlw 255 
                      00005   end 


返回上一頁