MPASM 02.70 Released WEEK4.ASM 5-16-2001 10:53:57 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 title " Hogeschool van Utrecht Opdracht week " 00002 subtitle " titel van het programma " 00003 00004 00005 ; XT Oscillator is used target 4 MHz 00006 ; do not use power up nor watchdog nor code protection !! 00007 00008 ;destinations for file register-byte 00009 00000000 00010 indirect equ 00h ;Indirect data adressing 00000001 00011 tmr0 equ 01h ;counter register 00000002 00012 pcl equ 02h ;Program Counter 00000003 00013 status equ 03h ;status word register 00000004 00014 fsr equ 04h ;File select register 00000005 00015 port_a equ 05h 00000006 00016 port_b equ 06h 00000005 00017 tris_a equ 05h ; new value for port a reg 00000006 00018 tris_b equ 06h ; new value for port b reg 00000008 00019 eedata equ 08h ; eeprom registers 00000009 00020 eeadr equ 09h 0000000A 00021 pclatch equ 0ah ; 0000000B 00022 intcon equ 0bh ; interrupt settings 00023 00024 ;bit declarations 00025 00000000 00026 w equ 00h ;destination is W-register 00000001 00027 f equ 01h ;destination is a File register 00028 00000001 00029 input equ 01h 00000000 00030 output equ 00h 00031 00032 00000005 00033 rp0 equ 05h ;bank change bit 00000002 00034 zero_bit equ 02h ;zero bit in status byte 00000000 00035 carry_bit equ 00h ;carry bit in status byte 00000001 00036 dc_bit equ 01h ;digit carry 00000002 00037 tf0 equ 02h ;timer overflow in intcon 00000007 00038 gie equ 07h 00039 00040 00041 ; byte declarations 00042 00043 00044 00045 ; reset vector equ 000h jump to out off call 00046 0000 00047 org 000h 0000 2801 00048 goto start 00049 00050 ; initialiseren van de poorten 00051 0001 00052 start 00053 MPASM 02.70 Released WEEK4.ASM 5-16-2001 10:53:57 PAGE 2 Hogeschool van Utrecht Opdracht week titel van het programma LOC OBJECT CODE LINE SOURCE TEXT VALUE 0001 0185 00054 clrf port_a ; clear init byte port_a 0002 0186 00055 clrf port_b ; clear init byte port_b 0003 1683 00056 bsf status,rp0 ; select bank 1 0004 301F 00057 movlw B'00011111' ; 1 = input , 0 = output 0005 0085 00058 movwf tris_a ; set port a in bank 1 0006 3000 00059 movlw B'00000000' ; 1 = input , 0 = output 0007 0086 00060 movwf tris_b ; set port b in bank 1 0008 1283 00061 bcf status,rp0 ; select bank 0 00062 00063 00064 ; start of the programm 00065 Error[122] : Illegal opcode (nmjhfg) 00066 main nmjhfg nmjhrt 00067 ; your coding comes here 00068 00069 00070 end MPASM 02.70 Released WEEK4.ASM 5-16-2001 10:53:57 PAGE 3 Hogeschool van Utrecht Opdracht week titel van het programma SYMBOL TABLE LABEL VALUE __16F84 00000001 carry_bit 00000000 dc_bit 00000001 eeadr 00000009 eedata 00000008 f 00000001 fsr 00000004 gie 00000007 indirect 00000000 input 00000001 intcon 0000000B output 00000000 pcl 00000002 pclatch 0000000A port_a 00000005 port_b 00000006 rp0 00000005 start 00000001 status 00000003 tf0 00000002 tmr0 00000001 tris_a 00000005 tris_b 00000006 w 00000000 zero_bit 00000002 MEMORY USAGE MAP ('X' = Used, '-' = Unused) 0000 : XXXXXXXXX------- ---------------- ---------------- ---------------- All other memory blocks unused. Program Memory Words Used: 9 Program Memory Words Free: 1015 Errors : 1 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 0 suppressed