; 18F4520
; abnormal behaviour in PIC18 Simulator IDE
org 0
goto 0x100
org 0x100
one: ; works as defined
movlb 0
setf FSR1H
movlw 0x93
movwf FSR1L
movlw 0xee
movwf preinc1
two: ;this code snippet does not alter
;TRISC and corrupts TRISD. Also
;FSR1 is incremented twice.
movlw 0x93
movwf FSR1L
movlw 0x7f
andwf preinc1,f
three: ;this code snippet does not alter
;TRISC and corrupts TRISD. Also
;FSR1 is incremented twice.
movlw 0x93
movwf FSR1L
movlw 0x0f
iorwf preinc1,f
end