; PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc. All Rights Reserved. PM_USED EQU 1 INCLUDE "16F877A.INC" ; Define statements. #define CODE_SIZE 8 #define osc 20 #define LCD_DREG PORTd #define LCD_DBIT 4 #define LCD_RSREG PORTd #define LCD_RSBIT 2 #define LCD_EREG PORTd #define LCD_EBIT 3 #define LCD_BITS 4 #define LCD_LINES 4 #define LCD_COMMANDUS 2000 #define LCD_DATAUS 50 RAM_START EQU 00020h RAM_END EQU 001EFh RAM_BANKS EQU 00004h BANK0_START EQU 00020h BANK0_END EQU 0007Fh BANK1_START EQU 000A0h BANK1_END EQU 000EFh BANK2_START EQU 00110h BANK2_END EQU 0016Fh BANK3_START EQU 00190h BANK3_END EQU 001EFh EEPROM_START EQU 02100h EEPROM_END EQU 021FFh R0 EQU RAM_START + 000h R1 EQU RAM_START + 002h R2 EQU RAM_START + 004h R3 EQU RAM_START + 006h R4 EQU RAM_START + 008h R5 EQU RAM_START + 00Ah R6 EQU RAM_START + 00Ch R7 EQU RAM_START + 00Eh R8 EQU RAM_START + 010h FLAGS EQU RAM_START + 012h GOP EQU RAM_START + 013h RM1 EQU RAM_START + 014h RM2 EQU RAM_START + 015h RR1 EQU RAM_START + 016h RR2 EQU RAM_START + 017h _grad EQU RAM_START + 018h _imp EQU RAM_START + 01Ah _obor EQU RAM_START + 01Ch _perem EQU RAM_START + 01Eh T1 EQU RAM_START + 020h _takt EQU RAM_START + 022h _ugol EQU RAM_START + 024h _yoz EQU RAM_START + 026h _i EQU RAM_START + 028h _PORTL EQU PORTB _PORTH EQU PORTC _TRISL EQU TRISB _TRISH EQU TRISC #define _PORTB??0 PORTB, 000h INCLUDE "GOGOLF.MAC" INCLUDE "PBPPIC14.LIB" INPUT?T _PORTB??0 LABEL?L _start CLEAR? MOVE?CB 000h, _i LABEL?L L00001 CMPGT?BCL _i, 003h, L00002 PULSIN?TCW _PORTB??0, 000h, _imp ADD?WWW _perem, _imp, _perem NEXT?BCL _i, 001h, L00001 LABEL?L L00002 MOVE?WW _perem, _imp MUL?WCW _imp, 002h, _takt DIV?WCW _imp, 014h, _perem DIV?CWW 0DFD4h, _perem, T1 MUL?WCW T1, 00Dh, _obor DIV?WCW _takt, 012h, _grad GOSUB?L _razchet LCDOUT?C 0FEh LCDOUT?C 001h LCDOUTCOUNT?C 000h LCDOUTNUM?W _imp LCDOUTDEC? LCDOUT?C 020h LCDOUT?C 020h LCDOUTCOUNT?C 000h LCDOUTNUM?W _ugol LCDOUTDEC? LCDOUT?C 0FEh LCDOUT?C 0C0h LCDOUTCOUNT?C 000h LCDOUTNUM?W _obor LCDOUTDEC? LCDOUT?C 020h LCDOUTCOUNT?C 000h LCDOUTNUM?W _grad LCDOUTDEC? LCDOUT?C 0FEh LCDOUT?C 094h LCDOUTCOUNT?C 000h LCDOUTNUM?W _takt LCDOUTDEC? LCDOUT?C 020h LCDOUTCOUNT?C 000h LCDOUTNUM?W _yoz LCDOUTDEC? PAUSE?C 001F4h GOTO?L _start END? LABEL?L _razchet CMPLT?WCL _takt, 07530h, L00003 MOVE?CW 000h, _ugol LABEL?L L00003 CMPGE?WCL _takt, 07530h, L00005 MOVE?CW 000h, _ugol LABEL?L L00005 CMPGE?WCL _takt, 07254h, L00007 MOVE?CW 012h, _ugol LABEL?L L00007 CMPGE?WCL _takt, 06F9Bh, L00009 MOVE?CW 024h, _ugol LABEL?L L00009 CMPGE?WCL _takt, 06D03h, L00011 MOVE?CW 036h, _ugol LABEL?L L00011 CMPGE?WCL _takt, 06A89h, L00013 MOVE?CW 048h, _ugol LABEL?L L00013 CMPGE?WCL _takt, 0682Bh, L00015 MOVE?CW 05Ah, _ugol LABEL?L L00015 CMPGE?WCL _takt, 065E7h, L00017 MOVE?CW 06Ch, _ugol LABEL?L L00017 CMPGE?WCL _takt, 063BCh, L00019 MOVE?CW 07Eh, _ugol LABEL?L L00019 CMPGE?WCL _takt, 061A8h, L00021 MOVE?CW 090h, _ugol LABEL?L L00021 CMPGE?WCL _takt, 05FAAh, L00023 MOVE?CW 0A2h, _ugol LABEL?L L00023 CMPGE?WCL _takt, 05DC0h, L00025 MOVE?CW 0B4h, _ugol LABEL?L L00025 CMPGE?WCL _takt, 05BE9h, L00027 MOVE?CW 0C6h, _ugol LABEL?L L00027 CMPGE?WCL _takt, 05A25h, L00029 MOVE?CW 0D8h, _ugol LABEL?L L00029 CMPGE?WCL _takt, 05872h, L00031 MOVE?CW 0EAh, _ugol LABEL?L L00031 CMPGE?WCL _takt, 056CEh, L00033 MOVE?CW 0FCh, _ugol LABEL?L L00033 CMPGE?WCL _takt, 0553Ah, L00035 MOVE?CW 0010Eh, _ugol LABEL?L L00035 CMPGE?WCL _takt, 053B5h, L00037 MOVE?CW 00120h, _ugol LABEL?L L00037 CMPGE?WCL _takt, 0523Dh, L00039 MOVE?CW 00132h, _ugol LABEL?L L00039 CMPGE?WCL _takt, 050D2h, L00041 MOVE?CW 00144h, _ugol LABEL?L L00041 CMPGE?WCL _takt, 04F73h, L00043 MOVE?CW 00156h, _ugol LABEL?L L00043 CMPGE?WCL _takt, 04E20h, L00045 MOVE?CW 00168h, _ugol LABEL?L L00045 CMPGE?WCL _takt, 04CD8h, L00047 MOVE?CW 0017Ah, _ugol LABEL?L L00047 CMPGE?WCL _takt, 04B9Bh, L00049 MOVE?CW 0018Ch, _ugol LABEL?L L00049 CMPGE?WCL _takt, 04A68h, L00051 MOVE?CW 0019Eh, _ugol LABEL?L L00051 CMPGE?WCL _takt, 0493Eh, L00053 MOVE?CW 001B0h, _ugol LABEL?L L00053 CMPGE?WCL _takt, 0481Eh, L00055 MOVE?CW 001C2h, _ugol LABEL?L L00055 CMPGE?WCL _takt, 04706h, L00057 MOVE?CW 001D4h, _ugol LABEL?L L00057 CMPGE?WCL _takt, 045F6h, L00059 MOVE?CW 001E6h, _ugol LABEL?L L00059 CMPGE?WCL _takt, 044EFh, L00061 MOVE?CW 001F8h, _ugol LABEL?L L00061 CMPGE?WCL _takt, 043EFh, L00063 MOVE?CW 0020Ah, _ugol LABEL?L L00063 CMPGE?WCL _takt, 042F7h, L00065 MOVE?CW 0021Ch, _ugol LABEL?L L00065 CMPGE?WCL _takt, 04205h, L00067 MOVE?CW 0022Eh, _ugol LABEL?L L00067 CMPGE?WCL _takt, 0411Bh, L00069 MOVE?CW 00240h, _ugol LABEL?L L00069 CMPGE?WCL _takt, 04036h, L00071 MOVE?CW 00252h, _ugol LABEL?L L00071 CMPGE?WCL _takt, 03F58h, L00073 MOVE?CW 00264h, _ugol LABEL?L L00073 CMPGE?WCL _takt, 03E80h, L00075 MOVE?CW 00276h, _ugol LABEL?L L00075 CMPGE?WCL _takt, 03DADh, L00077 MOVE?CW 00288h, _ugol LABEL?L L00077 CMPGE?WCL _takt, 03CE0h, L00079 MOVE?CW 0029Ah, _ugol LABEL?L L00079 CMPGE?WCL _takt, 03C19h, L00081 MOVE?CW 002ACh, _ugol LABEL?L L00081 CMPGE?WCL _takt, 03B56h, L00083 MOVE?CW 002BEh, _ugol LABEL?L L00083 CMPGE?WCL _takt, 03A98h, L00085 MOVE?CW 002D0h, _ugol LABEL?L L00085 CMPGE?WCL _takt, 039DFh, L00087 MOVE?CW 002E2h, _ugol LABEL?L L00087 CMPGE?WCL _takt, 0392Ah, L00089 MOVE?CW 002F4h, _ugol LABEL?L L00089 CMPGE?WCL _takt, 0387Ah, L00091 MOVE?CW 00306h, _ugol LABEL?L L00091 CMPGE?WCL _takt, 037CEh, L00093 MOVE?CW 00318h, _ugol LABEL?L L00093 CMPGE?WCL _takt, 03726h, L00095 MOVE?CW 0032Ah, _ugol LABEL?L L00095 CMPGE?WCL _takt, 03681h, L00097 MOVE?CW 0033Ch, _ugol LABEL?L L00097 CMPGE?WCL _takt, 035E1h, L00099 MOVE?CW 0034Eh, _ugol LABEL?L L00099 CMPGE?WCL _takt, 03544h, L00101 MOVE?CW 00360h, _ugol LABEL?L L00101 CMPGE?WCL _takt, 034ABh, L00103 MOVE?CW 00372h, _ugol LABEL?L L00103 CMPGE?WCL _takt, 03415h, L00105 MOVE?CW 00384h, _ugol LABEL?L L00105 CMPGE?WCL _takt, 03383h, L00107 MOVE?CW 00396h, _ugol LABEL?L L00107 CMPGE?WCL _takt, 032F3h, L00109 MOVE?CW 003A8h, _ugol LABEL?L L00109 CMPGE?WCL _takt, 03267h, L00111 MOVE?CW 003BAh, _ugol LABEL?L L00111 CMPGE?WCL _takt, 031DEh, L00113 MOVE?CW 003CCh, _ugol LABEL?L L00113 CMPGE?WCL _takt, 03158h, L00115 MOVE?CW 003DEh, _ugol LABEL?L L00115 CMPGE?WCL _takt, 030D4h, L00117 MOVE?CW 003F0h, _ugol LABEL?L L00117 CMPGE?WCL _takt, 03053h, L00119 MOVE?CW 00402h, _ugol LABEL?L L00119 CMPGE?WCL _takt, 02FD5h, L00121 MOVE?CW 00414h, _ugol LABEL?L L00121 CMPGE?WCL _takt, 02F59h, L00123 MOVE?CW 00426h, _ugol LABEL?L L00123 CMPGE?WCL _takt, 02EE0h, L00125 MOVE?CW 00438h, _ugol LABEL?L L00125 CMPGE?WCL _takt, 02E69h, L00127 MOVE?CW 0044Ah, _ugol LABEL?L L00127 CMPGE?WCL _takt, 02DF5h, L00129 MOVE?CW 0045Ch, _ugol LABEL?L L00129 CMPGE?WCL _takt, 02D82h, L00131 MOVE?CW 0046Eh, _ugol LABEL?L L00131 CMPGE?WCL _takt, 02D12h, L00133 MOVE?CW 00480h, _ugol LABEL?L L00133 CMPGE?WCL _takt, 02CA5h, L00135 MOVE?CW 00492h, _ugol LABEL?L L00135 CMPGE?WCL _takt, 02C39h, L00137 MOVE?CW 004A4h, _ugol LABEL?L L00137 CMPGE?WCL _takt, 02BCFh, L00139 MOVE?CW 004B6h, _ugol LABEL?L L00139 CMPGE?WCL _takt, 02B67h, L00141 MOVE?CW 004C8h, _ugol LABEL?L L00141 CMPGE?WCL _takt, 02B01h, L00143 MOVE?CW 004DAh, _ugol LABEL?L L00143 CMPGE?WCL _takt, 02A9Dh, L00145 MOVE?CW 004ECh, _ugol LABEL?L L00145 CMPGE?WCL _takt, 02A3Bh, L00147 MOVE?CW 004FEh, _ugol LABEL?L L00147 CMPGE?WCL _takt, 029DAh, L00149 MOVE?CW 00510h, _ugol LABEL?L L00149 CMPGE?WCL _takt, 0291Eh, L00151 MOVE?CW 00514h, _ugol LABEL?L L00151 CMPGE?WCL _takt, 02869h, L00153 MOVE?CW 0052Ch, _ugol LABEL?L L00153 CMPGE?WCL _takt, 027B9h, L00155 MOVE?CW 00544h, _ugol LABEL?L L00155 CMPGE?WCL _takt, 02710h, L00157 MOVE?CW 0055Ch, _ugol LABEL?L L00157 CMPGE?WCL _takt, 0266Ch, L00159 MOVE?CW 00574h, _ugol LABEL?L L00159 CMPGE?WCL _takt, 025CDh, L00161 MOVE?CW 0058Ch, _ugol LABEL?L L00161 CMPGE?WCL _takt, 02534h, L00163 MOVE?CW 005A4h, _ugol LABEL?L L00163 CMPGE?WCL _takt, 0249Fh, L00165 MOVE?CW 005BCh, _ugol LABEL?L L00165 CMPGE?WCL _takt, 0240Fh, L00167 MOVE?CW 005D4h, _ugol LABEL?L L00167 CMPGE?WCL _takt, 02383h, L00169 MOVE?CW 005ECh, _ugol LABEL?L L00169 CMPGE?WCL _takt, 022FBh, L00171 MOVE?CW 00604h, _ugol LABEL?L L00171 CMPGE?WCL _takt, 02278h, L00173 MOVE?CW 0061Ch, _ugol LABEL?L L00173 CMPGE?WCL _takt, 021F8h, L00175 MOVE?CW 00634h, _ugol LABEL?L L00175 CMPGE?WCL _takt, 0217Bh, L00177 MOVE?CW 0064Ch, _ugol LABEL?L L00177 CMPGE?WCL _takt, 02103h, L00179 MOVE?CW 00664h, _ugol LABEL?L L00179 CMPGE?WCL _takt, 0208Dh, L00181 MOVE?CW 0067Ch, _ugol LABEL?L L00181 CMPGE?WCL _takt, 0201Bh, L00183 MOVE?CW 00694h, _ugol LABEL?L L00183 CMPGE?WCL _takt, 01FACh, L00185 MOVE?CW 006ACh, _ugol LABEL?L L00185 CMPGE?WCL _takt, 01F40h, L00187 MOVE?CW 006C4h, _ugol LABEL?L L00187 CMPGE?WCL _takt, 01ED7h, L00189 MOVE?CW 006DCh, _ugol LABEL?L L00189 CMPGE?WCL _takt, 01E70h, L00191 MOVE?CW 006F4h, _ugol LABEL?L L00191 CMPGE?WCL _takt, 01E0Ch, L00193 MOVE?CW 0070Ch, _ugol LABEL?L L00193 CMPGE?WCL _takt, 01DABh, L00195 MOVE?CW 00724h, _ugol LABEL?L L00195 CMPGE?WCL _takt, 01D4Ch, L00197 MOVE?CW 0073Ch, _ugol LABEL?L L00197 CMPGE?WCL _takt, 01CEFh, L00199 MOVE?CW 00754h, _ugol LABEL?L L00199 CMPGE?WCL _takt, 01C95h, L00201 MOVE?CW 0076Ch, _ugol LABEL?L L00201 CMPGE?WCL _takt, 01C3Dh, L00203 MOVE?CW 00784h, _ugol LABEL?L L00203 CMPGE?WCL _takt, 01BE7h, L00205 MOVE?CW 0079Ch, _ugol LABEL?L L00205 CMPGE?WCL _takt, 01B93h, L00207 MOVE?CW 007B4h, _ugol LABEL?L L00207 CMPGE?WCL _takt, 01B41h, L00209 MOVE?CW 007CCh, _ugol LABEL?L L00209 CMPGE?WCL _takt, 01AF1h, L00211 MOVE?CW 007E4h, _ugol LABEL?L L00211 CMPGE?WCL _takt, 01AA2h, L00213 MOVE?CW 007FCh, _ugol LABEL?L L00213 CMPGE?WCL _takt, 01A56h, L00215 MOVE?CW 00814h, _ugol LABEL?L L00215 CMPGE?WCL _takt, 01A0Bh, L00217 MOVE?CW 0082Ch, _ugol LABEL?L L00217 CMPGE?WCL _takt, 019C1h, L00219 MOVE?CW 00844h, _ugol LABEL?L L00219 CMPGE?WCL _takt, 0197Ah, L00221 MOVE?CW 0085Ch, _ugol LABEL?L L00221 CMPGE?WCL _takt, 01934h, L00223 MOVE?CW 00874h, _ugol LABEL?L L00223 CMPGE?WCL _takt, 018EFh, L00225 MOVE?CW 0088Ch, _ugol LABEL?L L00225 CMPGE?WCL _takt, 018ACh, L00227 MOVE?CW 008A4h, _ugol LABEL?L L00227 CMPGE?WCL _takt, 0186Ah, L00229 MOVE?CW 008BCh, _ugol LABEL?L L00229 CMPGE?WCL _takt, 0182Ah, L00231 MOVE?CW 008D4h, _ugol LABEL?L L00231 CMPGE?WCL _takt, 017EAh, L00233 MOVE?CW 008ECh, _ugol LABEL?L L00233 CMPGE?WCL _takt, 017ADh, L00235 MOVE?CW 00904h, _ugol LABEL?L L00235 CMPGE?WCL _takt, 01770h, L00237 MOVE?CW 0091Ch, _ugol LABEL?L L00237 CMPGE?WCL _takt, 01735h, L00239 MOVE?CW 00934h, _ugol LABEL?L L00239 CMPGE?WCL _takt, 016FAh, L00241 MOVE?CW 0094Ch, _ugol LABEL?L L00241 MUL?WWW _grad, _ugol, T1 DIV?WCW T1, 064h, T1 SUB?WWW _takt, T1, _yoz RETURN? END