home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
276_01
/
test16a.asm
< prev
next >
Wrap
Assembly Source File
|
1989-10-03
|
8KB
|
542 lines
;
; This file contains the opcodes of the PIC16C52 CPU in numerical order for
; testing the portable PIC1650 cross-assembler.
;
DEST EQU 123H
SUBR EQU 45H
BIT EQU 6
;
; 0000H - 001FH
;
NOP
;0001H is undefined.
OPTION
SLEEP
CLRWDT
TRIS PORTA
TRIS PORTB
TRIS PORTC
;0008H - 001FH are undefined.
;
; 0020H - 003FH
;
MOVWF @FSR
MOVWF RTCC
MOVWF PC
MOVWF SW
MOVWF FSR
MOVWF PORTA
MOVWF PORTB
MOVWF PORTC
MOVWF F8
MOVWF F9
MOVWF F10
MOVWF F11
MOVWF F12
MOVWF F12
MOVWF F14
MOVWF F15
MOVWF F16
MOVWF F17
MOVWF F18
MOVWF F19
MOVWF F20
MOVWF F21
MOVWF F22
MOVWF F23
MOVWF F24
MOVWF F25
MOVWF F26
MOVWF F27
MOVWF F28
MOVWF F29
MOVWF F30
MOVWF F31
;
; 0040H - 005FH
;
CLRW
;0041H - 005FH are undefined.
;
; 0060H - 007FH
;
CLRF @FSR
CLRF RTCC
CLRF PC
CLRF SW
CLRF FSR
CLRF PORTA
CLRF PORTB
CLRF PORTC
CLRF F8
;We'll leave out 0069H - 007EH for brevity.
CLRF F31
;
; 0080H - 009FH
;
SUBWF @FSR, W
SUBWF RTCC, W
SUBWF PC, W
SUBWF SW, W
SUBWF FSR, W
SUBWF PORTA, W
SUBWF PORTB, W
SUBWF PORTC, W
SUBWF F8, W
SUBWF F9, W
SUBWF F10, W
SUBWF F11, W
SUBWF F12, W
SUBWF F12, W
SUBWF F14, W
SUBWF F15, W
SUBWF F16, W
SUBWF F17, W
SUBWF F18, W
SUBWF F19, W
SUBWF F20, W
SUBWF F21, W
SUBWF F22, W
SUBWF F23, W
SUBWF F24, W
SUBWF F25, W
SUBWF F26, W
SUBWF F27, W
SUBWF F28, W
SUBWF F29, W
SUBWF F30, W
SUBWF F31, W
;
; 00A0H - 00BFH
;
SUBWF @FSR, F
SUBWF RTCC, F
SUBWF PC, F
SUBWF SW, F
SUBWF FSR, F
SUBWF PORTA, F
SUBWF PORTB, F
SUBWF PORTC, F
SUBWF F8, F
SUBWF F9, F
SUBWF F10, F
SUBWF F11, F
SUBWF F12, F
SUBWF F12, F
SUBWF F14, F
SUBWF F15, F
SUBWF F16, F
SUBWF F17, F
SUBWF F18, F
SUBWF F19, F
SUBWF F20, F
SUBWF F21, F
SUBWF F22, F
SUBWF F23, F
SUBWF F24, F
SUBWF F25, F
SUBWF F26, F
SUBWF F27, F
SUBWF F28, F
SUBWF F29, F
SUBWF F30, F
SUBWF F31, F
;
; 00C0H - 00DFH
;
DECF @FSR, W
DECF RTCC, W
DECF PC, W
DECF SW, W
DECF FSR, W
DECF PORTA, W
DECF PORTB, W
DECF PORTC, W
DECF F8, W
;We'll leave out 00C9H - 00DEH for brevity.
DECF F31, W
;
; 00E0H - 00FFH
;
DECF @FSR, F
DECF RTCC, F
DECF PC, F
DECF SW, F
DECF FSR, F
DECF PORTA, F
DECF PORTB, F
DECF PORTC, F
DECF F8, F
;We'll leave out 00E9H - 00FEH for brevity.
DECF F31, F
;
; 0100H - 011FH
;
IORWF @FSR, W
IORWF RTCC, W
IORWF PC, W
IORWF SW, W
IORWF FSR, W
IORWF PORTA, W
IORWF PORTB, W
IORWF PORTC, W
IORWF F8, W
;We'll leave out 0109H - 011EH for brevity.
IORWF F31, W
;
; 0120H - 013FH
;
IORWF @FSR, F
IORWF RTCC, F
IORWF PC, F
IORWF SW, F
IORWF FSR, F
IORWF PORTA, F
IORWF PORTB, F
IORWF PORTC, F
IORWF F8, F
;We'll leave out 0129H - 013EH for brevity.
IORWF F31, F
;
; 0140H - 015FH
;
ANDWF @FSR, W
ANDWF RTCC, W
ANDWF PC, W
ANDWF SW, W
ANDWF FSR, W
ANDWF PORTA, W
ANDWF PORTB, W
ANDWF PORTC, W
ANDWF F8, W
;We'll leave out 0149H - 015EH for brevity.
ANDWF F31, W
;
; 0160H - 017FH
;
ANDWF @FSR, F
ANDWF RTCC, F
ANDWF PC, F
ANDWF SW, F
ANDWF FSR, F
ANDWF PORTA, F
ANDWF PORTB, F
ANDWF PORTC, F
ANDWF F8, F
;We'll leave out 0169H - 017EH for brevity.
ANDWF F31, F
;
; 0180H - 019FH
;
XORWF @FSR, W
XORWF RTCC, W
XORWF PC, W
XORWF SW, W
XORWF FSR, W
XORWF PORTA, W
XORWF PORTB, W
XORWF PORTC, W
XORWF F8, W
;We'll leave out 0189H - 019EH for brevity.
XORWF F31, W
;
; 01A0H - 01BFH
;
XORWF @FSR, F
XORWF RTCC, F
XORWF PC, F
XORWF SW, F
XORWF FSR, F
XORWF PORTA, F
XORWF PORTB, F
XORWF PORTC, F
XORWF F8, F
;We'll leave out 01A9H - 01BEH for brevity.
XORWF F31, F
;
; 01C0H - 01DFH
;
ADDWF @FSR, W
ADDWF RTCC, W
ADDWF PC, W
ADDWF SW, W
ADDWF FSR, W
ADDWF PORTA, W
ADDWF PORTB, W
ADDWF PORTC, W
ADDWF F8, W
;We'll leave out 01C9H - 01DEH for brevity.
ADDWF F31, W
;
; 01E0H - 01FFH
;
ADDWF @FSR, F
ADDWF RTCC, F
ADDWF PC, F
ADDWF SW, F
ADDWF FSR, F
ADDWF PORTA, F
ADDWF PORTB, F
ADDWF PORTC, F
ADDWF F8, F
;We'll leave out 01E9H - 01FEH for brevity.
ADDWF F31, F
;
; 0200H - 021FH
;
MOVF @FSR, W
MOVF RTCC, W
MOVF PC, W
MOVF SW, W
MOVF FSR, W
MOVF PORTA, W
MOVF PORTB, W
MOVF PORTC, W
MOVF F8, W
;We'll leave out 0209H - 021EH for brevity.
MOVF F31, W
;
; 0220H - 023FH
;
MOVF @FSR, F
MOVF RTCC, F
MOVF PC, F
MOVF SW, F
MOVF FSR, F
MOVF PORTA, F
MOVF PORTB, F
MOVF PORTC, F
MOVF F8, F
;We'll leave out 0229H - 023EH for brevity.
MOVF F31, F
;
; 0240H - 025FH
;
COMF @FSR, W
COMF RTCC, W
COMF PC, W
COMF SW, W
COMF FSR, W
COMF PORTA, W
COMF PORTB, W
COMF PORTC, W
COMF F8, W
;We'll leave out 0249H - 025EH for brevity.
COMF F31, W
;
; 0260H - 027FH
;
COMF @FSR, F
COMF RTCC, F
COMF PC, F
COMF SW, F
COMF FSR, F
COMF PORTA, F
COMF PORTB, F
COMF PORTC, F
COMF F8, F
;We'll leave out 0269H - 027EH for brevity.
COMF F31, F
;
; 0280H - 029FH
;
INCF @FSR, W
INCF RTCC, W
INCF PC, W
INCF SW, W
INCF FSR, W
INCF PORTA, W
INCF PORTB, W
INCF PORTC, W
INCF F8, W
;We'll leave out 0289H - 029EH for brevity.
INCF F31, W
;
; 02A0H - 02BFH
;
INCF @FSR, F
INCF RTCC, F
INCF PC, F
INCF SW, F
INCF FSR, F
INCF PORTA, F
INCF PORTB, F
INCF PORTC, F
INCF F8, F
;We'll leave out 02A9H - 02BEH for brevity.
INCF F31, F
;
; 02C0H - 02DFH
;
DECFSZ @FSR, W
DECFSZ RTCC, W
DECFSZ PC, W
DECFSZ SW, W
DECFSZ FSR, W
DECFSZ PORTA, W
DECFSZ PORTB, W
DECFSZ PORTC, W
DECFSZ F8, W
;We'll leave out 02C9H - 02DEH for brevity.
DECFSZ F31, W
;
; 02E0H - 02FFH
;
DECFSZ @FSR, F
DECFSZ RTCC, F
DECFSZ PC, F
DECFSZ SW, F
DECFSZ FSR, F
DECFSZ PORTA, F
DECFSZ PORTB, F
DECFSZ PORTC, F
DECFSZ F8, F
;We'll leave out 02E9H - 02FEH for brevity.
DECFSZ F31, F
;
; 0300H - 031FH
;
RRF @FSR, W
RRF RTCC, W
RRF PC, W
RRF SW, W
RRF FSR, W
RRF PORTA, W
RRF PORTB, W
RRF PORTC, W
RRF F8, W
;We'll leave out 0309H - 031EH for brevity.
RRF F31, W
;
; 0320H - 033FH
;
RRF @FSR, F
RRF RTCC, F
RRF PC, F
RRF SW, F
RRF FSR, F
RRF PORTA, F
RRF PORTB, F
RRF PORTC, F
RRF F8, F
;We'll leave out 0329H - 033EH for brevity.
RRF F31, F
;
; 0340H - 035FH
;
RLF @FSR, W
RLF RTCC, W
RLF PC, W
RLF SW, W
RLF FSR, W
RLF PORTA, W
RLF PORTB, W
RLF PORTC, W
RLF F8, W
;We'll leave out 0349H - 035EH for brevity.
RLF F31, W
;
; 0360H - 037FH
;
RLF @FSR, F
RLF RTCC, F
RLF PC, F
RLF SW, F
RLF FSR, F
RLF PORTA, F
RLF PORTB, F
RLF PORTC, F
RLF F8, F
;We'll leave out 0369H - 037EH for brevity.
RLF F31, F
;
; 0380H - 039FH
;
SWAPF @FSR, W
SWAPF RTCC, W
SWAPF PC, W
SWAPF SW, W
SWAPF FSR, W
SWAPF PORTA, W
SWAPF PORTB, W
SWAPF PORTC, W
SWAPF F8, W
;We'll leave out 0389H - 039EH for brevity.
SWAPF F31, W
;
; 03A0H - 03BFH
;
SWAPF @FSR, F
SWAPF RTCC, F
SWAPF PC, F
SWAPF SW, F
SWAPF FSR, F
SWAPF PORTA, F
SWAPF PORTB, F
SWAPF PORTC, F
SWAPF F8, F
;We'll leave out 03A9H - 03BEH for brevity.
SWAPF F31, F
;
; 03C0H - 03DFH
;
INCFSZ @FSR, W
INCFSZ RTCC, W
INCFSZ PC, W
INCFSZ SW, W
INCFSZ FSR, W
INCFSZ PORTA, W
INCFSZ PORTB, W
INCFSZ PORTC, W
INCFSZ F8, W
;We'll leave out 03C9H - 03DEH for brevity.
INCFSZ F31, W
;
; 03E0H - 03FFH
;
INCFSZ @FSR, F
INCFSZ RTCC, F
INCFSZ PC, F
INCFSZ SW, F
INCFSZ FSR, F
INCFSZ PORTA, F
INCFSZ PORTB, F
INCFSZ PORTC, F
INCFSZ F8, F
;We'll leave out 03E9H - 03FEH for brevity.
INCFSZ F31, F
END