Basic program operations [PICProgramm.cs]
This commit is contained in:
@@ -1,50 +1,50 @@
|
||||
00001 ;TPicSim11
|
||||
00002 ;Programm zum Test des 16F84-Simulators.
|
||||
00003 ;Es wird der Watchdog mit und ohne Vorteiler gepr<70>ft
|
||||
00004 ;(c) St. Lehmann
|
||||
00005 ;19.04.2014
|
||||
00006
|
||||
00007 list c=132 ;Zeilenl<6E>nge im LST auf 132 Zeichen setzen
|
||||
00008
|
||||
00009 ;Definition einiger Symbole
|
||||
00010 indirect equ 0
|
||||
00011 status equ 03h
|
||||
00012 fsr equ 04h
|
||||
00013 ra equ 05h
|
||||
00014 rb equ 06h
|
||||
00015 count equ 0ch
|
||||
00016
|
||||
00017 ;Definition des Prozessors
|
||||
00018 device 16F84
|
||||
00019 ;Festlegen des Codebeginns
|
||||
00020 org 0
|
||||
00021 start
|
||||
00022 ;zuerst wird der VT dem Timer zugewiesen. Damit bekommt der Watchdog
|
||||
00023 ;die kleinste Zeit (ca. 18 ms) zugewiesen
|
||||
0000 3000 00024 movlw 00000000B ;Option-Register entsp. initialisieren
|
||||
0001 1683 00025 bsf status,5 ;Bank umschalten
|
||||
0002 0081 00026 movwf 1 ;Option-Register
|
||||
0003 1283 00027 bcf status,5
|
||||
0004 01A0 00028 clrf 20h
|
||||
0005 01A1 00029 clrf 21h
|
||||
0006 01A2 00030 clrf 22h
|
||||
0007 01A3 00031 clrf 23h
|
||||
00032 loop1
|
||||
0008 0FA0 00033 incfsz 20h
|
||||
0009 2808 00034 goto loop1 ;kein <20>berlauf
|
||||
000A 0FA1 00035 incfsz 21h ;n<>chste Stelle
|
||||
000B 2808 00036 goto loop1 ;kein <20>berlauf
|
||||
000C 0FA2 00037 incfsz 22h ;ja
|
||||
000D 2808 00038 goto loop1
|
||||
000E 0FA3 00039 incfsz 23h
|
||||
000F 2808 00040 goto loop1
|
||||
00041
|
||||
00042 ;******************************************************************
|
||||
00043 ;in 20h steht ca. 5fH
|
||||
00044 ;in 21H ca. 17H
|
||||
00045 ;Z<>hlerstand 16-Bit ca. 175FH = 5983d
|
||||
00046
|
||||
00047 ende
|
||||
0010 2810 00048 goto ende ;Endlosschleife, verhindert Nirwana
|
||||
00049
|
||||
00050
|
||||
00001 ;TPicSim11
|
||||
00002 ;Programm zum Test des 16F84-Simulators.
|
||||
00003 ;Es wird der Watchdog mit und ohne Vorteiler gepr<70>ft
|
||||
00004 ;(c) St. Lehmann
|
||||
00005 ;19.04.2014
|
||||
00006
|
||||
00007 list c=132 ;Zeilenl<6E>nge im LST auf 132 Zeichen setzen
|
||||
00008
|
||||
00009 ;Definition einiger Symbole
|
||||
00010 indirect equ 0
|
||||
00011 status equ 03h
|
||||
00012 fsr equ 04h
|
||||
00013 ra equ 05h
|
||||
00014 rb equ 06h
|
||||
00015 count equ 0ch
|
||||
00016
|
||||
00017 ;Definition des Prozessors
|
||||
00018 device 16F84
|
||||
00019 ;Festlegen des Codebeginns
|
||||
00020 org 0
|
||||
00021 start
|
||||
00022 ;zuerst wird der VT dem Timer zugewiesen. Damit bekommt der Watchdog
|
||||
00023 ;die kleinste Zeit (ca. 18 ms) zugewiesen
|
||||
0000 3000 00024 movlw 00000000B ;Option-Register entsp. initialisieren
|
||||
0001 1683 00025 bsf status,5 ;Bank umschalten
|
||||
0002 0081 00026 movwf 1 ;Option-Register
|
||||
0003 1283 00027 bcf status,5
|
||||
0004 01A0 00028 clrf 20h
|
||||
0005 01A1 00029 clrf 21h
|
||||
0006 01A2 00030 clrf 22h
|
||||
0007 01A3 00031 clrf 23h
|
||||
00032 loop1
|
||||
0008 0FA0 00033 incfsz 20h
|
||||
0009 2808 00034 goto loop1 ;kein <20>berlauf
|
||||
000A 0FA1 00035 incfsz 21h ;n<>chste Stelle
|
||||
000B 2808 00036 goto loop1 ;kein <20>berlauf
|
||||
000C 0FA2 00037 incfsz 22h ;ja
|
||||
000D 2808 00038 goto loop1
|
||||
000E 0FA3 00039 incfsz 23h
|
||||
000F 2808 00040 goto loop1
|
||||
00041
|
||||
00042 ;******************************************************************
|
||||
00043 ;in 20h steht ca. 5fH
|
||||
00044 ;in 21H ca. 17H
|
||||
00045 ;Z<>hlerstand 16-Bit ca. 175FH = 5983d
|
||||
00046
|
||||
00047 ende
|
||||
0010 2810 00048 goto ende ;Endlosschleife, verhindert Nirwana
|
||||
00049
|
||||
00050
|
||||
|
||||
Reference in New Issue
Block a user