Subversion Repositories svn.mios

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1221 Antichambr 1
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  1
2
 
3
 
4
LOC  OBJECT CODE     LINE SOURCE TEXT
5
  VALUE
6
 
7
               00001 ; $Id: main.asm 879 2010-01-02 15:52:46Z tk $
8
               00002 ;
9
               00003 ; A CORE->TIA Module Interconnection Test
10
               00004 ;
11
               00005 ; ==========================================================================
12
               00006 ;
13
               00007 ;  Copyright 2005 Thorsten Klose (tk@midibox.org)
14
               00008 ;  Licensed for personal non-commercial use only.
15
               00009 ;  All other rights reserved.
16
               00010 ;
17
               00011 ; ==========================================================================
18
               00012
19
               00013 ;; ---[ MIOS header file ]---
20
               00014 #include <mios.h>
21
               00001 ; $Id: mios.h 822 2009-09-17 18:39:53Z tk $
22
               00002 ;
23
               00003 ; MIOS Definitions file
24
               00004 ;
25
               00005 ; ==========================================================================
26
               00006 ;
27
               00007 ;  Copyright 1998-2008 Thorsten Klose (tk@midibox.org)
28
               00008 ;  Licensed for personal non-commercial use only.
29
               00009 ;  All other rights reserved.
30
               00010 ;
31
               00011 ; ==========================================================================
32
               00012
33
               00013
34
               00014 ;; ==========================================================================
35
               00015 ;;  Include basic defines which characterize the derivative to
36
               00016 ;;  simplify dependencies within MIOS source code
37
               00017 ;; ==========================================================================
38
               00018 #include <hw_flags.h>
39
               00001
40
               00002 #ifndef _HW_FLAGS_H
41
0000 00003 #define _HW_FLAGS_H
42
               00004
43
               00005 #ifdef __18F452
44
               00006 #define PIC_DERIVATIVE_CODE_SIZE        0x08000
45
               00007 #define PIC_DERIVATIVE_RAM_SIZE         0x600
46
               00008 #define PIC_DERIVATIVE_EEPROM_SIZE      0x100
47
               00009 #define PIC_DERIVATIVE_IRQ_WORKAROUND   0
48
               00010 #define PIC_DERIVATIVE_NEW_ADC          0
49
               00011 #define PIC_DERIVATIVE_CMCON_INIT       0
50
               00012 #define PIC_DERIVATIVE_T08BIT_INVERTED  0
51
               00013 #define PIC_DERIVATIVE_SET_LCD_4BIT     0
52
               00014 #endif
53
               00015
54
               00016 #ifdef __18F4620
55
               00017 #define PIC_DERIVATIVE_CODE_SIZE        0x10000
56
               00018 #define PIC_DERIVATIVE_RAM_SIZE         0xf80
57
               00019 #define PIC_DERIVATIVE_EEPROM_SIZE      0x400
58
               00020 #define PIC_DERIVATIVE_IRQ_WORKAROUND   1
59
               00021 #define PIC_DERIVATIVE_NEW_ADC          1
60
               00022 #define PIC_DERIVATIVE_CMCON_INIT       1
61
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  2
62
 
63
 
64
LOC  OBJECT CODE     LINE SOURCE TEXT
65
  VALUE
66
 
67
               00023 #define PIC_DERIVATIVE_T08BIT_INVERTED  1
68
               00024 #define PIC_DERIVATIVE_SET_LCD_4BIT     0
69
               00025 #endif
70
               00026
71
               00027 #ifdef __18F4520
72
               00028 #define PIC_DERIVATIVE_CODE_SIZE        0x08000
73
               00029 #define PIC_DERIVATIVE_RAM_SIZE         0x600
74
               00030 #define PIC_DERIVATIVE_EEPROM_SIZE      0x100
75
               00031 #define PIC_DERIVATIVE_IRQ_WORKAROUND   1
76
               00032 #define PIC_DERIVATIVE_NEW_ADC          1
77
               00033 #define PIC_DERIVATIVE_CMCON_INIT       1
78
               00034 #define PIC_DERIVATIVE_T08BIT_INVERTED  0
79
               00035 #define PIC_DERIVATIVE_SET_LCD_4BIT     0
80
               00036 #endif
81
               00037
82
               00038 #ifdef __18F4682
83
               00039 #define PIC_DERIVATIVE_CODE_SIZE        0x14000
84
               00040 #define PIC_DERIVATIVE_RAM_SIZE         0xd00
85
               00041 #define PIC_DERIVATIVE_EEPROM_SIZE      0x400
86
               00042 #define PIC_DERIVATIVE_IRQ_WORKAROUND   0
87
               00043 #define PIC_DERIVATIVE_NEW_ADC          1
88
               00044 #define PIC_DERIVATIVE_CMCON_INIT       1
89
               00045 #define PIC_DERIVATIVE_T08BIT_INVERTED  0
90
               00046 #define PIC_DERIVATIVE_SET_LCD_4BIT     1
91
               00047 #endif
92
               00048
93
               00049 #ifdef __18F4685
94
0000 00050 #define PIC_DERIVATIVE_CODE_SIZE        0x18000
95
0000 00051 #define PIC_DERIVATIVE_RAM_SIZE         0xd00
96
0000 00052 #define PIC_DERIVATIVE_EEPROM_SIZE      0x400
97
0000 00053 #define PIC_DERIVATIVE_IRQ_WORKAROUND   0
98
0000 00054 #define PIC_DERIVATIVE_NEW_ADC          1
99
0000 00055 #define PIC_DERIVATIVE_CMCON_INIT       1
100
0000 00056 #define PIC_DERIVATIVE_T08BIT_INVERTED  0
101
0000 00057 #define PIC_DERIVATIVE_SET_LCD_4BIT     1
102
               00058 #endif
103
               00059
104
               00060 #endif
105
               00019
106
               00020 ;; ==========================================================================
107
               00021 ;;  Assembler directives & device specific include file
108
               00022 ;;
109
               00023 ;;  Natively supported devices are listed here.
110
               00024 ;; ==========================================================================
111
               00025
112
               00026 #ifdef __18F452
113
               00027         LIST R=DEC
114
               00028 #include <p18f452.inc>
115
               00029 #endif
116
               00030
117
               00031 #ifdef __18F4620
118
               00032         LIST R=DEC
119
               00033 #include <p18f4620.inc>
120
               00034 #endif
121
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  3
122
 
123
 
124
LOC  OBJECT CODE     LINE SOURCE TEXT
125
  VALUE
126
 
127
               00035
128
               00036 #ifdef __18F4520
129
               00037         LIST R=DEC
130
               00038 #include <p18f4520.inc>
131
               00039 #endif
132
               00040
133
               00041 #ifdef __18F4682
134
               00042         LIST R=DEC
135
               00043 #include <p18f4682.inc>
136
               00044 #endif
137
               00045
138
               00046 #ifdef __18F4685
139
               00047         LIST R=DEC
140
               00048 #include <p18f4685.inc>
141
               00001         LIST
142
               00002
143
               00003 ;==========================================================================
144
               00004 ;  MPASM PIC18F4685 processor include
145
               00005 ;
146
               00006 ;  (c) Copyright 1999-2007 Microchip Technology, All rights reserved
147
               00007 ;==========================================================================
148
               00008
149
               04822         LIST
150
               00049 #endif
151
               00050
152
               00051
153
               00052 ;; ==========================================================================
154
               00053 ;;  General constants
155
               00054 ;; ==========================================================================
156
               00055
157
               00056 ;; used by MIOS_MIDI_Interface*
158
  00000000     00057 MIOS_MIDI_INTERFACE_COMMON      EQU     0x00
159
  00000001     00058 MIOS_MIDI_INTERFACE_TO_HOST     EQU     0x01
160
               00059
161
               00060 ;; used by MIOS_MIDI_Merger*
162
  00000000     00061 MIOS_MIDI_MERGER_DISABLED       EQU     0x00
163
  00000001     00062 MIOS_MIDI_MERGER_ENABLED        EQU     0x01
164
  00000002     00063 MIOS_MIDI_MERGER_MBLINK_EP      EQU     0x02
165
  00000003     00064 MIOS_MIDI_MERGER_MBLINK_FP      EQU     0x03
166
               00065
167
               00066 ;; used by MIOS_ENC_PIN_TABLE
168
               00067 #ifdef MIOS_OLD_ENCODER_MODES
169
               00068 MIOS_ENC_MODE_NON_DETENTED      EQU     0x00
170
               00069 MIOS_ENC_MODE_DETENTED          EQU     0x80
171
               00070 MIOS_ENC_MODE_DETENTED1         EQU     0x80
172
               00071 MIOS_ENC_MODE_DETENTED2         EQU     0x81
173
               00072 MIOS_ENC_MODE_DETENTED3         EQU     0x82
174
               00073 #else
175
               00074 ;; new encoder modes: each bit of MIOS_ENC_MODE_xx tells, if an INC / DEC is
176
               00075 ;; being triggered on the corresponding edge.
177
               00076 ;; Bit      7   6   5   4
178
               00077 ;; DEC     <-  <-  <-  <-
179
               00078 ;; Pin A ___|-------|_______
180
               00079 ;; Pin B _______|-------|___
181
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  4
182
 
183
 
184
LOC  OBJECT CODE     LINE SOURCE TEXT
185
  VALUE
186
 
187
               00080 ;; INC      ->  ->  ->  ->
188
               00081 ;; Bit      0   1   2   3
189
               00082 ;; Ex.:          Bit  76543210
190
               00083 ;;      DETENTED2 = 0b00100010 = 0x22
191
               00084 ;;      -> INC will be triggered on edge 1, DEC on edge 5
192
  000000FF     00085 MIOS_ENC_MODE_NON_DETENTED      EQU     0xff
193
  000000AA     00086 MIOS_ENC_MODE_DETENTED          EQU     0xaa
194
  000000AA     00087 MIOS_ENC_MODE_DETENTED1         EQU     0xaa
195
  00000022     00088 MIOS_ENC_MODE_DETENTED2         EQU     0x22
196
  00000088     00089 MIOS_ENC_MODE_DETENTED3         EQU     0x88
197
  000000A5     00090 MIOS_ENC_MODE_DETENTED4         EQU     0xa5
198
  0000005A     00091 MIOS_ENC_MODE_DETENTED5         EQU     0x5a
199
               00092 #endif
200
               00093
201
               00094 ;; used by MIOS_ENC_Speed*
202
  00000000     00095 MIOS_ENC_SPEED_SLOW             EQU     0
203
  00000001     00096 MIOS_ENC_SPEED_NORMAL           EQU     1
204
  00000002     00097 MIOS_ENC_SPEED_FAST             EQU     2
205
               00098
206
               00099 ;; used by MIOS_LCD_Type*
207
  00000000     00100 MIOS_LCD_TYPE_CLCD              EQU     0x00
208
  00000001     00101 MIOS_LCD_TYPE_GLCD0             EQU     0x01
209
  00000002     00102 MIOS_LCD_TYPE_GLCD1             EQU     0x02
210
  00000003     00103 MIOS_LCD_TYPE_GLCD2             EQU     0x03
211
  00000004     00104 MIOS_LCD_TYPE_GLCD3             EQU     0x04
212
  00000005     00105 MIOS_LCD_TYPE_GLCD4             EQU     0x05
213
  00000006     00106 MIOS_LCD_TYPE_MLCD              EQU     0x06
214
  00000007     00107 MIOS_LCD_TYPE_GLCD_CUSTOM       EQU     0x07
215
               00108
216
               00109 ;; location of default 5x8 font for graphical displays
217
  00007CFC     00110 MIOS_GLCD_FONT                  EQU     0x7cfc
218
               00111
219
               00112 ;; general config flags (never overwrite this flags directly!!!)
220
  00000000     00113 MIOS_BOX_CFG0_LCD_TYPE0         EQU 0   ; selects LCD type, bit 0
221
  00000001     00114 MIOS_BOX_CFG0_LCD_TYPE1         EQU 1   ; selects LCD type, bit 1
222
  00000002     00115 MIOS_BOX_CFG0_LCD_TYPE2         EQU 2   ; selects LCD type, bit 2
223
  00000003     00116 MIOS_BOX_CFG0_USE_GLCD          EQU 3   ; if 1, graphical LCD is connected
224
  00000004     00117 MIOS_BOX_CFG0_MERGER            EQU 4   ; if 1, MIDI merger is enabled
225
  00000005     00118 MIOS_BOX_CFG0_MBLINK            EQU 5   ; if 1, MIDIbox Link is enabled
226
  00000006     00119 MIOS_BOX_CFG0_TO_HOST           EQU 6   ; if 1, MIDI interface will run with 38400 baud instead of 31250
227
  00000007     00120 MIOS_BOX_CFG0_20MHz             EQU 7   ; if 1, it is assumed that box is running with 20 MHz, else with 40 MHz
228
               00121
229
  00000000     00122 MIOS_BOX_CFG1_BS_A0             EQU 0   ; A0 of BankStick (never change the bit position)
230
  00000001     00123 MIOS_BOX_CFG1_BS_A1             EQU 1   ; A1 of BankStick (never change the bit position)
231
  00000002     00124 MIOS_BOX_CFG1_BS_A2             EQU 2   ; A2 of BankStick (never change the bit position)
232
  00000003     00125 MIOS_BOX_CFG1_BS_DIS_VERIFY     EQU 3   ; if 1, writes to the BankStick will not be verified
233
  00000004     00126 MIOS_BOX_CFG1_IIC_STRETCH_CLK   EQU 4   ; if 1, IIC clock stretching enabled
234
               00127
235
               00128 ;; general status flags (never overwrite this flags directly!!!)
236
  00000000     00129 MIOS_BOX_STAT_BS_AVAILABLE      EQU 0   ; if 1, BankStick is available
237
  00000001     00130 MIOS_BOX_STAT_MBLINK_TUNNEL_PASS EQU 1  ; if 1, a MBLinked event will be tunnled
238
  00000002     00131 MIOS_BOX_STAT_SUSPEND_ALL       EQU 2   ; if 1, all system and user tasks are suspended
239
  00000003     00132 MIOS_BOX_STAT_SUSPEND_USER      EQU 3   ; if 1, all user tasks are suspended
240
  00000004     00133 MIOS_BOX_STAT_AUTOREPEAT        EQU 4   ; if 1, start the auto-repeat handler
241
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  5
242
 
243
 
244
LOC  OBJECT CODE     LINE SOURCE TEXT
245
  VALUE
246
 
247
  00000005     00134 MIOS_BOX_STAT_MLCD_TRANSFER     EQU 5   ; if 1, a transfer to the MLCD has been started
248
  00000006     00135 MIOS_BOX_STAT_FERR              EQU 6   ; if 1, a frame error happened during MIDI receive
249
               00136
250
               00137 ;; ==========================================================================
251
               00138 ;;  MIOS Special Function Registers
252
               00139 ;; ==========================================================================
253
               00140
254
  00000000     00141 MIOS_BOX_CFG0   EQU     0x000
255
  00000001     00142 MIOS_BOX_CFG1   EQU     0x001
256
  00000002     00143 MIOS_BOX_STAT   EQU     0x002
257
  00000003     00144 MIOS_PARAMETER1 EQU     0x003
258
  00000004     00145 MIOS_PARAMETER2 EQU     0x004
259
  00000005     00146 MIOS_PARAMETER3 EQU     0x005
260
               00147
261
               00148 ;; ==========================================================================
262
               00149 ;;  temporary registers for main programs
263
               00150 ;; ==========================================================================
264
  00000006     00151 TMP1            EQU     0x006
265
  00000007     00152 TMP2            EQU     0x007
266
  00000008     00153 TMP3            EQU     0x008
267
  00000009     00154 TMP4            EQU     0x009
268
  0000000A     00155 TMP5            EQU     0x00a
269
               00156
270
               00157 ;; ==========================================================================
271
               00158 ;;  temporary registers for IRQs
272
               00159 ;; ==========================================================================
273
  0000000B     00160 IRQ_TMP1        EQU     0x00b
274
  0000000C     00161 IRQ_TMP2        EQU     0x00c
275
  0000000D     00162 IRQ_TMP3        EQU     0x00d
276
  0000000E     00163 IRQ_TMP4        EQU     0x00e
277
  0000000F     00164 IRQ_TMP5        EQU     0x00f
278
               00165
279
               00166 ;; ==========================================================================
280
               00167 ;;  free memory space for user application:
281
               00168 ;; ==========================================================================
282
               00169         ;; 0x010-0x37f
283
               00170
284
               00171 ;; ==========================================================================
285
               00172 ;;  MIOS System Registers -- not defined here --
286
               00173 ;;  never use these memory locations!
287
               00174 ;; ==========================================================================
288
               00175         ;; 0x380-0x6ff
289
               00176
290
               00177 ;; ==========================================================================
291
               00178 ;;  MIOS System Registers for custom LCD driver
292
               00179 ;; ==========================================================================
293
  00000570     00180 MIOS_GLCD_BUFFER        EQU     0x570   ; note: the buffer must be located at ...0-...7
294
  00000578     00181 MIOS_LCD_OPTION1        EQU     0x578   ; contains the first LCD option given by MIOS_LCD_TypeSet
295
  00000579     00182 MIOS_LCD_OPTION2        EQU     0x579   ; contains the second LCD option given by MIOS_LCD_TypeSet
296
  0000057A     00183 MIOS_LCD_CURSOR_POS     EQU     0x57a   ; the current cursor pos of characters (GLCD: multiplied by width)
297
  0000057B     00184 MIOS_GLCD_GCURSOR_X     EQU     0x57b   ; for GLCDs: the current X position of graphical cursor
298
  0000057C     00185 MIOS_GLCD_GCURSOR_Y     EQU     0x57c   ; for GLCDs: the current Y position of graphical cursor
299
  0000057D     00186 MIOS_GLCD_FONT_WIDTH    EQU     0x57d   ; for GLCDs: the fontwidth given by MIOS_GLCD_FontInit
300
  0000057E     00187 MIOS_GLCD_FONT_HEIGHT   EQU     0x57e   ; for GLCDs: the fontheight given by MIOS_GLCD_FontInit
301
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  6
302
 
303
 
304
LOC  OBJECT CODE     LINE SOURCE TEXT
305
  VALUE
306
 
307
  0000057F     00188 MIOS_GLCD_FONT_X0       EQU     0x57f   ; for GLCDs: the first byte within a char entry
308
  00000580     00189 MIOS_GLCD_FONT_OFFSET   EQU     0x580   ; for GLCDs: the byte offset between the characters
309
  00000581     00190 MIOS_GLCD_FONT_PTRL     EQU     0x581   ; for GLCDs: pointer to the character table, low-byte
310
  00000582     00191 MIOS_GLCD_FONT_PTRH     EQU     0x582   ; for GLCDs: pointer to the character table, high-byte
311
  00000583     00192 MIOS_LCD_TIMEOUT0       EQU     0x583   ; can be used for timeout loops
312
  00000584     00193 MIOS_LCD_TIMEOUT1       EQU     0x584   ; can be used for timeout loops
313
  00000585     00194 MIOS_GLCD_TMP1          EQU     0x585   ; can be used as temporary buffer
314
  00000586     00195 MIOS_GLCD_TMP2          EQU     0x586   ; can be used as temporary buffer
315
  00000587     00196 MIOS_GLCD_TMP3          EQU     0x587   ; can be used as temporary buffer
316
  00000588     00197 MIOS_GLCD_TMP4          EQU     0x588   ; can be used as temporary buffer
317
  00000589     00198 MIOS_LCD_Y0_OFFSET      EQU     0x589   ; Y0 offset of LCD
318
  0000058A     00199 MIOS_LCD_Y1_OFFSET      EQU     0x58a   ; Y1 offset of LCD
319
  0000058B     00200 MIOS_LCD_Y2_OFFSET      EQU     0x58b   ; Y2 offset of LCD
320
  0000058C     00201 MIOS_LCD_Y3_OFFSET      EQU     0x58c   ; Y3 offset of LCD
321
  0000058D     00202 MIOS_LCD_CURSOR_POS_REAL EQU    0x58d   ; unmapped cursor position which has been set with MIOS_LCD_CursorSet
322
  0000058E     00203 MIOS_GLCD_FONT_PTRU     EQU     0x58e   ; for GLCDs: pointer to the character table, upper-byte (>64k flash derivatives only)
323
               00015
324
               00016 ;; ---[ useful macros ]---
325
               00017 #include <macros.h>
326
               00001 ; $Id: macros.h 49 2008-01-30 21:47:31Z tk $
327
               00002 ;
328
               00003 ; Macro Definitions
329
               00004 ;
330
               00005 ; ==========================================================================
331
               00006 ;
332
               00007 ;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
333
               00008 ;  Licensed for personal non-commercial use only.
334
               00009 ;  All other rights reserved.
335
               00010 ;
336
               00011 ; ==========================================================================
337
               00012
338
               00013 BRA_IFSET       MACRO   reg, bit, reg_a, label
339
               00014         btfsc   reg, bit, reg_a
340
               00015         bra     label
341
               00016         ENDM
342
               00017
343
               00018
344
               00019 BRA_IFCLR       MACRO   reg, bit, reg_a, label
345
               00020         btfss   reg, bit, reg_a
346
               00021         bra     label
347
               00022         ENDM
348
               00023
349
               00024 GOTO_IFSET      MACRO   reg, bit, reg_a, label
350
               00025         btfsc   reg, bit, reg_a
351
               00026         goto    label
352
               00027         ENDM
353
               00028
354
               00029
355
               00030 GOTO_IFCLR      MACRO   reg, bit, reg_a, label
356
               00031         btfss   reg, bit, reg_a
357
               00032         goto    label
358
               00033         ENDM
359
               00034
360
               00035 CALL_IFSET      MACRO   reg, bit, reg_a, label
361
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  7
362
 
363
 
364
LOC  OBJECT CODE     LINE SOURCE TEXT
365
  VALUE
366
 
367
               00036         btfsc   reg, bit, reg_a
368
               00037         call    label
369
               00038         ENDM
370
               00039
371
               00040
372
               00041 CALL_IFCLR      MACRO   reg, bit, reg_a, label
373
               00042         btfss   reg, bit, reg_a
374
               00043         call    label
375
               00044         ENDM
376
               00045
377
               00046 RCALL_IFSET     MACRO   reg, bit, reg_a, label
378
               00047         btfsc   reg, bit, reg_a
379
               00048         rcall   label
380
               00049         ENDM
381
               00050
382
               00051
383
               00052 RCALL_IFCLR     MACRO   reg, bit, reg_a, label
384
               00053         btfss   reg, bit, reg_a
385
               00054         rcall   label
386
               00055         ENDM
387
               00056
388
               00057 ;; ==========================================================================
389
               00058
390
               00059 IRQ_DISABLE MACRO
391
               00060         bcf     INTCON, GIE
392
               00061         ENDM
393
               00062
394
               00063 IRQ_ENABLE MACRO
395
               00064         bsf     INTCON, GIE
396
               00065         ENDM
397
               00066
398
               00067 ;; ==========================================================================
399
               00068
400
               00069 TABLE_ADDR_FULL MACRO addr
401
               00070         movlw   LOW(addr)               ; store Lo Byte
402
               00071         movwf   TBLPTRL
403
               00072         movlw   HIGH(addr)              ; store Hi Byte
404
               00073         movwf   TBLPTRH
405
               00074         movlw   UPPER(addr)             ; store upper Byte
406
               00075         movwf   TBLPTRU
407
               00076         ENDM
408
               00077
409
               00078 TABLE_ADDR MACRO addr
410
               00079         movlw   LOW(addr)               ; store Lo Byte
411
               00080         movwf   TBLPTRL
412
               00081         movlw   HIGH(addr)              ; store Hi Byte
413
               00082         movwf   TBLPTRH
414
               00083 #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
415
               00084         movlw   UPPER(addr)             ; store Upper Byte
416
               00085         movwf   TBLPTRU
417
               00086 #endif
418
               00087         ENDM
419
               00088
420
               00089 TABLE_H MACRO   addr
421
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  8
422
 
423
 
424
LOC  OBJECT CODE     LINE SOURCE TEXT
425
  VALUE
426
 
427
               00090         movlw   HIGH(addr)              ; store Hi Byte
428
               00091         movwf   TBLPTRH
429
               00092         ENDM
430
               00093
431
               00094 TABLE_L MACRO   addr
432
               00095         movlw   LOW(addr)               ; store Lo Byte
433
               00096         movwf   TBLPTRL
434
               00097         ENDM
435
               00098
436
               00099 TABLE_ADD_W MACRO
437
               00100         addwf   TBLPTRL, F
438
               00101         movlw   0x00
439
               00102         addwfc  TBLPTRH, F
440
               00103 #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
441
               00104         movlw   0x00
442
               00105         addwfc  TBLPTRU, F
443
               00106 #endif
444
               00107         ENDM
445
               00108
446
               00109 TABLE_ADDR_MUL_W MACRO addr, multiplicator
447
               00110         mullw   multiplicator
448
               00111         movlw   LOW(addr)
449
               00112         addwf   PRODL, W
450
               00113         movwf   TBLPTRL
451
               00114         movlw   HIGH(addr)
452
               00115         addwfc  PRODH, W
453
               00116         movwf   TBLPTRH
454
               00117 #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
455
               00118         clrf    TBLPTRU
456
               00119         movlw   UPPER(addr)
457
               00120         addwfc  TBLPTRU, F
458
               00121 #endif
459
               00122         ENDM
460
               00123
461
               00124 ;; ==========================================================================
462
               00125
463
               00126 JUMPTABLE_2BYTES MACRO max_value
464
               00127         addlw   -(max_value)    ; ensure that jump index is not greater than (max_value-1)
465
               00128         skpnc
466
               00129         movlw   -(max_value)
467
               00130         addlw   max_value
468
               00131         call    MIOS_HLP_GetIndex_2bytes
469
               00132         ENDM
470
               00133
471
               00134 JUMPTABLE_2BYTES_UNSECURE MACRO
472
               00135         call    MIOS_HLP_GetIndex_2bytes
473
               00136         ENDM
474
               00137
475
               00138 JUMPTABLE_4BYTES MACRO max_value
476
               00139         addlw   -(max_value)    ; ensure that jump index is not greater than (max_value-1)
477
               00140         skpnc
478
               00141         return
479
               00142         addlw   (max_value)
480
               00143         call    MIOS_HLP_GetIndex_4bytes
481
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE  9
482
 
483
 
484
LOC  OBJECT CODE     LINE SOURCE TEXT
485
  VALUE
486
 
487
               00144         ENDM
488
               00145
489
               00146 JUMPTABLE_4BYTES_UNSECURE MACRO
490
               00147         call    MIOS_HLP_GetIndex_4bytes
491
               00148         ENDM
492
               00149
493
               00150 ;; ==========================================================================
494
               00151
495
               00152 TWOBYTE_ENTRY MACRO low_byte, high_byte
496
               00153         dw      (high_byte << 8) | (low_byte)
497
               00154         ENDM
498
               00155
499
               00156 ;; ==========================================================================
500
               00157
501
0000 00158 #define skpnz   btfsc   STATUS, Z
502
0000 00159 #define skpz    btfss   STATUS, Z
503
0000 00160 #define skpndc  btfsc   STATUS, DC
504
0000 00161 #define skpdc   btfss   STATUS, DC
505
0000 00162 #define skpnc   btfsc   STATUS, C
506
0000 00163 #define skpc    btfss   STATUS, C
507
0000 00164 #define clrc    bcf     STATUS, C
508
0000 00165 #define setc    bsf     STATUS, C
509
0000 00166 #define clrz    bcf     STATUS, Z
510
0000 00167 #define setz    bsf     STATUS, Z
511
0000 00168 #define rrf     rrcf
512
0000 00169 #define rlf     rlcf
513
               00170
514
               00171 rgoto   MACRO   label
515
               00172         bra     label
516
               00173         ENDM
517
               00174
518
               00175 SET_BSR MACRO   reg
519
               00176         movlb   HIGH(reg)
520
               00177         ENDM
521
               00178
522
               00179 ;; ==========================================================================
523
               00180
524
               00181 FONT_ENTRY MACRO width, height, x0, char_offset
525
               00182         dw      ((height) << 8) | (width), ((char_offset) << 8) | (x0)
526
               00183         ENDM
527
               00184
528
               00185 ;; ==========================================================================
529
               00186
530
               00187 STRING MACRO length, pos, str
531
               00188         da      ((length) << 8) | (pos), str
532
               00189         ENDM
533
               00190
534
               00191 ;; ==========================================================================
535
               00018
536
               00019 ;; ---[ vectors to MIOS functions (never change!) ]---
537
               00020 #include <mios_vectors.inc>
538
               00001 ; $Id: mios_vectors.inc 49 2008-01-30 21:47:31Z tk $
539
               00002
540
  00002C00     00003 MIOS_MIDI_BeginStream                   EQU     0x2c00
541
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 10
542
 
543
 
544
LOC  OBJECT CODE     LINE SOURCE TEXT
545
  VALUE
546
 
547
  00002C04     00004 MIOS_MIDI_DeviceIDAutoSet               EQU     0x2c04
548
  00002C08     00005 MIOS_MIDI_DeviceIDGet                   EQU     0x2c08
549
  00002C0C     00006 MIOS_MIDI_DeviceIDSet                   EQU     0x2c0c
550
  00002C10     00007 MIOS_MIDI_EndStream                     EQU     0x2c10
551
  00002C14     00008 MIOS_MIDI_Init                          EQU     0x2c14
552
  00002C18     00009 MIOS_MIDI_InterfaceAutoSet              EQU     0x2c18
553
  00002C1C     00010 MIOS_MIDI_InterfaceGet                  EQU     0x2c1c
554
  00002C20     00011 MIOS_MIDI_InterfaceSet                  EQU     0x2c20
555
  00002C24     00012 MIOS_MIDI_MergerGet                     EQU     0x2c24
556
  00002C28     00013 MIOS_MIDI_MergerSet                     EQU     0x2c28
557
  00002C2C     00014 MIOS_MIDI_RxBufferFree                  EQU     0x2c2c
558
  00002C30     00015 MIOS_MIDI_RxBufferGet                   EQU     0x2c30
559
  00002C34     00016 MIOS_MIDI_RxBufferPut                   EQU     0x2c34
560
  00002C38     00017 MIOS_MIDI_RxBufferUsed                  EQU     0x2c38
561
  00002C3C     00018 MIOS_MIDI_TxBufferFlush                 EQU     0x2c3c
562
  00002C40     00019 MIOS_MIDI_TxBufferFree                  EQU     0x2c40
563
  00002C44     00020 MIOS_MIDI_TxBufferGet                   EQU     0x2c44
564
  00002C48     00021 MIOS_MIDI_TxBufferPut                   EQU     0x2c48
565
  00002C4C     00022 MIOS_MIDI_TxBufferUsed                  EQU     0x2c4c
566
  00002C50     00023 MIOS_MPROC_MergerDisable                EQU     0x2c50
567
  00002C54     00024 MIOS_MPROC_MergerEnable                 EQU     0x2c54
568
  00002C58     00025 MIOS_MPROC_MergerGet                    EQU     0x2c58
569
  00002C5C     00026 MIOS_AIN_DeadbandGet                    EQU     0x2c5c
570
  00002C60     00027 MIOS_AIN_DeadbandSet                    EQU     0x2c60
571
  00002C64     00028 MIOS_AIN_Muxed                          EQU     0x2c64
572
  00002C68     00029 MIOS_AIN_NumberGet                      EQU     0x2c68
573
  00002C6C     00030 MIOS_AIN_NumberSet                      EQU     0x2c6c
574
  00002C70     00031 MIOS_AIN_Pin7bitGet                     EQU     0x2c70
575
  00002C74     00032 MIOS_AIN_PinGet                         EQU     0x2c74
576
  00002C78     00033 MIOS_AIN_PinLSBGet                      EQU     0x2c78
577
  00002C7C     00034 MIOS_AIN_PinMSBGet                      EQU     0x2c7c
578
  00002C80     00035 MIOS_AIN_UnMuxed                        EQU     0x2c80
579
  00002C84     00036 MIOS_MF_PWM_DutyCycleDownGet            EQU     0x2c84
580
  00002C88     00037 MIOS_MF_PWM_DutyCycleDownSet            EQU     0x2c88
581
  00002C8C     00038 MIOS_MF_PWM_DutyCycleUpGet              EQU     0x2c8c
582
  00002C90     00039 MIOS_MF_PWM_DutyCycleUpSet              EQU     0x2c90
583
  00002C94     00040 MIOS_MF_DeadbandGet                     EQU     0x2c94
584
  00002C98     00041 MIOS_MF_DeadbandSet                     EQU     0x2c98
585
  00002C9C     00042 MIOS_MF_Disable                         EQU     0x2c9c
586
  00002CA0     00043 MIOS_MF_Enable                          EQU     0x2ca0
587
  00002CA4     00044 MIOS_MF_FaderMove                       EQU     0x2ca4
588
  00002CA8     00045 MIOS_MF_SuspendDisable                  EQU     0x2ca8
589
  00002CAC     00046 MIOS_MF_SuspendEnable                   EQU     0x2cac
590
  00002CB0     00047 MIOS_MF_SuspendGet                      EQU     0x2cb0
591
  00002CB4     00048 MIOS_DIN_PinGet                         EQU     0x2cb4
592
  00002CB8     00049 MIOS_DIN_SRGet                          EQU     0x2cb8
593
  00002CBC     00050 MIOS_DOUT_PinGet                        EQU     0x2cbc
594
  00002CC0     00051 MIOS_DOUT_PinSet                        EQU     0x2cc0
595
  00002CC4     00052 MIOS_DOUT_PinSet0                       EQU     0x2cc4
596
  00002CC8     00053 MIOS_DOUT_PinSet1                       EQU     0x2cc8
597
  00002CCC     00054 MIOS_DOUT_SRGet                         EQU     0x2ccc
598
  00002CD0     00055 MIOS_DOUT_SRSet                         EQU     0x2cd0
599
  00002CD4     00056 MIOS_ENC_Abs7bitAdd                     EQU     0x2cd4
600
  00002CD8     00057 MIOS_ENC_Abs7bitGet                     EQU     0x2cd8
601
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 11
602
 
603
 
604
LOC  OBJECT CODE     LINE SOURCE TEXT
605
  VALUE
606
 
607
  00002CDC     00058 MIOS_ENC_Abs7bitSet                     EQU     0x2cdc
608
  00002CE0     00059 MIOS_ENC_NumberGet                      EQU     0x2ce0
609
  00002CE4     00060 MIOS_ENC_SpeedGet                       EQU     0x2ce4
610
  00002CE8     00061 MIOS_ENC_SpeedSet                       EQU     0x2ce8
611
  00002CEC     00062 MIOS_SRIO_NumberGet                     EQU     0x2cec
612
  00002CF0     00063 MIOS_SRIO_NumberSet                     EQU     0x2cf0
613
  00002CF4     00064 MIOS_SRIO_TS_SensitivityGet             EQU     0x2cf4
614
  00002CF8     00065 MIOS_SRIO_TS_SensitivitySet             EQU     0x2cf8
615
  00002CFC     00066 MIOS_SRIO_UpdateFrqGet                  EQU     0x2cfc
616
  00002D00     00067 MIOS_SRIO_UpdateFrqSet                  EQU     0x2d00
617
  00002D04     00068 MIOS_LCD_Clear                          EQU     0x2d04
618
  00002D08     00069 MIOS_LCD_Cmd                            EQU     0x2d08
619
  00002D0C     00070 MIOS_LCD_CursorGet                      EQU     0x2d0c
620
  00002D10     00071 MIOS_LCD_CursorSet                      EQU     0x2d10
621
  00002D14     00072 MIOS_LCD_Data                           EQU     0x2d14
622
  00002D18     00073 MIOS_LCD_Init                           EQU     0x2d18
623
  00002D1C     00074 MIOS_LCD_PrintBCD1                      EQU     0x2d1c
624
  00002D20     00075 MIOS_LCD_PrintBCD2                      EQU     0x2d20
625
  00002D24     00076 MIOS_LCD_PrintBCD3                      EQU     0x2d24
626
  00002D28     00077 MIOS_LCD_PrintChar                      EQU     0x2d28
627
  00002D2C     00078 MIOS_LCD_PrintHex1                      EQU     0x2d2c
628
  00002D30     00079 MIOS_LCD_PrintHex2                      EQU     0x2d30
629
  00002D34     00080 MIOS_LCD_PrintMessage                   EQU     0x2d34
630
  00002D38     00081 MIOS_LCD_PrintPreconfString             EQU     0x2d38
631
  00002D3C     00082 MIOS_LCD_PrintString                    EQU     0x2d3c
632
  00002D40     00083 MIOS_LCD_TypeAutoSet                    EQU     0x2d40
633
  00002D44     00084 MIOS_LCD_TypeGet                        EQU     0x2d44
634
  00002D48     00085 MIOS_LCD_TypeSet                        EQU     0x2d48
635
  00002D4C     00086 MIOS_LCD_YAddressGet                    EQU     0x2d4c
636
  00002D50     00087 MIOS_LCD_YAddressSet                    EQU     0x2d50
637
  00002D54     00088 MIOS_GLCD_FontInit                      EQU     0x2d54
638
  00002D58     00089 MIOS_GLCD_GCursorGet                    EQU     0x2d58
639
  00002D5C     00090 MIOS_GLCD_GCursorSet                    EQU     0x2d5c
640
  00002D60     00091 MIOS_EEPROM_Read                        EQU     0x2d60
641
  00002D64     00092 MIOS_EEPROM_Write                       EQU     0x2d64
642
  00002D68     00093 MIOS_FLASH_Read                         EQU     0x2d68
643
  00002D6C     00094 MIOS_FLASH_Write                        EQU     0x2d6c
644
  00002D70     00095 MIOS_BANKSTICK_Read                     EQU     0x2d70
645
  00002D74     00096 MIOS_BANKSTICK_Write                    EQU     0x2d74
646
  00002D78     00097 MIOS_TIMER_Init                         EQU     0x2d78
647
  00002D7C     00098 MIOS_TIMER_Start                        EQU     0x2d7c
648
  00002D80     00099 MIOS_TIMER_Stop                         EQU     0x2d80
649
  00002D84     00100 MIOS_HLP_AddressFromTable               EQU     0x2d84
650
  00002D88     00101 MIOS_HLP_GetBitANDMask                  EQU     0x2d88
651
  00002D8C     00102 MIOS_HLP_GetBitORMask                   EQU     0x2d8c
652
  00002D90     00103 MIOS_HLP_GetIndex_2bytes                EQU     0x2d90
653
  00002D94     00104 MIOS_HLP_GetIndex_4bytes                EQU     0x2d94
654
  00002D98     00105 MIOS_HLP_IndirectJump                   EQU     0x2d98
655
  00002D9C     00106 MIOS_Delay                              EQU     0x2d9c
656
  00002DA0     00107 MIOS_GPCounterGet                       EQU     0x2da0
657
  00002DA4     00108 MIOS_Reset                              EQU     0x2da4
658
  00002DA8     00109 MIOS_SystemResume                       EQU     0x2da8
659
  00002DAC     00110 MIOS_SystemSuspend                      EQU     0x2dac
660
  00002DB0     00111 MIOS_UserResume                         EQU     0x2db0
661
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 12
662
 
663
 
664
LOC  OBJECT CODE     LINE SOURCE TEXT
665
  VALUE
666
 
667
  00002DB4     00112 MIOS_UserSuspend                        EQU     0x2db4
668
  00002DB8     00113 MIOS_HLP_16bitAddSaturate               EQU     0x2db8
669
  00002DBC     00114 MIOS_DIN_PinAutoRepeatEnable            EQU     0x2dbc
670
  00002DC0     00115 MIOS_DIN_PinAutoRepeatDisable           EQU     0x2dc0
671
  00002DC4     00116 MIOS_DIN_PinAutoRepeatGet               EQU     0x2dc4
672
  00002DC8     00117 MIOS_CLCD_SpecialCharInit               EQU     0x2dc8
673
  00002DCC     00118 MIOS_CLCD_SpecialCharsInit              EQU     0x2dcc
674
  00002DD0     00119 MIOS_AIN_DynamicPrioSet                 EQU     0x2dd0
675
  00002DD4     00120 MIOS_AIN_DynamicPrioGet                 EQU     0x2dd4
676
  00002DD8     00121 MIOS_AIN_LastPinsGet                    EQU     0x2dd8
677
  00002DDC     00122 MIOS_BANKSTICK_CtrlSet                  EQU     0x2ddc
678
  00002DE0     00123 MIOS_BANKSTICK_CtrlGet                  EQU     0x2de0
679
  00002DE4     00124 MIOS_BANKSTICK_WritePage                EQU     0x2de4
680
  00002DE8     00125 MIOS_HLP_Dec2BCD                        EQU     0x2de8
681
  00002DEC     00126 MIOS_LCD_PrintBCD4                      EQU     0x2dec
682
  00002DF0     00127 MIOS_LCD_PrintBCD5                      EQU     0x2df0
683
  00002DF4     00128 MIOS_LCD_MessageStart                   EQU     0x2df4
684
  00002DF8     00129 MIOS_LCD_MessageStop                    EQU     0x2df8
685
  00002DFC     00130 MIOS_MF_PWM_PeriodGet                   EQU     0x2dfc
686
  00002E00     00131 MIOS_MF_PWM_PeriodSet                   EQU     0x2e00
687
  00002E04     00132 MIOS_IIC_Start                          EQU     0x2e04
688
  00002E08     00133 MIOS_IIC_Stop                           EQU     0x2e08
689
  00002E0C     00134 MIOS_IIC_ByteSend                       EQU     0x2e0c
690
  00002E10     00135 MIOS_IIC_ByteReceive                    EQU     0x2e10
691
  00002E14     00136 MIOS_IIC_AckSend                        EQU     0x2e14
692
  00002E18     00137 MIOS_IIC_NakSend                        EQU     0x2e18
693
  00002E1C     00138 MIOS_IIC_CtrlSet                        EQU     0x2e1c
694
  00002E20     00139 MIOS_IIC_CtrlGet                        EQU     0x2e20
695
  00002E24     00140 MIOS_SRIO_DebounceSet                   EQU     0x2e24
696
  00002E28     00141 MIOS_SRIO_DebounceGet                   EQU     0x2e28
697
  00002E2C     00142 MIOS_MF_TouchDetectionReset             EQU     0x2e2c
698
  00002E30     00143 MIOS_BANKSTICK_ReadPage                 EQU     0x2e30
699
  00002E34     00144 MIOS_EEPROM_ReadPage                    EQU     0x2e34
700
  00002E38     00145 MIOS_EEPROM_WritePage                   EQU     0x2e38
701
  00002E3C     00146 MIOS_TIMER_ReInit                       EQU     0x2e3c
702
  00002E40     00147 MIOS_RESERVED_144                       EQU     0x2e40
703
  00002E44     00148 MIOS_RESERVED_145                       EQU     0x2e44
704
  00002E48     00149 MIOS_RESERVED_146                       EQU     0x2e48
705
  00002E4C     00150 MIOS_RESERVED_147                       EQU     0x2e4c
706
  00002E50     00151 MIOS_RESERVED_148                       EQU     0x2e50
707
  00002E54     00152 MIOS_RESERVED_149                       EQU     0x2e54
708
  00002E58     00153 MIOS_RESERVED_150                       EQU     0x2e58
709
  00002E5C     00154 MIOS_RESERVED_151                       EQU     0x2e5c
710
  00002E60     00155 MIOS_RESERVED_152                       EQU     0x2e60
711
  00002E64     00156 MIOS_RESERVED_153                       EQU     0x2e64
712
  00002E68     00157 MIOS_RESERVED_154                       EQU     0x2e68
713
  00002E6C     00158 MIOS_RESERVED_155                       EQU     0x2e6c
714
  00002E70     00159 MIOS_RESERVED_156                       EQU     0x2e70
715
  00002E74     00160 MIOS_RESERVED_157                       EQU     0x2e74
716
  00002E78     00161 MIOS_RESERVED_158                       EQU     0x2e78
717
  00002E7C     00162 MIOS_RESERVED_159                       EQU     0x2e7c
718
  00002E80     00163 MIOS_RESERVED_160                       EQU     0x2e80
719
  00002E84     00164 MIOS_RESERVED_161                       EQU     0x2e84
720
  00002E88     00165 MIOS_RESERVED_162                       EQU     0x2e88
721
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 13
722
 
723
 
724
LOC  OBJECT CODE     LINE SOURCE TEXT
725
  VALUE
726
 
727
  00002E8C     00166 MIOS_RESERVED_163                       EQU     0x2e8c
728
  00002E90     00167 MIOS_RESERVED_164                       EQU     0x2e90
729
  00002E94     00168 MIOS_RESERVED_165                       EQU     0x2e94
730
  00002E98     00169 MIOS_RESERVED_166                       EQU     0x2e98
731
  00002E9C     00170 MIOS_RESERVED_167                       EQU     0x2e9c
732
  00002EA0     00171 MIOS_RESERVED_168                       EQU     0x2ea0
733
  00002EA4     00172 MIOS_RESERVED_169                       EQU     0x2ea4
734
  00002EA8     00173 MIOS_RESERVED_170                       EQU     0x2ea8
735
  00002EAC     00174 MIOS_RESERVED_171                       EQU     0x2eac
736
  00002EB0     00175 MIOS_RESERVED_172                       EQU     0x2eb0
737
  00002EB4     00176 MIOS_RESERVED_173                       EQU     0x2eb4
738
  00002EB8     00177 MIOS_RESERVED_174                       EQU     0x2eb8
739
  00002EBC     00178 MIOS_RESERVED_175                       EQU     0x2ebc
740
  00002EC0     00179 MIOS_RESERVED_176                       EQU     0x2ec0
741
  00002EC4     00180 MIOS_RESERVED_177                       EQU     0x2ec4
742
  00002EC8     00181 MIOS_RESERVED_178                       EQU     0x2ec8
743
  00002ECC     00182 MIOS_RESERVED_179                       EQU     0x2ecc
744
  00002ED0     00183 MIOS_RESERVED_180                       EQU     0x2ed0
745
  00002ED4     00184 MIOS_RESERVED_181                       EQU     0x2ed4
746
  00002ED8     00185 MIOS_RESERVED_182                       EQU     0x2ed8
747
  00002EDC     00186 MIOS_RESERVED_183                       EQU     0x2edc
748
  00002EE0     00187 MIOS_RESERVED_184                       EQU     0x2ee0
749
  00002EE4     00188 MIOS_RESERVED_185                       EQU     0x2ee4
750
  00002EE8     00189 MIOS_RESERVED_186                       EQU     0x2ee8
751
  00002EEC     00190 MIOS_RESERVED_187                       EQU     0x2eec
752
  00002EF0     00191 MIOS_RESERVED_188                       EQU     0x2ef0
753
  00002EF4     00192 MIOS_RESERVED_189                       EQU     0x2ef4
754
  00002EF8     00193 MIOS_RESERVED_190                       EQU     0x2ef8
755
  00002EFC     00194 MIOS_RESERVED_191                       EQU     0x2efc
756
  00002F00     00195 MIOS_RESERVED_192                       EQU     0x2f00
757
  00002F04     00196 MIOS_RESERVED_193                       EQU     0x2f04
758
  00002F08     00197 MIOS_RESERVED_194                       EQU     0x2f08
759
  00002F0C     00198 MIOS_RESERVED_195                       EQU     0x2f0c
760
  00002F10     00199 MIOS_RESERVED_196                       EQU     0x2f10
761
  00002F14     00200 MIOS_RESERVED_197                       EQU     0x2f14
762
  00002F18     00201 MIOS_RESERVED_198                       EQU     0x2f18
763
  00002F1C     00202 MIOS_RESERVED_199                       EQU     0x2f1c
764
  00002F20     00203 MIOS_RESERVED_200                       EQU     0x2f20
765
  00002F24     00204 MIOS_RESERVED_201                       EQU     0x2f24
766
  00002F28     00205 MIOS_RESERVED_202                       EQU     0x2f28
767
  00002F2C     00206 MIOS_RESERVED_203                       EQU     0x2f2c
768
  00002F30     00207 MIOS_RESERVED_204                       EQU     0x2f30
769
  00002F34     00208 MIOS_RESERVED_205                       EQU     0x2f34
770
  00002F38     00209 MIOS_RESERVED_206                       EQU     0x2f38
771
  00002F3C     00210 MIOS_RESERVED_207                       EQU     0x2f3c
772
  00002F40     00211 MIOS_RESERVED_208                       EQU     0x2f40
773
  00002F44     00212 MIOS_RESERVED_209                       EQU     0x2f44
774
  00002F48     00213 MIOS_RESERVED_210                       EQU     0x2f48
775
  00002F4C     00214 MIOS_RESERVED_211                       EQU     0x2f4c
776
  00002F50     00215 MIOS_RESERVED_212                       EQU     0x2f50
777
  00002F54     00216 MIOS_RESERVED_213                       EQU     0x2f54
778
  00002F58     00217 MIOS_RESERVED_214                       EQU     0x2f58
779
  00002F5C     00218 MIOS_RESERVED_215                       EQU     0x2f5c
780
  00002F60     00219 MIOS_RESERVED_216                       EQU     0x2f60
781
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 14
782
 
783
 
784
LOC  OBJECT CODE     LINE SOURCE TEXT
785
  VALUE
786
 
787
  00002F64     00220 MIOS_RESERVED_217                       EQU     0x2f64
788
  00002F68     00221 MIOS_RESERVED_218                       EQU     0x2f68
789
  00002F6C     00222 MIOS_RESERVED_219                       EQU     0x2f6c
790
  00002F70     00223 MIOS_RESERVED_220                       EQU     0x2f70
791
  00002F74     00224 MIOS_RESERVED_221                       EQU     0x2f74
792
  00002F78     00225 MIOS_RESERVED_222                       EQU     0x2f78
793
  00002F7C     00226 MIOS_RESERVED_223                       EQU     0x2f7c
794
  00002F80     00227 MIOS_RESERVED_224                       EQU     0x2f80
795
  00002F84     00228 MIOS_RESERVED_225                       EQU     0x2f84
796
  00002F88     00229 MIOS_RESERVED_226                       EQU     0x2f88
797
  00002F8C     00230 MIOS_RESERVED_227                       EQU     0x2f8c
798
  00002F90     00231 MIOS_RESERVED_228                       EQU     0x2f90
799
  00002F94     00232 MIOS_RESERVED_229                       EQU     0x2f94
800
  00002F98     00233 MIOS_RESERVED_230                       EQU     0x2f98
801
  00002F9C     00234 MIOS_RESERVED_231                       EQU     0x2f9c
802
  00002FA0     00235 MIOS_RESERVED_232                       EQU     0x2fa0
803
  00002FA4     00236 MIOS_RESERVED_233                       EQU     0x2fa4
804
  00002FA8     00237 MIOS_RESERVED_234                       EQU     0x2fa8
805
  00002FAC     00238 MIOS_RESERVED_235                       EQU     0x2fac
806
  00002FB0     00239 MIOS_RESERVED_236                       EQU     0x2fb0
807
  00002FB4     00240 MIOS_RESERVED_237                       EQU     0x2fb4
808
  00002FB8     00241 MIOS_RESERVED_238                       EQU     0x2fb8
809
  00002FBC     00242 MIOS_RESERVED_239                       EQU     0x2fbc
810
  00002FC0     00243 MIOS_RESERVED_240                       EQU     0x2fc0
811
  00002FC4     00244 MIOS_RESERVED_241                       EQU     0x2fc4
812
  00002FC8     00245 MIOS_RESERVED_242                       EQU     0x2fc8
813
  00002FCC     00246 MIOS_RESERVED_243                       EQU     0x2fcc
814
  00002FD0     00247 MIOS_RESERVED_244                       EQU     0x2fd0
815
  00002FD4     00248 MIOS_RESERVED_245                       EQU     0x2fd4
816
  00002FD8     00249 MIOS_RESERVED_246                       EQU     0x2fd8
817
  00002FDC     00250 MIOS_RESERVED_247                       EQU     0x2fdc
818
  00002FE0     00251 MIOS_RESERVED_248                       EQU     0x2fe0
819
  00002FE4     00252 MIOS_RESERVED_249                       EQU     0x2fe4
820
  00002FE8     00253 MIOS_RESERVED_250                       EQU     0x2fe8
821
  00002FEC     00254 MIOS_RESERVED_251                       EQU     0x2fec
822
  00002FF0     00255 MIOS_RESERVED_252                       EQU     0x2ff0
823
  00002FF4     00256 MIOS_RESERVED_253                       EQU     0x2ff4
824
  00002FF8     00257 MIOS_RESERVED_254                       EQU     0x2ff8
825
  00002FFC     00258 MIOS_RESERVED_255                       EQU     0x2ffc
826
               00021
827
               00022 ;; ---[ user hooks (never change!) ]---
828
               00023 #include <user_vectors.inc>
829
               00001 ; $Id: user_vectors.inc 49 2008-01-30 21:47:31Z tk $
830
               00002 ;
831
               00003 ; User vectortable - contains user hooks to MIOS
832
               00004 ;
833
               00005 ; ==========================================================================
834
               00006 ;
835
               00007 ;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
836
               00008 ;  Licensed for personal non-commercial use only.
837
               00009 ;  All other rights reserved.
838
               00010 ;
839
               00011 ; ==========================================================================
840
               00012
841
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 15
842
 
843
 
844
LOC  OBJECT CODE     LINE SOURCE TEXT
845
  VALUE
846
 
847
               00013         ;; never change the origin or the order of entries!
848
3000           00014         org     0x3000
849
3000 00015 _User_Init
850
3000 EF5B F01A 00016         goto    USER_Init
851
3004 00017 _USER_Tick
852
3004 EF61 F01A 00018         goto    USER_Tick
853
3008 00019 _USER_Timer
854
3008 EF62 F01A 00020         goto    USER_Timer
855
300C 00021 _USER_MPROC_DebugTrigger
856
300C EF63 F01A 00022         goto    USER_MPROC_DebugTrigger
857
3010 00023 _USER_DISPLAY_Init
858
3010 EF64 F01A 00024         goto    USER_DISPLAY_Init
859
3014 00025 _USER_DISPLAY_Tick
860
3014 EFC8 F01A 00026         goto    USER_DISPLAY_Tick
861
3018 00027 _USER_SR_Service_Prepare
862
3018 EF99 F01B 00028         goto    USER_SR_Service_Prepare
863
301C 00029 _USER_SR_Service_Finish
864
301C EF9A F01B 00030         goto    USER_SR_Service_Finish
865
3020 00031 _USER_DIN_NotifyToggle
866
3020 EF97 F01B 00032         goto    USER_DIN_NotifyToggle
867
3024 00033 _USER_ENC_NotifyChange
868
3024 EF98 F01B 00034         goto    USER_ENC_NotifyChange
869
3028 00035 _USER_AIN_NotifyChange
870
3028 EF9B F01B 00036         goto    USER_AIN_NotifyChange
871
302C 00037 _USER_MPROC_NotifyReceivedByte
872
302C EF94 F01B 00038         goto    USER_MPROC_NotifyReceivedByte
873
3030 00039 _USER_MPROC_NotifyTimeout
874
3030 EF93 F01B 00040         goto    USER_MPROC_NotifyTimeout
875
3034 00041 _USER_MPROC_NotifyReceivedEvent
876
3034 EF6F F01B 00042         goto    USER_MPROC_NotifyReceivedEvent
877
3038 00043 _USER_MPROC_NotifyFoundEvent
878
3038 EF92 F01B 00044         goto    USER_MPROC_NotifyFoundEvent
879
303C 00045 _USER_LCD_Init
880
303C EF80 F019 00046         goto    USER_LCD_Init
881
3040 00047 _USER_LCD_Clear
882
3040 EF81 F019 00048         goto    USER_LCD_Clear
883
3044 00049 _USER_LCD_CursorSet
884
3044 EF82 F019 00050         goto    USER_LCD_CursorSet
885
3048 00051 _USER_LCD_PrintChar
886
3048 EF83 F019 00052         goto    USER_LCD_PrintChar
887
304C 00053 _USER_MIDI_NotifyRx
888
304C EF96 F01B 00054         goto    USER_MIDI_NotifyRx
889
3050 00055 _USER_MIDI_NotifyTx
890
3050 EF95 F01B 00056         goto    USER_MIDI_NotifyTx
891
3054 00057 _USER_LCD_Data
892
3054 EF84 F019 00058         goto    USER_LCD_Data
893
3058 00059 _USER_LCD_Cmd
894
3058 EF85 F019 00060         goto    USER_LCD_Cmd
895
305C 00061 _USER_LCD_SpecialCharInit
896
305C EF86 F019 00062         goto    USER_LCD_SpecialCharInit
897
3060 00063 USER_RESERVED_25
898
3060 0012      00064         return
899
3062 0000      00065         nop
900
3064 00066 USER_RESERVED_26
901
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 16
902
 
903
 
904
LOC  OBJECT CODE     LINE SOURCE TEXT
905
  VALUE
906
 
907
3064 0012      00067         return
908
3066 0000      00068         nop
909
3068 00069 USER_RESERVED_27
910
3068 0012      00070         return
911
306A 0000      00071         nop
912
306C 00072 USER_RESERVED_28
913
306C 0012      00073         return
914
306E 0000      00074         nop
915
3070 00075 USER_RESERVED_29
916
3070 0012      00076         return
917
3072 0000      00077         nop
918
3074 00078 USER_RESERVED_30
919
3074 0012      00079         return
920
3076 0000      00080         nop
921
3078 00081 USER_RESERVED_31
922
3078 0012      00082         return
923
307A 0000      00083         nop
924
307C 00084 USER_RESERVED_32
925
307C 0012      00085         return
926
307E 0000      00086         nop
927
               00024
928
               00025 ;; ==========================================================================
929
               00026 ;;  General Application Settings
930
               00027 ;; ==========================================================================
931
               00028
932
               00029 ;; ---[ variables used by application ]---
933
               00030 #include "app_defines.h"
934
               00001 ; $Id: app_defines.h bdupeyron.tech@gmail.com(Antichambre)
935
               00002 ;
936
               00003 ; Specific Defines and variables of MIOS Application
937
               00004 ;
938
               00005 ; ==========================================================================
939
               00006 ;
940
               00007 ;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
941
               00008 ;  Licensed for personal non-commercial use only.
942
               00009 ;  All other rights reserved.
943
               00010 ;
944
               00011 ; ==========================================================================
945
               00012
946
               00013         ;; free memory for user applications:
947
               00014         ;; 0x010-0x37f
948
               00015
949
               00016
950
  00000010     00017 DISPLAY_UPDATE_REQ      EQU     0x010
951
  00000011     00031
952
               00032 ; ==========================================================================
953
               00033
954
               00034 ;; ---[ configuration table for MIDI processor and rotary encoders ]---
955
               00035 #include <mios_mt_table.inc>
956
               00001 ; $Id: mios_mt_table.inc 69 2008-02-01 00:20:18Z tk $
957
               00002 ;
958
               00003 ; "Dummy" MIDI Trigger Configuaration Table
959
               00004 ;
960
               00005 ; Should be included by the application, if the MIDI processor feature
961
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 17
962
 
963
 
964
LOC  OBJECT CODE     LINE SOURCE TEXT
965
  VALUE
966
 
967
               00006 ; is not used in order to pre-initialize the table area with EOT's
968
               00007 ;
969
               00008 ; Note: due to the inflexible concept (e.g. handling of Note On/Off events),
970
               00009 ; the usage of this function is not recommented for new designs - please parse
971
               00010 ; MIDI events locally within the application.
972
               00011 ;
973
               00012 ;
974
3080           00013         org     0x3080          ; never change the origin!
975
               00014
976
               00015 ;; --------------------------------------------------------------------------
977
               00016 ;; The MIDI Trigger table maps incoming MIDI events to control elements
978
               00017 ;; (pots/faders, encoders, buttons, LEDs, ...)
979
               00018 ;;
980
               00019 ;; After the MIOS MIDI processor (MPROC) has received a complete event, it
981
               00020 ;; searches in this table for a matching entry and calls USER_MPROC_NotifyFoundEvent
982
               00021 ;; with the table index in WREG and the MIDI event in MIOS_PARAMETER[123]
983
               00022 ;;
984
               00023 ;; Note also that the MIDI processor stops scanning the table after
985
               00024 ;; the first MT_EOT entry
986
               00025 ;;
987
               00026 ;; Note2: never change the origin (memory location) of this table!
988
               00027 ;;
989
               00028 ;; Optionally this table can also be used to define events, which should be
990
               00029 ;; transmitted (Example: see example_ain64_din128_dout128), so that incoming
991
               00030 ;; and outgoing events are located at one place
992
               00031 ;;
993
               00032 ;; The table *must* contain 256 entries. Unused entries should be filled with
994
               00033 ;; MT_EOT.
995
               00034 ;; --------------------------------------------------------------------------
996
               00035
997
               00036         ;; MIDI Trigger entry structure
998
               00037 MT_ENTRY MACRO event_0, event_1
999
               00038         dw      (event_1 << 8) | event_0
1000
               00039         ENDM
1001
               00040
1002
               00041 MT_EOT  MACRO
1003
               00042         dw      0xffff
1004
               00043         ENDM
1005
               00044
1006
               00045
1007
3080 00046 _MIOS_MPROC_EVENT_TABLE
1008
3080 00047 MIOS_MPROC_EVENT_TABLE
1009
               00048         ;; entry 0x00-0x0f
1010
               00049         MT_EOT
1011
3080 FFFF          M         dw      0xffff
1012
               00050         MT_EOT
1013
3082 FFFF          M         dw      0xffff
1014
               00051         MT_EOT
1015
3084 FFFF          M         dw      0xffff
1016
               00052         MT_EOT
1017
3086 FFFF          M         dw      0xffff
1018
               00053         MT_EOT
1019
3088 FFFF          M         dw      0xffff
1020
               00054         MT_EOT
1021
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 18
1022
 
1023
 
1024
LOC  OBJECT CODE     LINE SOURCE TEXT
1025
  VALUE
1026
 
1027
308A FFFF          M         dw      0xffff
1028
               00055         MT_EOT
1029
308C FFFF          M         dw      0xffff
1030
               00056         MT_EOT
1031
308E FFFF          M         dw      0xffff
1032
               00057         MT_EOT
1033
3090 FFFF          M         dw      0xffff
1034
               00058         MT_EOT
1035
3092 FFFF          M         dw      0xffff
1036
               00059         MT_EOT
1037
3094 FFFF          M         dw      0xffff
1038
               00060         MT_EOT
1039
3096 FFFF          M         dw      0xffff
1040
               00061         MT_EOT
1041
3098 FFFF          M         dw      0xffff
1042
               00062         MT_EOT
1043
309A FFFF          M         dw      0xffff
1044
               00063         MT_EOT
1045
309C FFFF          M         dw      0xffff
1046
               00064         MT_EOT
1047
309E FFFF          M         dw      0xffff
1048
               00065
1049
               00066         ;; entry 0x10-0x1f
1050
               00067         MT_EOT
1051
30A0 FFFF          M         dw      0xffff
1052
               00068         MT_EOT
1053
30A2 FFFF          M         dw      0xffff
1054
               00069         MT_EOT
1055
30A4 FFFF          M         dw      0xffff
1056
               00070         MT_EOT
1057
30A6 FFFF          M         dw      0xffff
1058
               00071         MT_EOT
1059
30A8 FFFF          M         dw      0xffff
1060
               00072         MT_EOT
1061
30AA FFFF          M         dw      0xffff
1062
               00073         MT_EOT
1063
30AC FFFF          M         dw      0xffff
1064
               00074         MT_EOT
1065
30AE FFFF          M         dw      0xffff
1066
               00075         MT_EOT
1067
30B0 FFFF          M         dw      0xffff
1068
               00076         MT_EOT
1069
30B2 FFFF          M         dw      0xffff
1070
               00077         MT_EOT
1071
30B4 FFFF          M         dw      0xffff
1072
               00078         MT_EOT
1073
30B6 FFFF          M         dw      0xffff
1074
               00079         MT_EOT
1075
30B8 FFFF          M         dw      0xffff
1076
               00080         MT_EOT
1077
30BA FFFF          M         dw      0xffff
1078
               00081         MT_EOT
1079
30BC FFFF          M         dw      0xffff
1080
               00082         MT_EOT
1081
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 19
1082
 
1083
 
1084
LOC  OBJECT CODE     LINE SOURCE TEXT
1085
  VALUE
1086
 
1087
30BE FFFF          M         dw      0xffff
1088
               00083
1089
               00084         ;; entry 0x20-0x2f
1090
               00085         MT_EOT
1091
30C0 FFFF          M         dw      0xffff
1092
               00086         MT_EOT
1093
30C2 FFFF          M         dw      0xffff
1094
               00087         MT_EOT
1095
30C4 FFFF          M         dw      0xffff
1096
               00088         MT_EOT
1097
30C6 FFFF          M         dw      0xffff
1098
               00089         MT_EOT
1099
30C8 FFFF          M         dw      0xffff
1100
               00090         MT_EOT
1101
30CA FFFF          M         dw      0xffff
1102
               00091         MT_EOT
1103
30CC FFFF          M         dw      0xffff
1104
               00092         MT_EOT
1105
30CE FFFF          M         dw      0xffff
1106
               00093         MT_EOT
1107
30D0 FFFF          M         dw      0xffff
1108
               00094         MT_EOT
1109
30D2 FFFF          M         dw      0xffff
1110
               00095         MT_EOT
1111
30D4 FFFF          M         dw      0xffff
1112
               00096         MT_EOT
1113
30D6 FFFF          M         dw      0xffff
1114
               00097         MT_EOT
1115
30D8 FFFF          M         dw      0xffff
1116
               00098         MT_EOT
1117
30DA FFFF          M         dw      0xffff
1118
               00099         MT_EOT
1119
30DC FFFF          M         dw      0xffff
1120
               00100         MT_EOT
1121
30DE FFFF          M         dw      0xffff
1122
               00101
1123
               00102         ;; entry 0x30-0x3f
1124
               00103         MT_EOT
1125
30E0 FFFF          M         dw      0xffff
1126
               00104         MT_EOT
1127
30E2 FFFF          M         dw      0xffff
1128
               00105         MT_EOT
1129
30E4 FFFF          M         dw      0xffff
1130
               00106         MT_EOT
1131
30E6 FFFF          M         dw      0xffff
1132
               00107         MT_EOT
1133
30E8 FFFF          M         dw      0xffff
1134
               00108         MT_EOT
1135
30EA FFFF          M         dw      0xffff
1136
               00109         MT_EOT
1137
30EC FFFF          M         dw      0xffff
1138
               00110         MT_EOT
1139
30EE FFFF          M         dw      0xffff
1140
               00111         MT_EOT
1141
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 20
1142
 
1143
 
1144
LOC  OBJECT CODE     LINE SOURCE TEXT
1145
  VALUE
1146
 
1147
30F0 FFFF          M         dw      0xffff
1148
               00112         MT_EOT
1149
30F2 FFFF          M         dw      0xffff
1150
               00113         MT_EOT
1151
30F4 FFFF          M         dw      0xffff
1152
               00114         MT_EOT
1153
30F6 FFFF          M         dw      0xffff
1154
               00115         MT_EOT
1155
30F8 FFFF          M         dw      0xffff
1156
               00116         MT_EOT
1157
30FA FFFF          M         dw      0xffff
1158
               00117         MT_EOT
1159
30FC FFFF          M         dw      0xffff
1160
               00118         MT_EOT
1161
30FE FFFF          M         dw      0xffff
1162
               00119
1163
               00120         ;; entry 0x40-0x4f
1164
               00121         MT_EOT
1165
3100 FFFF          M         dw      0xffff
1166
               00122         MT_EOT
1167
3102 FFFF          M         dw      0xffff
1168
               00123         MT_EOT
1169
3104 FFFF          M         dw      0xffff
1170
               00124         MT_EOT
1171
3106 FFFF          M         dw      0xffff
1172
               00125         MT_EOT
1173
3108 FFFF          M         dw      0xffff
1174
               00126         MT_EOT
1175
310A FFFF          M         dw      0xffff
1176
               00127         MT_EOT
1177
310C FFFF          M         dw      0xffff
1178
               00128         MT_EOT
1179
310E FFFF          M         dw      0xffff
1180
               00129         MT_EOT
1181
3110 FFFF          M         dw      0xffff
1182
               00130         MT_EOT
1183
3112 FFFF          M         dw      0xffff
1184
               00131         MT_EOT
1185
3114 FFFF          M         dw      0xffff
1186
               00132         MT_EOT
1187
3116 FFFF          M         dw      0xffff
1188
               00133         MT_EOT
1189
3118 FFFF          M         dw      0xffff
1190
               00134         MT_EOT
1191
311A FFFF          M         dw      0xffff
1192
               00135         MT_EOT
1193
311C FFFF          M         dw      0xffff
1194
               00136         MT_EOT
1195
311E FFFF          M         dw      0xffff
1196
               00137
1197
               00138         ;; entry 0x50-0x5f
1198
               00139         MT_EOT
1199
3120 FFFF          M         dw      0xffff
1200
               00140         MT_EOT
1201
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 21
1202
 
1203
 
1204
LOC  OBJECT CODE     LINE SOURCE TEXT
1205
  VALUE
1206
 
1207
3122 FFFF          M         dw      0xffff
1208
               00141         MT_EOT
1209
3124 FFFF          M         dw      0xffff
1210
               00142         MT_EOT
1211
3126 FFFF          M         dw      0xffff
1212
               00143         MT_EOT
1213
3128 FFFF          M         dw      0xffff
1214
               00144         MT_EOT
1215
312A FFFF          M         dw      0xffff
1216
               00145         MT_EOT
1217
312C FFFF          M         dw      0xffff
1218
               00146         MT_EOT
1219
312E FFFF          M         dw      0xffff
1220
               00147         MT_EOT
1221
3130 FFFF          M         dw      0xffff
1222
               00148         MT_EOT
1223
3132 FFFF          M         dw      0xffff
1224
               00149         MT_EOT
1225
3134 FFFF          M         dw      0xffff
1226
               00150         MT_EOT
1227
3136 FFFF          M         dw      0xffff
1228
               00151         MT_EOT
1229
3138 FFFF          M         dw      0xffff
1230
               00152         MT_EOT
1231
313A FFFF          M         dw      0xffff
1232
               00153         MT_EOT
1233
313C FFFF          M         dw      0xffff
1234
               00154         MT_EOT
1235
313E FFFF          M         dw      0xffff
1236
               00155
1237
               00156         ;; entry 0x60-0x6f
1238
               00157         MT_EOT
1239
3140 FFFF          M         dw      0xffff
1240
               00158         MT_EOT
1241
3142 FFFF          M         dw      0xffff
1242
               00159         MT_EOT
1243
3144 FFFF          M         dw      0xffff
1244
               00160         MT_EOT
1245
3146 FFFF          M         dw      0xffff
1246
               00161         MT_EOT
1247
3148 FFFF          M         dw      0xffff
1248
               00162         MT_EOT
1249
314A FFFF          M         dw      0xffff
1250
               00163         MT_EOT
1251
314C FFFF          M         dw      0xffff
1252
               00164         MT_EOT
1253
314E FFFF          M         dw      0xffff
1254
               00165         MT_EOT
1255
3150 FFFF          M         dw      0xffff
1256
               00166         MT_EOT
1257
3152 FFFF          M         dw      0xffff
1258
               00167         MT_EOT
1259
3154 FFFF          M         dw      0xffff
1260
               00168         MT_EOT
1261
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 22
1262
 
1263
 
1264
LOC  OBJECT CODE     LINE SOURCE TEXT
1265
  VALUE
1266
 
1267
3156 FFFF          M         dw      0xffff
1268
               00169         MT_EOT
1269
3158 FFFF          M         dw      0xffff
1270
               00170         MT_EOT
1271
315A FFFF          M         dw      0xffff
1272
               00171         MT_EOT
1273
315C FFFF          M         dw      0xffff
1274
               00172         MT_EOT
1275
315E FFFF          M         dw      0xffff
1276
               00173
1277
               00174         ;; entry 0x70-0x7f
1278
               00175         MT_EOT
1279
3160 FFFF          M         dw      0xffff
1280
               00176         MT_EOT
1281
3162 FFFF          M         dw      0xffff
1282
               00177         MT_EOT
1283
3164 FFFF          M         dw      0xffff
1284
               00178         MT_EOT
1285
3166 FFFF          M         dw      0xffff
1286
               00179         MT_EOT
1287
3168 FFFF          M         dw      0xffff
1288
               00180         MT_EOT
1289
316A FFFF          M         dw      0xffff
1290
               00181         MT_EOT
1291
316C FFFF          M         dw      0xffff
1292
               00182         MT_EOT
1293
316E FFFF          M         dw      0xffff
1294
               00183         MT_EOT
1295
3170 FFFF          M         dw      0xffff
1296
               00184         MT_EOT
1297
3172 FFFF          M         dw      0xffff
1298
               00185         MT_EOT
1299
3174 FFFF          M         dw      0xffff
1300
               00186         MT_EOT
1301
3176 FFFF          M         dw      0xffff
1302
               00187         MT_EOT
1303
3178 FFFF          M         dw      0xffff
1304
               00188         MT_EOT
1305
317A FFFF          M         dw      0xffff
1306
               00189         MT_EOT
1307
317C FFFF          M         dw      0xffff
1308
               00190         MT_EOT
1309
317E FFFF          M         dw      0xffff
1310
               00191
1311
               00192         ;; entry 0x80-0x8f
1312
               00193         MT_EOT
1313
3180 FFFF          M         dw      0xffff
1314
               00194         MT_EOT
1315
3182 FFFF          M         dw      0xffff
1316
               00195         MT_EOT
1317
3184 FFFF          M         dw      0xffff
1318
               00196         MT_EOT
1319
3186 FFFF          M         dw      0xffff
1320
               00197         MT_EOT
1321
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 23
1322
 
1323
 
1324
LOC  OBJECT CODE     LINE SOURCE TEXT
1325
  VALUE
1326
 
1327
3188 FFFF          M         dw      0xffff
1328
               00198         MT_EOT
1329
318A FFFF          M         dw      0xffff
1330
               00199         MT_EOT
1331
318C FFFF          M         dw      0xffff
1332
               00200         MT_EOT
1333
318E FFFF          M         dw      0xffff
1334
               00201         MT_EOT
1335
3190 FFFF          M         dw      0xffff
1336
               00202         MT_EOT
1337
3192 FFFF          M         dw      0xffff
1338
               00203         MT_EOT
1339
3194 FFFF          M         dw      0xffff
1340
               00204         MT_EOT
1341
3196 FFFF          M         dw      0xffff
1342
               00205         MT_EOT
1343
3198 FFFF          M         dw      0xffff
1344
               00206         MT_EOT
1345
319A FFFF          M         dw      0xffff
1346
               00207         MT_EOT
1347
319C FFFF          M         dw      0xffff
1348
               00208         MT_EOT
1349
319E FFFF          M         dw      0xffff
1350
               00209
1351
               00210         ;; entry 0x90-0x9f
1352
               00211         MT_EOT
1353
31A0 FFFF          M         dw      0xffff
1354
               00212         MT_EOT
1355
31A2 FFFF          M         dw      0xffff
1356
               00213         MT_EOT
1357
31A4 FFFF          M         dw      0xffff
1358
               00214         MT_EOT
1359
31A6 FFFF          M         dw      0xffff
1360
               00215         MT_EOT
1361
31A8 FFFF          M         dw      0xffff
1362
               00216         MT_EOT
1363
31AA FFFF          M         dw      0xffff
1364
               00217         MT_EOT
1365
31AC FFFF          M         dw      0xffff
1366
               00218         MT_EOT
1367
31AE FFFF          M         dw      0xffff
1368
               00219         MT_EOT
1369
31B0 FFFF          M         dw      0xffff
1370
               00220         MT_EOT
1371
31B2 FFFF          M         dw      0xffff
1372
               00221         MT_EOT
1373
31B4 FFFF          M         dw      0xffff
1374
               00222         MT_EOT
1375
31B6 FFFF          M         dw      0xffff
1376
               00223         MT_EOT
1377
31B8 FFFF          M         dw      0xffff
1378
               00224         MT_EOT
1379
31BA FFFF          M         dw      0xffff
1380
               00225         MT_EOT
1381
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 24
1382
 
1383
 
1384
LOC  OBJECT CODE     LINE SOURCE TEXT
1385
  VALUE
1386
 
1387
31BC FFFF          M         dw      0xffff
1388
               00226         MT_EOT
1389
31BE FFFF          M         dw      0xffff
1390
               00227
1391
               00228         ;; entry 0xa0-0xaf
1392
               00229         MT_EOT
1393
31C0 FFFF          M         dw      0xffff
1394
               00230         MT_EOT
1395
31C2 FFFF          M         dw      0xffff
1396
               00231         MT_EOT
1397
31C4 FFFF          M         dw      0xffff
1398
               00232         MT_EOT
1399
31C6 FFFF          M         dw      0xffff
1400
               00233         MT_EOT
1401
31C8 FFFF          M         dw      0xffff
1402
               00234         MT_EOT
1403
31CA FFFF          M         dw      0xffff
1404
               00235         MT_EOT
1405
31CC FFFF          M         dw      0xffff
1406
               00236         MT_EOT
1407
31CE FFFF          M         dw      0xffff
1408
               00237         MT_EOT
1409
31D0 FFFF          M         dw      0xffff
1410
               00238         MT_EOT
1411
31D2 FFFF          M         dw      0xffff
1412
               00239         MT_EOT
1413
31D4 FFFF          M         dw      0xffff
1414
               00240         MT_EOT
1415
31D6 FFFF          M         dw      0xffff
1416
               00241         MT_EOT
1417
31D8 FFFF          M         dw      0xffff
1418
               00242         MT_EOT
1419
31DA FFFF          M         dw      0xffff
1420
               00243         MT_EOT
1421
31DC FFFF          M         dw      0xffff
1422
               00244         MT_EOT
1423
31DE FFFF          M         dw      0xffff
1424
               00245
1425
               00246         ;; entry 0xb1-0xbf
1426
               00247         MT_EOT
1427
31E0 FFFF          M         dw      0xffff
1428
               00248         MT_EOT
1429
31E2 FFFF          M         dw      0xffff
1430
               00249         MT_EOT
1431
31E4 FFFF          M         dw      0xffff
1432
               00250         MT_EOT
1433
31E6 FFFF          M         dw      0xffff
1434
               00251         MT_EOT
1435
31E8 FFFF          M         dw      0xffff
1436
               00252         MT_EOT
1437
31EA FFFF          M         dw      0xffff
1438
               00253         MT_EOT
1439
31EC FFFF          M         dw      0xffff
1440
               00254         MT_EOT
1441
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 25
1442
 
1443
 
1444
LOC  OBJECT CODE     LINE SOURCE TEXT
1445
  VALUE
1446
 
1447
31EE FFFF          M         dw      0xffff
1448
               00255         MT_EOT
1449
31F0 FFFF          M         dw      0xffff
1450
               00256         MT_EOT
1451
31F2 FFFF          M         dw      0xffff
1452
               00257         MT_EOT
1453
31F4 FFFF          M         dw      0xffff
1454
               00258         MT_EOT
1455
31F6 FFFF          M         dw      0xffff
1456
               00259         MT_EOT
1457
31F8 FFFF          M         dw      0xffff
1458
               00260         MT_EOT
1459
31FA FFFF          M         dw      0xffff
1460
               00261         MT_EOT
1461
31FC FFFF          M         dw      0xffff
1462
               00262         MT_EOT
1463
31FE FFFF          M         dw      0xffff
1464
               00263
1465
               00264         ;; entry 0xc0-0xcf
1466
               00265         MT_EOT
1467
3200 FFFF          M         dw      0xffff
1468
               00266         MT_EOT
1469
3202 FFFF          M         dw      0xffff
1470
               00267         MT_EOT
1471
3204 FFFF          M         dw      0xffff
1472
               00268         MT_EOT
1473
3206 FFFF          M         dw      0xffff
1474
               00269         MT_EOT
1475
3208 FFFF          M         dw      0xffff
1476
               00270         MT_EOT
1477
320A FFFF          M         dw      0xffff
1478
               00271         MT_EOT
1479
320C FFFF          M         dw      0xffff
1480
               00272         MT_EOT
1481
320E FFFF          M         dw      0xffff
1482
               00273         MT_EOT
1483
3210 FFFF          M         dw      0xffff
1484
               00274         MT_EOT
1485
3212 FFFF          M         dw      0xffff
1486
               00275         MT_EOT
1487
3214 FFFF          M         dw      0xffff
1488
               00276         MT_EOT
1489
3216 FFFF          M         dw      0xffff
1490
               00277         MT_EOT
1491
3218 FFFF          M         dw      0xffff
1492
               00278         MT_EOT
1493
321A FFFF          M         dw      0xffff
1494
               00279         MT_EOT
1495
321C FFFF          M         dw      0xffff
1496
               00280         MT_EOT
1497
321E FFFF          M         dw      0xffff
1498
               00281
1499
               00282         ;; entry 0xd0-0xdf
1500
               00283         MT_EOT
1501
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 26
1502
 
1503
 
1504
LOC  OBJECT CODE     LINE SOURCE TEXT
1505
  VALUE
1506
 
1507
3220 FFFF          M         dw      0xffff
1508
               00284         MT_EOT
1509
3222 FFFF          M         dw      0xffff
1510
               00285         MT_EOT
1511
3224 FFFF          M         dw      0xffff
1512
               00286         MT_EOT
1513
3226 FFFF          M         dw      0xffff
1514
               00287         MT_EOT
1515
3228 FFFF          M         dw      0xffff
1516
               00288         MT_EOT
1517
322A FFFF          M         dw      0xffff
1518
               00289         MT_EOT
1519
322C FFFF          M         dw      0xffff
1520
               00290         MT_EOT
1521
322E FFFF          M         dw      0xffff
1522
               00291         MT_EOT
1523
3230 FFFF          M         dw      0xffff
1524
               00292         MT_EOT
1525
3232 FFFF          M         dw      0xffff
1526
               00293         MT_EOT
1527
3234 FFFF          M         dw      0xffff
1528
               00294         MT_EOT
1529
3236 FFFF          M         dw      0xffff
1530
               00295         MT_EOT
1531
3238 FFFF          M         dw      0xffff
1532
               00296         MT_EOT
1533
323A FFFF          M         dw      0xffff
1534
               00297         MT_EOT
1535
323C FFFF          M         dw      0xffff
1536
               00298         MT_EOT
1537
323E FFFF          M         dw      0xffff
1538
               00299
1539
               00300         ;; entry 0xe0-0xef
1540
               00301         MT_EOT
1541
3240 FFFF          M         dw      0xffff
1542
               00302         MT_EOT
1543
3242 FFFF          M         dw      0xffff
1544
               00303         MT_EOT
1545
3244 FFFF          M         dw      0xffff
1546
               00304         MT_EOT
1547
3246 FFFF          M         dw      0xffff
1548
               00305         MT_EOT
1549
3248 FFFF          M         dw      0xffff
1550
               00306         MT_EOT
1551
324A FFFF          M         dw      0xffff
1552
               00307         MT_EOT
1553
324C FFFF          M         dw      0xffff
1554
               00308         MT_EOT
1555
324E FFFF          M         dw      0xffff
1556
               00309         MT_EOT
1557
3250 FFFF          M         dw      0xffff
1558
               00310         MT_EOT
1559
3252 FFFF          M         dw      0xffff
1560
               00311         MT_EOT
1561
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 27
1562
 
1563
 
1564
LOC  OBJECT CODE     LINE SOURCE TEXT
1565
  VALUE
1566
 
1567
3254 FFFF          M         dw      0xffff
1568
               00312         MT_EOT
1569
3256 FFFF          M         dw      0xffff
1570
               00313         MT_EOT
1571
3258 FFFF          M         dw      0xffff
1572
               00314         MT_EOT
1573
325A FFFF          M         dw      0xffff
1574
               00315         MT_EOT
1575
325C FFFF          M         dw      0xffff
1576
               00316         MT_EOT
1577
325E FFFF          M         dw      0xffff
1578
               00317
1579
               00318         ;; entry 0xf0-0xff
1580
               00319         MT_EOT
1581
3260 FFFF          M         dw      0xffff
1582
               00320         MT_EOT
1583
3262 FFFF          M         dw      0xffff
1584
               00321         MT_EOT
1585
3264 FFFF          M         dw      0xffff
1586
               00322         MT_EOT
1587
3266 FFFF          M         dw      0xffff
1588
               00323         MT_EOT
1589
3268 FFFF          M         dw      0xffff
1590
               00324         MT_EOT
1591
326A FFFF          M         dw      0xffff
1592
               00325         MT_EOT
1593
326C FFFF          M         dw      0xffff
1594
               00326         MT_EOT
1595
326E FFFF          M         dw      0xffff
1596
               00327         MT_EOT
1597
3270 FFFF          M         dw      0xffff
1598
               00328         MT_EOT
1599
3272 FFFF          M         dw      0xffff
1600
               00329         MT_EOT
1601
3274 FFFF          M         dw      0xffff
1602
               00330         MT_EOT
1603
3276 FFFF          M         dw      0xffff
1604
               00331         MT_EOT
1605
3278 FFFF          M         dw      0xffff
1606
               00332         MT_EOT
1607
327A FFFF          M         dw      0xffff
1608
               00333         MT_EOT
1609
327C FFFF          M         dw      0xffff
1610
               00334         MT_EOT
1611
327E FFFF          M         dw      0xffff
1612
               00335
1613
               00036 #include <mios_enc_table.inc>
1614
               00001 ; $Id: mios_enc_table.inc 69 2008-02-01 00:20:18Z tk $
1615
               00002 ;
1616
               00003 ; "Dummy" Configuration Table for Rotary Encoders
1617
               00004 ;
1618
               00005 ; Should be included by the application, if no rotary encoders are connected
1619
               00006 ; in order to pre-initialize the table area with EOT's
1620
               00007 ;
1621
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 28
1622
 
1623
 
1624
LOC  OBJECT CODE     LINE SOURCE TEXT
1625
  VALUE
1626
 
1627
               00008 ; ==========================================================================
1628
               00009
1629
3280           00010         org     0x3280          ; never change the origin!
1630
               00011
1631
               00012 ;; --------------------------------------------------------------------------
1632
               00013 ;; In this table DIN pins have to be assigned to rotary encoders for the
1633
               00014 ;; MIOS_ENC driver
1634
               00015 ;;
1635
               00016 ;; up to 64 entries are provided
1636
               00017 ;;
1637
               00018 ;; The table must be terminated with an ENC_EOT entry. Unused entries should
1638
               00019 ;; be filled with ENC_EOT
1639
               00020 ;;
1640
               00021 ;; ENC_ENTRY provides following parameters
1641
               00022 ;;    o first parameter: number of shift register - 1, 2, 3, ... 16
1642
               00023 ;;    o second parameter: number of pin; since two pins are necessary
1643
               00024 ;;      for each encoder, an even number is expected: 0, 2, 4 or 6
1644
               00025 ;;    o the third parameter contains the encoder mode:
1645
               00026 ;;      either MIOS_ENC_MODE_NON_DETENTED
1646
               00027 ;;          or MIOS_ENC_MODE_DETENTED
1647
               00028 ;;          or MIOS_ENC_MODE_DETENTED2
1648
               00029 ;;          or MIOS_ENC_MODE_DETENTED3
1649
               00030 ;;
1650
               00031 ;; Configuration Examples:
1651
               00032 ;;    ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 0 and 1 of SR 1
1652
               00033 ;;    ENC_ENTRY  1,  2,  MIOS_ENC_MODE_DETENTED        ; detented encoder at pin 2 and 3 of SR 1
1653
               00034 ;;    ENC_ENTRY  9,  6,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 6 and 7 of SR 9
1654
               00035 ;; --------------------------------------------------------------------------
1655
               00036
1656
               00037         ;; encoder entry structure
1657
               00038 ENC_ENTRY MACRO sr, din_0, mode
1658
               00039         dw      (mode << 8) | (din_0 + 8*(sr-1))
1659
               00040         ENDM
1660
               00041 ENC_EOT MACRO
1661
               00042         dw      0xffff
1662
               00043         ENDM
1663
               00044
1664
3280 00045 _MIOS_ENC_PIN_TABLE
1665
3280 00046 MIOS_ENC_PIN_TABLE
1666
               00047         ;; encoders 1-16
1667
               00048         ;;        SR  Pin  Mode
1668
               00049         ENC_EOT
1669
3280 FFFF          M         dw      0xffff
1670
               00050         ENC_EOT
1671
3282 FFFF          M         dw      0xffff
1672
               00051         ENC_EOT
1673
3284 FFFF          M         dw      0xffff
1674
               00052         ENC_EOT
1675
3286 FFFF          M         dw      0xffff
1676
               00053         ENC_EOT
1677
3288 FFFF          M         dw      0xffff
1678
               00054         ENC_EOT
1679
328A FFFF          M         dw      0xffff
1680
               00055         ENC_EOT
1681
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 29
1682
 
1683
 
1684
LOC  OBJECT CODE     LINE SOURCE TEXT
1685
  VALUE
1686
 
1687
328C FFFF          M         dw      0xffff
1688
               00056         ENC_EOT
1689
328E FFFF          M         dw      0xffff
1690
               00057         ENC_EOT
1691
3290 FFFF          M         dw      0xffff
1692
               00058         ENC_EOT
1693
3292 FFFF          M         dw      0xffff
1694
               00059         ENC_EOT
1695
3294 FFFF          M         dw      0xffff
1696
               00060         ENC_EOT
1697
3296 FFFF          M         dw      0xffff
1698
               00061         ENC_EOT
1699
3298 FFFF          M         dw      0xffff
1700
               00062         ENC_EOT
1701
329A FFFF          M         dw      0xffff
1702
               00063         ENC_EOT
1703
329C FFFF          M         dw      0xffff
1704
               00064         ENC_EOT
1705
329E FFFF          M         dw      0xffff
1706
               00065
1707
               00066         ;; encoders 17-32
1708
               00067         ENC_EOT
1709
32A0 FFFF          M         dw      0xffff
1710
               00068         ENC_EOT
1711
32A2 FFFF          M         dw      0xffff
1712
               00069         ENC_EOT
1713
32A4 FFFF          M         dw      0xffff
1714
               00070         ENC_EOT
1715
32A6 FFFF          M         dw      0xffff
1716
               00071         ENC_EOT
1717
32A8 FFFF          M         dw      0xffff
1718
               00072         ENC_EOT
1719
32AA FFFF          M         dw      0xffff
1720
               00073         ENC_EOT
1721
32AC FFFF          M         dw      0xffff
1722
               00074         ENC_EOT
1723
32AE FFFF          M         dw      0xffff
1724
               00075         ENC_EOT
1725
32B0 FFFF          M         dw      0xffff
1726
               00076         ENC_EOT
1727
32B2 FFFF          M         dw      0xffff
1728
               00077         ENC_EOT
1729
32B4 FFFF          M         dw      0xffff
1730
               00078         ENC_EOT
1731
32B6 FFFF          M         dw      0xffff
1732
               00079         ENC_EOT
1733
32B8 FFFF          M         dw      0xffff
1734
               00080         ENC_EOT
1735
32BA FFFF          M         dw      0xffff
1736
               00081         ENC_EOT
1737
32BC FFFF          M         dw      0xffff
1738
               00082         ENC_EOT
1739
32BE FFFF          M         dw      0xffff
1740
               00083
1741
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 30
1742
 
1743
 
1744
LOC  OBJECT CODE     LINE SOURCE TEXT
1745
  VALUE
1746
 
1747
               00084         ;; encoders 33-48
1748
               00085         ENC_EOT
1749
32C0 FFFF          M         dw      0xffff
1750
               00086         ENC_EOT
1751
32C2 FFFF          M         dw      0xffff
1752
               00087         ENC_EOT
1753
32C4 FFFF          M         dw      0xffff
1754
               00088         ENC_EOT
1755
32C6 FFFF          M         dw      0xffff
1756
               00089         ENC_EOT
1757
32C8 FFFF          M         dw      0xffff
1758
               00090         ENC_EOT
1759
32CA FFFF          M         dw      0xffff
1760
               00091         ENC_EOT
1761
32CC FFFF          M         dw      0xffff
1762
               00092         ENC_EOT
1763
32CE FFFF          M         dw      0xffff
1764
               00093         ENC_EOT
1765
32D0 FFFF          M         dw      0xffff
1766
               00094         ENC_EOT
1767
32D2 FFFF          M         dw      0xffff
1768
               00095         ENC_EOT
1769
32D4 FFFF          M         dw      0xffff
1770
               00096         ENC_EOT
1771
32D6 FFFF          M         dw      0xffff
1772
               00097         ENC_EOT
1773
32D8 FFFF          M         dw      0xffff
1774
               00098         ENC_EOT
1775
32DA FFFF          M         dw      0xffff
1776
               00099         ENC_EOT
1777
32DC FFFF          M         dw      0xffff
1778
               00100         ENC_EOT
1779
32DE FFFF          M         dw      0xffff
1780
               00101
1781
               00102         ;; encoders 49-64
1782
               00103         ENC_EOT
1783
32E0 FFFF          M         dw      0xffff
1784
               00104         ENC_EOT
1785
32E2 FFFF          M         dw      0xffff
1786
               00105         ENC_EOT
1787
32E4 FFFF          M         dw      0xffff
1788
               00106         ENC_EOT
1789
32E6 FFFF          M         dw      0xffff
1790
               00107         ENC_EOT
1791
32E8 FFFF          M         dw      0xffff
1792
               00108         ENC_EOT
1793
32EA FFFF          M         dw      0xffff
1794
               00109         ENC_EOT
1795
32EC FFFF          M         dw      0xffff
1796
               00110         ENC_EOT
1797
32EE FFFF          M         dw      0xffff
1798
               00111         ENC_EOT
1799
32F0 FFFF          M         dw      0xffff
1800
               00112         ENC_EOT
1801
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 31
1802
 
1803
 
1804
LOC  OBJECT CODE     LINE SOURCE TEXT
1805
  VALUE
1806
 
1807
32F2 FFFF          M         dw      0xffff
1808
               00113         ENC_EOT
1809
32F4 FFFF          M         dw      0xffff
1810
               00114         ENC_EOT
1811
32F6 FFFF          M         dw      0xffff
1812
               00115         ENC_EOT
1813
32F8 FFFF          M         dw      0xffff
1814
               00116         ENC_EOT
1815
32FA FFFF          M         dw      0xffff
1816
               00117         ENC_EOT
1817
32FC FFFF          M         dw      0xffff
1818
               00118         ENC_EOT
1819
32FE FFFF          M         dw      0xffff
1820
               00119
1821
               00037
1822
               00038 ;; ---[ Custom LCD driver ]---
1823
               00039 #include <app_lcd.inc>
1824
               00001 ; $Id: app_lcd.inc 69 2008-02-01 00:20:18Z tk $
1825
               00002 ;
1826
               00003 ; MIOS Custom LCD Driver Skeleton
1827
               00004 ;
1828
               00005 ; ==========================================================================
1829
               00006 ;
1830
               00007 ;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
1831
               00008 ;  Licensed for personal non-commercial use only.
1832
               00009 ;  All other rights reserved.
1833
               00010 ;
1834
               00011 ; ==========================================================================
1835
               00012
1836
               00013 ;; --------------------------------------------------------------------------
1837
               00014 ;;  Following system variables are given by MIOS and can be directly
1838
               00015 ;;  accessed by the driver. The addresses are defined in mios.h and
1839
               00016 ;;  should not be changed
1840
               00017 ;;
1841
               00018 ;;  MIOS_GLCD_BUFFER         a 8 byte buffer for data transfers
1842
               00019 ;;  MIOS_LCD_OPTION1         contains the first LCD option given by MIOS_LCD_TypeSet
1843
               00020 ;;  MIOS_LCD_OPTION2         contains the second LCD option given by MIOS_LCD_TypeSet
1844
               00021 ;;  MIOS_LCD_CURSOR_POS      the current cursor pos of characters (GLCD: multiplied by width)
1845
               00022 ;;  MIOS_GLCD_GCURSOR_X      for GLCDs: the current X position of graphical cursor
1846
               00023 ;;  MIOS_GLCD_GCURSOR_Y      for GLCDs: the current Y position of graphical cursor
1847
               00024 ;;  MIOS_GLCD_FONT_WIDTH     for GLCDs: the fontwidth given by MIOS_GLCD_FontInit
1848
               00025 ;;  MIOS_GLCD_FONT_HEIGHT    for GLCDs: the fontheight given by MIOS_GLCD_FontInit
1849
               00026 ;;  MIOS_GLCD_FONT_X0        for GLCDs: the first byte within a char entry
1850
               00027 ;;  MIOS_GLCD_FONT_OFFSET    for GLCDs: the byte offset between the characters
1851
               00028 ;;  MIOS_GLCD_FONT_PTRL      for GLCDs: pointer to the character table, low-byte
1852
               00029 ;;  MIOS_GLCD_FONT_PTRH      for GLCDs: pointer to the character table, high-byte
1853
               00030 ;;  MIOS_LCD_TIMEOUT0        can be used for timeout loops
1854
               00031 ;;  MIOS_LCD_TIMEOUT1        can be used for timeout loops
1855
               00032 ;;  MIOS_GLCD_TMP1           can be used as temporary buffer
1856
               00033 ;;  MIOS_GLCD_TMP2           can be used as temporary buffer
1857
               00034 ;;  MIOS_GLCD_TMP3           can be used as temporary buffer
1858
               00035 ;;  MIOS_GLCD_TMP4           can be used as temporary buffer
1859
               00036 ;;  MIOS_LCD_Y0_OFFSET       Y0 offset of LCD
1860
               00037 ;;  MIOS_LCD_Y1_OFFSET       Y1 offset of LCD
1861
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 32
1862
 
1863
 
1864
LOC  OBJECT CODE     LINE SOURCE TEXT
1865
  VALUE
1866
 
1867
               00038 ;;  MIOS_LCD_Y2_OFFSET       Y2 offset of LCD
1868
               00039 ;;  MIOS_LCD_Y3_OFFSET       Y3 offset of LCD
1869
               00040 ;;  MIOS_LCD_CURSOR_POS_REAL unmapped cursor position which has been set with MIOS_LCD_CursorSet
1870
               00041 ;;
1871
               00042 ;;  Note: the addresses are located in an upper bank and therefore have to
1872
               00043 ;;        be accessed with the BANKED flag. Also the BSR has to be justified
1873
               00044 ;;        before using the registers
1874
               00045 ;;  Example:
1875
               00046 ;;      SET_BSR MIOS_LCD_OPTION1        ; sets BSR to the bank where MIOS_LCD_*
1876
               00047 ;;                                      ; has been located. You don't need to
1877
               00048 ;;                                      ; change the BSR for the other LCD registers
1878
               00049 ;;      movf    MIOS_LCD_OPTION1, W, BANKED     ; get LCD option #1
1879
               00050 ;;
1880
               00051 ;;  Important: to allow a proper interaction with MIOS applications, you are
1881
               00052 ;;  only allowed to modify MIOS_PARAMETER[123], the mutliplication registers
1882
               00053 ;;  and FSR1. You are not allowed to change TMP[1-5] or FSR0
1883
               00054 ;;  if you need some temporary registers, use the given addresses above or
1884
               00055 ;;  locate them to addresses which are not used by the application
1885
               00056 ;; --------------------------------------------------------------------------
1886
               00057
1887
               00058 ;; --------------------------------------------------------------------------
1888
               00059 ;;  This function is called by MIOS when the custom LCD should be initialized
1889
               00060 ;;  In:  MIOS_LCD_OPTION1 - contains the first LCD option given by MIOS_LCD_TypeSet
1890
               00061 ;;       MIOS_LCD_OPTION2 - contains the second LCD option given by MIOS_LCD_TypeSet
1891
               00062 ;;  Out: -
1892
               00063 ;; --------------------------------------------------------------------------
1893
3300 00064 USER_LCD_Init
1894
3300 0012      00065         return
1895
               00066
1896
               00067 ;; --------------------------------------------------------------------------
1897
               00068 ;;  This function is called by MIOS when the custom LCD should be cleared
1898
               00069 ;;  In:  MIOS_LCD_OPTION1 - contains the first LCD option given by MIOS_LCD_TypeSet
1899
               00070 ;;       MIOS_LCD_OPTION2 - contains the second LCD option given by MIOS_LCD_TypeSet
1900
               00071 ;;  Out: -
1901
               00072 ;; --------------------------------------------------------------------------
1902
3302 00073 USER_LCD_Clear
1903
3302 0012      00074         return
1904
               00075
1905
               00076 ;; --------------------------------------------------------------------------
1906
               00077 ;;  This function is called by MIOS when the cursor should be changed
1907
               00078 ;;  In:  MIOS_LCD_OPTION1 - contains the first LCD option given by MIOS_LCD_TypeSet
1908
               00079 ;;       MIOS_LCD_OPTION2 - contains the second LCD option given by MIOS_LCD_TypeSet
1909
               00080 ;;       MIOS_GLCD_CURSOR_X - horizontal cursor position (for GLCDs)
1910
               00081 ;;       MIOS_GLCD_CURSOR_X - vertical cursor position   (for GLCDs)
1911
               00082 ;;       MIOS_LCD_CURSOR    - character cursor position  (for CLCDs)
1912
               00083 ;;  Out: -
1913
               00084 ;; --------------------------------------------------------------------------
1914
3304 00085 USER_LCD_CursorSet
1915
3304 0012      00086         return
1916
               00087
1917
               00088 ;; --------------------------------------------------------------------------
1918
               00089 ;;  This function is called by MIOS when a character should be print
1919
               00090 ;;  In:  WREG - character
1920
               00091 ;;       all other MIOS_*LCD_* registers
1921
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 33
1922
 
1923
 
1924
LOC  OBJECT CODE     LINE SOURCE TEXT
1925
  VALUE
1926
 
1927
               00092 ;;  Out: GLCDs should justify the X/Y cursor position
1928
               00093 ;; --------------------------------------------------------------------------
1929
3306 00094 USER_LCD_PrintChar
1930
3306 0012      00095         return
1931
               00096
1932
               00097 ;; --------------------------------------------------------------------------
1933
               00098 ;;  FUNCTION: USER_LCD_Data
1934
               00099 ;;  DESCRIPTION: sends a data value to the LCD display.<BR>
1935
               00100 ;;  On CLCDs: branch directly to USER_LCD_PrintChar<BR>
1936
               00101 ;;  On GLCDs: ignore this function!
1937
               00102 ;;  IN:  data which should be sent
1938
               00103 ;;  OUT: -
1939
               00104 ;;  NOTE: see the custom_lcd_example for further details
1940
               00105 ;; --------------------------------------------------------------------------
1941
3308 00106 USER_LCD_Data
1942
3308 0012      00107         return
1943
               00108
1944
               00109 ;; --------------------------------------------------------------------------
1945
               00110 ;;  FUNCTION: USER_LCD_Cmd
1946
               00111 ;;  DESCRIPTION: sends a command to the LCD display.<BR>
1947
               00112 ;;  On CLCDs: use this function to decode the HD44780 commands if required<BR>
1948
               00113 ;;  On GLCDs: ignore this function!
1949
               00114 ;;  IN:  command which should be sent
1950
               00115 ;;  OUT: -
1951
               00116 ;;  NOTE: see the custom_lcd_example for further details
1952
               00117 ;; --------------------------------------------------------------------------
1953
330A 00118 USER_LCD_Cmd
1954
330A 0012      00119         return
1955
               00120
1956
               00121 ;; --------------------------------------------------------------------------
1957
               00122 ;;  FUNCTION: USER_LCD_SpecialCharInit
1958
               00123 ;;  DESCRIPTION: see MIOS_CLCD_SpecialCharInit
1959
               00124 ;;  IN:  number of special character (0-7) in WREG
1960
               00125 ;;       pointer to special char pattern in TBLPTR (consists of 8
1961
               00126 ;;          entries for every character-line)
1962
               00127 ;;  OUT: TBLPTR has to be set to next table entry (TBLPTR+=8)
1963
               00128 ;;  NOTE: see the custom_lcd_example for further details
1964
               00129 ;; --------------------------------------------------------------------------
1965
330C 00130 USER_LCD_SpecialCharInit
1966
330C 0012      00131         return
1967
               00040
1968
               00041 ;; ---[ Debug Message Module ]---
1969
               00042 #include <debug_msg.inc>
1970
               00001 ; $Id: debug_msg.inc 626 2009-01-19 21:36:33Z tk $
1971
               00002 ;
1972
               00003 ;  Help functions to send debug messages to MIOS Terminal via SysEx
1973
               00004 ;
1974
               00005 ; ==========================================================================
1975
               00006 ;
1976
               00007 ;  Copyright 2009 Thorsten Klose (tk@midibox.org)
1977
               00008 ;  Licensed for personal non-commercial use only.
1978
               00009 ;  All other rights reserved.
1979
               00010 ;
1980
               00011 ; ==========================================================================
1981
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 34
1982
 
1983
 
1984
LOC  OBJECT CODE     LINE SOURCE TEXT
1985
  VALUE
1986
 
1987
               00012
1988
               00013
1989
               00014 ;; --------------------------------------------------------------------------
1990
               00015 ;;  FUNCTION: DEBUG_MSG_SendHeader
1991
               00016 ;;  DESCRIPTION: sends the SysEx header
1992
               00017 ;;  IN:   -
1993
               00018 ;;  OUT:  -
1994
               00019 ;;  USES: BSR, FSR1
1995
               00020 ;; --------------------------------------------------------------------------
1996
330E 00021 _DEBUG_MSG_SendHeader   ; for C
1997
330E 00022 DEBUG_MSG_SendHeader
1998
               00023         ;; this SysEx command will be parsed by MIOS Terminal to print out text messages
1999
330E 0EF0      00024         movlw   0xf0
2000
3310 EC24 F016 00025         call    MIOS_MIDI_TxBufferPut
2001
3314 0E00      00026         movlw   0x00
2002
3316 EC24 F016 00027         call    MIOS_MIDI_TxBufferPut
2003
331A 0E00      00028         movlw   0x00
2004
331C EC24 F016 00029         call    MIOS_MIDI_TxBufferPut
2005
3320 0E7E      00030         movlw   0x7e
2006
3322 EC24 F016 00031         call    MIOS_MIDI_TxBufferPut
2007
3326 0E32      00032         movlw   0x32
2008
3328 EC24 F016 00033         call    MIOS_MIDI_TxBufferPut
2009
332C EC04 F016 00034         call    MIOS_MIDI_DeviceIDGet
2010
3330 EC24 F016 00035         call    MIOS_MIDI_TxBufferPut
2011
3334 0E0D      00036         movlw   0x0d
2012
3336 EC24 F016 00037         call    MIOS_MIDI_TxBufferPut
2013
333A 0E40      00038         movlw   0x40
2014
333C EC24 F016 00039         call    MIOS_MIDI_TxBufferPut
2015
               00040
2016
               00041         ;; following characters will be print on terminal
2017
3340 0012      00042         return
2018
               00043
2019
               00044
2020
               00045 ;; --------------------------------------------------------------------------
2021
               00046 ;;  FUNCTION: DEBUG_MSG_SendFooter
2022
               00047 ;;  DESCRIPTION: sends the SysEx footer
2023
               00048 ;;  IN:   -
2024
               00049 ;;  OUT:  -
2025
               00050 ;;  USES: BSR, FSR1
2026
               00051 ;; --------------------------------------------------------------------------
2027
3342 00052 _DEBUG_MSG_SendFooter   ; for C
2028
3342 00053 DEBUG_MSG_SendFooter
2029
               00054         ;; finish SysEx stream - MIOS Terminal will print the received characters now
2030
3342 0EF7      00055         movlw   0xf7
2031
3344 EC24 F016 00056         call    MIOS_MIDI_TxBufferPut
2032
3348 0012      00057         return
2033
               00058
2034
               00059
2035
               00060 ;; --------------------------------------------------------------------------
2036
               00061 ;;  FUNCTION: DEBUG_MSG_SendChar
2037
               00062 ;;  DESCRIPTION: sends a single character
2038
               00063 ;;  IN:   Character in WREG
2039
               00064 ;;  OUT:  -
2040
               00065 ;;  USES: BSR, FSR1
2041
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 35
2042
 
2043
 
2044
LOC  OBJECT CODE     LINE SOURCE TEXT
2045
  VALUE
2046
 
2047
               00066 ;; --------------------------------------------------------------------------
2048
334A 00067 _DEBUG_MSG_SendChar     ; for C
2049
334A 00068 DEBUG_MSG_SendChar
2050
334A 0B7F      00069         andlw   0x7f    ; ensure that MSB is cleared, otherwise we would violate the MIDI protocol
2051
334C EF24 F016 00070         goto    MIOS_MIDI_TxBufferPut
2052
               00071
2053
               00072
2054
               00073 ;; --------------------------------------------------------------------------
2055
               00074 ;;  FUNCTION: DEBUG_MSG_SendASMString
2056
               00075 ;;  DESCRIPTION: used in assembly programs to send a string
2057
               00076 ;;               see example in README.txt for usage
2058
               00077 ;;  IN:   zero-terminated string after call instruction
2059
               00078 ;;  OUT:  -
2060
               00079 ;;  USES: BSR, FSR1, TBLPTR[LHU], TABLAT
2061
               00080 ;; --------------------------------------------------------------------------
2062
3350 00081 DEBUG_MSG_SendASMString
2063
               00082         ;; we expect that the zero-terminated string is located behind the "call" instruction
2064
               00083         ;; transfer pointer to TBLPTR[LHU]
2065
3350 CFFD FFF6 00084         movff   TOSL, TBLPTRL
2066
3354 CFFE FFF7 00085         movff   TOSH, TBLPTRH
2067
3358 CFFF FFF8 00086         movff   TOSU, TBLPTRU
2068
               00087
2069
               00088         ;; print until zero is read
2070
335C 00089 DEBUG_MSG_SendASMStringLoop
2071
335C 0009      00090         tblrd*+
2072
335E 50F5      00091         movf    TABLAT, W
2073
3360 E002      00092         bz      DEBUG_MSG_SendASMStringLoop_End
2074
3362 DFF3      00093         rcall   DEBUG_MSG_SendChar
2075
               00094         rgoto   DEBUG_MSG_SendASMStringLoop
2076
3364 D7FB          M         bra     label
2077
3366 00095 DEBUG_MSG_SendASMStringLoop_End
2078
               00096
2079
               00097         ;; return pointer now in TBLPTR[LH]
2080
               00098
2081
               00099         ;; ensure that it is aligned to next instruction
2082
3366 50F6      00100         movf    TBLPTRL, W
2083
3368 0B01      00101         andlw   0x01
2084
336A E005      00102         bz      DEBUG_MSG_SendASMString_NoIAlign
2085
336C 2AF6      00103         incf    TBLPTRL, F
2086
336E B4D8      00104         skpnz
2087
3370 2AF7      00105         incf    TBLPTRH, F
2088
3372 B4D8      00106         skpnz
2089
3374 2AF8      00107         incf    TBLPTRU, F
2090
3376 00108 DEBUG_MSG_SendASMString_NoIAlign
2091
               00109
2092
               00110         IRQ_DISABLE
2093
3376 9EF2          M         bcf     INTCON, GIE
2094
3378 50F6      00111         movf    TBLPTRL, W
2095
337A 6EFD      00112         movwf   TOSL
2096
337C 50F7      00113         movf    TBLPTRH, W
2097
337E 6EFE      00114         movwf   TOSH
2098
3380 50F8      00115         movf    TBLPTRU, W
2099
3382 6EFF      00116         movwf   TOSU
2100
               00117         IRQ_ENABLE
2101
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 36
2102
 
2103
 
2104
LOC  OBJECT CODE     LINE SOURCE TEXT
2105
  VALUE
2106
 
2107
3384 8EF2          M         bsf     INTCON, GIE
2108
3386 0012      00118         return
2109
               00119
2110
               00120
2111
               00121 ;; --------------------------------------------------------------------------
2112
               00122 ;;  FUNCTION: DEBUG_MSG_SendBCD1
2113
               00123 ;;  DESCRIPTION: sends a 8-bit value as BCD (decimal value) -- one digit only
2114
               00124 ;;  IN:   Value in WREG
2115
               00125 ;;  OUT:  -
2116
               00126 ;;  USES: BSR, FSR1
2117
               00127 ;; --------------------------------------------------------------------------
2118
               00128 ;; --------------------------------------------------------------------------
2119
               00129 ;;  FUNCTION: DEBUG_MSG_SendHex1
2120
               00130 ;;  DESCRIPTION: sends a 4-bit hex value
2121
               00131 ;;  IN:   Value in WREG
2122
               00132 ;;  OUT:  -
2123
               00133 ;;  USES: BSR, FSR1
2124
               00134 ;; --------------------------------------------------------------------------
2125
3388 00135 _DEBUG_MSG_SendBCD1     ; for C
2126
3388 00136 DEBUG_MSG_SendBCD1
2127
3388 00137 _DEBUG_MSG_SendHex1     ; for C
2128
3388 00138 DEBUG_MSG_SendHex1
2129
3388 0B0F      00139         andlw   0x0f
2130
338A 0FF6      00140         addlw   -0x0a
2131
338C B0D8      00141         skpnc
2132
338E 0F07      00142         addlw   0x07
2133
3390 0F3A      00143         addlw   0x3a
2134
               00144         rgoto   DEBUG_MSG_SendChar
2135
3392 D7DB          M         bra     label
2136
               00145
2137
               00146
2138
               00147 ;; --------------------------------------------------------------------------
2139
               00148 ;;  FUNCTION: DEBUG_MSG_SendHex2
2140
               00149 ;;  DESCRIPTION: sends a 8-bit hex value
2141
               00150 ;;  IN:   Value in WREG
2142
               00151 ;;  OUT:  -
2143
               00152 ;;  USES: BSR, FSR1, PRODL (!)
2144
               00153 ;; --------------------------------------------------------------------------
2145
3394 00154 _DEBUG_MSG_SendHex2     ; for C
2146
3394 00155 DEBUG_MSG_SendHex2
2147
3394 6EF3      00156         movwf   PRODL
2148
3396 38F3      00157         swapf   PRODL, W
2149
3398 DFF7      00158         rcall   DEBUG_MSG_SendBCD1
2150
339A 50F3      00159         movf    PRODL, W
2151
               00160         rgoto   DEBUG_MSG_SendBCD1
2152
339C D7F5          M         bra     label
2153
               00161
2154
               00162
2155
               00163 ;; --------------------------------------------------------------------------
2156
               00164 ;;  FUNCTION: DEBUG_MSG_SendBCD2
2157
               00165 ;;  DESCRIPTION: prints a 8-bit value as BCD (decimal value) -- two digits only
2158
               00166 ;;  IN:   Value in WREG
2159
               00167 ;;  OUT:  -
2160
               00168 ;;  USES: BSR, FSR1
2161
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 37
2162
 
2163
 
2164
LOC  OBJECT CODE     LINE SOURCE TEXT
2165
  VALUE
2166
 
2167
               00169 ;; --------------------------------------------------------------------------
2168
339E 00170 _DEBUG_MSG_SendBCD2     ; for C
2169
339E 00171 DEBUG_MSG_SendBCD2
2170
339E 6A03      00172         clrf    MIOS_PARAMETER1
2171
33A0 ECF4 F016 00173         call    MIOS_HLP_Dec2BCD
2172
               00174         rgoto   DEBUG_MSG_SendBCD2_Cont
2173
33A4 D018          M         bra     label
2174
               00175
2175
               00176 ;; --------------------------------------------------------------------------
2176
               00177 ;;  FUNCTION: DEBUG_MSG_SendBCD3
2177
               00178 ;;  DESCRIPTION: prints a 8-bit value as BCD (decimal value) -- all three digits
2178
               00179 ;;  IN:   Value in WREG
2179
               00180 ;;  OUT:  -
2180
               00181 ;;  USES: BSR, FSR1
2181
               00182 ;; --------------------------------------------------------------------------
2182
33A6 00183 _DEBUG_MSG_SendBCD3     ; for C
2183
33A6 00184 DEBUG_MSG_SendBCD3
2184
33A6 6A03      00185         clrf    MIOS_PARAMETER1
2185
33A8 ECF4 F016 00186         call    MIOS_HLP_Dec2BCD
2186
               00187         rgoto   DEBUG_MSG_SendBCD3_Cont
2187
33AC D00F          M         bra     label
2188
               00188
2189
               00189 ;; --------------------------------------------------------------------------
2190
               00190 ;;  FUNCTION: DEBUG_MSG_SendBCD4
2191
               00191 ;;  DESCRIPTION: prints a 16-bit as BCD (decimal value) -- four digits
2192
               00192 ;;  IN:   Low-byte in WREG, High-byte in MIOS_PARAMETER1
2193
               00193 ;;  IN:   Value in WREG
2194
               00194 ;;  OUT:  -
2195
               00195 ;;  USES: BSR, FSR1, MIOS_PARAMETER[123]
2196
               00196 ;; --------------------------------------------------------------------------
2197
               00197 ;_DEBUG_MSG_SendBCD4    ; "unsigned int" parameter converted in debug_msg.asm
2198
33AE 00198 DEBUG_MSG_SendBCD4
2199
33AE ECF4 F016 00199         call    MIOS_HLP_Dec2BCD
2200
               00200         rgoto   DEBUG_MSG_SendBCD4_Cont
2201
33B2 D007          M         bra     label
2202
               00201
2203
               00202 ;; --------------------------------------------------------------------------
2204
               00203 ;;  FUNCTION: DEBUG_MSG_SendBCD5
2205
               00204 ;;  DESCRIPTION: prints a 16-bit as BCD (decimal value) -- five digits
2206
               00205 ;;  IN:   Low-byte in WREG, High-byte in MIOS_PARAMETER1
2207
               00206 ;;  IN:   Value in WREG
2208
               00207 ;;  OUT:  -
2209
               00208 ;;  USES: BSR, FSR1, MIOS_PARAMETER[123]
2210
               00209 ;; --------------------------------------------------------------------------
2211
               00210 ;_DEBUG_MSG_SendBCD5    ; "unsigned int" parameter converted in debug_msg.asm
2212
33B4 00211 DEBUG_MSG_SendBCD5
2213
33B4 ECF4 F016 00212         call    MIOS_HLP_Dec2BCD
2214
               00213
2215
               00214 ;; -----------------
2216
33B8 00215 DEBUG_MSG_SendBCD5_Cont
2217
33B8 5005      00216         movf    MIOS_PARAMETER3, W
2218
33BA 0B0F      00217         andlw   0x0f
2219
33BC E112      00218         bnz     DEBUG_MSG_SendBCD_D5
2220
               00219
2221
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 38
2222
 
2223
 
2224
LOC  OBJECT CODE     LINE SOURCE TEXT
2225
  VALUE
2226
 
2227
33BE 0E20      00220         movlw   ' '
2228
33C0 DFC4      00221         rcall   DEBUG_MSG_SendChar
2229
               00222
2230
33C2 00223 DEBUG_MSG_SendBCD4_Cont
2231
33C2 3804      00224         swapf   MIOS_PARAMETER2, W
2232
33C4 0B0F      00225         andlw   0x0f
2233
33C6 E10E      00226         bnz     DEBUG_MSG_SendBCD_D4
2234
               00227
2235
33C8 0E20      00228         movlw   ' '
2236
33CA DFBF      00229         rcall   DEBUG_MSG_SendChar
2237
               00230
2238
33CC 00231 DEBUG_MSG_SendBCD3_Cont
2239
33CC 5004      00232         movf    MIOS_PARAMETER2, W
2240
33CE 0B0F      00233         andlw   0x0f
2241
33D0 E10B      00234         bnz     DEBUG_MSG_SendBCD_D3
2242
               00235
2243
33D2 0E20      00236         movlw   ' '
2244
33D4 DFBA      00237         rcall   DEBUG_MSG_SendChar
2245
               00238
2246
33D6 00239 DEBUG_MSG_SendBCD2_Cont
2247
33D6 3803      00240         swapf   MIOS_PARAMETER1, W
2248
33D8 0B0F      00241         andlw   0x0f
2249
33DA E108      00242         bnz     DEBUG_MSG_SendBCD_D2
2250
               00243
2251
33DC 0E20      00244         movlw   ' '
2252
33DE DFB5      00245         rcall   DEBUG_MSG_SendChar
2253
               00246
2254
33E0 00247 DEBUG_MSG_SendBCD1_Cont
2255
               00248         rgoto   DEBUG_MSG_SendBCD_D1
2256
33E0 D007          M         bra     label
2257
               00249
2258
               00250
2259
               00251         ;; ---
2260
33E2 00252 DEBUG_MSG_SendBCD_D5
2261
33E2 DFD2      00253         rcall   DEBUG_MSG_SendBCD1
2262
33E4 00254 DEBUG_MSG_SendBCD_D4
2263
33E4 3804      00255         swapf   MIOS_PARAMETER2, W
2264
33E6 DFD0      00256         rcall   DEBUG_MSG_SendBCD1
2265
33E8 00257 DEBUG_MSG_SendBCD_D3
2266
33E8 5004      00258         movf    MIOS_PARAMETER2, W
2267
33EA DFCE      00259         rcall   DEBUG_MSG_SendBCD1
2268
33EC 00260 DEBUG_MSG_SendBCD_D2
2269
33EC 3803      00261         swapf   MIOS_PARAMETER1, W
2270
33EE DFCC      00262         rcall   DEBUG_MSG_SendBCD1
2271
33F0 00263 DEBUG_MSG_SendBCD_D1
2272
33F0 5003      00264         movf    MIOS_PARAMETER1, W
2273
               00265         rgoto   DEBUG_MSG_SendBCD1
2274
33F2 D7CA          M         bra     label
2275
               00266
2276
               00267
2277
               00268 ;; --------------------------------------------------------------------------
2278
               00269 ;;  FUNCTION: DEBUG_MSG_SendCString
2279
               00270 ;;  C_DECLARATION: void DEBUG_MSG_SendCString(char *str)
2280
               00271 ;;  DESCRIPTION: sends a 0-terminated string --- only provided by the C Wrapper!
2281
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 39
2282
 
2283
 
2284
LOC  OBJECT CODE     LINE SOURCE TEXT
2285
  VALUE
2286
 
2287
               00272 ;;  C_IN: Pointer to 0-terminated String in <str>
2288
               00273 ;;  USES: BSR, FSR1
2289
               00274 ;; --------------------------------------------------------------------------
2290
               00043
2291
               00044
2292
               00045 ;; ==========================================================================
2293
               00046 ;;  Include the TIA SR Code
2294
               00047 ;; ==========================================================================
2295
               00048 ;; if != 0, special variations for cartridge version hardware:
2296
33F4 00049 #define DEFAULT_IS_CARTRIDGE  0
2297
               00050 #include "tia_sr.inc"
2298
               00001 ; $Id: tia_sr.inc bdupeyron.tech@gmail.com(Antichambre)
2299
               00002 ;
2300
               00003 ; MIDIbox TIA
2301
               00004 ; TIA Shift Register Service Routine
2302
               00005 ;
2303
               00006 ; ==========================================================================
2304
               00007 ;
2305
               00008 ;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
2306
               00009 ;  Licensed for personal non-commercial use only.
2307
               00010 ;  All other rights reserved.
2308
               00011 ;
2309
               00012 ; ==========================================================================
2310
               00013 ;
2311
               00014 ; define the pins to which the MBHPS_TIA module is connected
2312
               00015 ;
2313
               00016 #if DEFAULT_IS_CARTRIDGE==1
2314
               00017 TIA_SR_LAT_SCLK EQU     LATC
2315
               00018 TIA_SR_PIN_SCLK EQU     0               ; Pin C.0
2316
               00019 TIA_SR_LAT_RCLK EQU     LATC
2317
               00020 TIA_SR_PIN_RCLK EQU     2               ; Pin C.2
2318
               00021 TIA_SR_LAT_OUT  EQU     LATC
2319
               00022 TIA_SR_PIN_OUT  EQU     3               ; Pin C.3
2320
               00023
2321
               00024 TIA_SR_LAT_WR     EQU   LATC
2322
               00025 TIA_SR_PIN_WR     EQU   1       ; Pin C.1
2323
               00026 #else
2324
  00000F8C     00027 TIA_SR_LAT_SCLK EQU     LATD
2325
  00000005     00028 TIA_SR_PIN_SCLK EQU     5               ; Pin D.5
2326
  00000F8B     00029 TIA_SR_LAT_RCLK EQU     LATC
2327
  00000004     00030 TIA_SR_PIN_RCLK EQU     4               ; Pin C.4
2328
  00000F8C     00031 TIA_SR_LAT_OUT  EQU     LATD
2329
  00000006     00032 TIA_SR_PIN_OUT  EQU     6               ; Pin D.6
2330
               00033
2331
  00000F8B     00034 TIA_SR_LAT_WR   EQU     LATC
2332
  00000005     00035 TIA_SR_PIN_WR   EQU     5               ; Pin C.5
2333
               00036 #endif
2334
               00037
2335
               00038 ;; --------------------------------------------------------------------------
2336
               00039 ;;  Initialize the MBHP_TIA module
2337
               00040 ;; --------------------------------------------------------------------------
2338
33F4 00041 TIA_SR_Init
2339
               00042         ;; reset the TIA
2340
33F4 6A03      00043     clrf        MIOS_PARAMETER1
2341
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 40
2342
 
2343
 
2344
LOC  OBJECT CODE     LINE SOURCE TEXT
2345
  VALUE
2346
 
2347
33F6 6A04      00044         clrf    MIOS_PARAMETER2
2348
33F8 D801      00045         rcall   TIA_SR_Write
2349
33FA 0012      00046     return
2350
               00047
2351
               00048 ;; --------------------------------------------------------------------------
2352
               00049 ;;  TIA Write: write to TIA register
2353
               00050 ;; --------------------------------------------------------------------------
2354
33FC 00051 TIA_SR_Write
2355
               00052         ;; TIA signals:
2356
               00053         ;; MIOS_PARAMETER2[4..0]: Data
2357
               00054         ;; MIOS_PARAMETER1[3..0]: Address
2358
               00055         ;; temporary used as counter: MIOS_PARAMETER3
2359
               00056
2360
33FC 9A8C      00057     bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK    ; clear clock
2361
               00058
2362
               00059         ;; superfast transfer with unrolled loop (takes some memory, but guarantees the
2363
               00060         ;; lowest system load :)
2364
               00061 TIA_SR_WRITE_BIT MACRO reg, bit
2365
               00062         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2366
               00063         btfsc   reg, bit
2367
               00064         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2368
               00065         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2369
               00066         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2370
               00067         ENDM
2371
               00068 #if DEFAULT_IS_CARTRIDGE==1
2372
               00069         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 4     ; IC8.O0
2373
               00070         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 3     ; IC8.O1
2374
               00071         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 2     ; IC8.O2
2375
               00072         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 1     ; IC8.O3
2376
               00073         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 0     ; IC8.O4
2377
               00074         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC8.O5
2378
               00075         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC8.O6
2379
               00076         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC8.O7
2380
               00077
2381
               00078         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 3     ; IC7.O0
2382
               00079         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 2     ; IC7.O1
2383
               00080         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 1     ; IC7.O2
2384
               00081         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 0     ; IC7.O3
2385
               00082         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC7.O4
2386
               00083         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC7.O5
2387
               00084         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC7.O6
2388
               00085         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC7.O7
2389
               00086
2390
               00087 #else
2391
               00088         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 0     ; IC2.O0
2392
33FE 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2393
3400 B004          M         btfsc   reg, bit
2394
3402 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2395
3404 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2396
3406 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2397
               00089         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 1     ; IC2.O1
2398
3408 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2399
340A B204          M         btfsc   reg, bit
2400
340C 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2401
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 41
2402
 
2403
 
2404
LOC  OBJECT CODE     LINE SOURCE TEXT
2405
  VALUE
2406
 
2407
340E 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2408
3410 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2409
               00090         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 2     ; IC2.O2
2410
3412 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2411
3414 B404          M         btfsc   reg, bit
2412
3416 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2413
3418 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2414
341A 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2415
               00091         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 3     ; IC2.O3
2416
341C 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2417
341E B604          M         btfsc   reg, bit
2418
3420 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2419
3422 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2420
3424 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2421
               00092         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 4     ; IC2.O4
2422
3426 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2423
3428 B804          M         btfsc   reg, bit
2424
342A 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2425
342C 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2426
342E 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2427
               00093         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC2.O5
2428
3430 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2429
3432 BE04          M         btfsc   reg, bit
2430
3434 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2431
3436 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2432
3438 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2433
               00094         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC2.O6
2434
343A 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2435
343C BE04          M         btfsc   reg, bit
2436
343E 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2437
3440 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2438
3442 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2439
               00095         TIA_SR_WRITE_BIT MIOS_PARAMETER2, 7     ; IC2.O7
2440
3444 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2441
3446 BE04          M         btfsc   reg, bit
2442
3448 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2443
344A 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2444
344C 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2445
               00096
2446
               00097         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 3     ; IC3.O0
2447
344E 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2448
3450 B603          M         btfsc   reg, bit
2449
3452 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2450
3454 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2451
3456 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2452
               00098         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 2     ; IC3.O1
2453
3458 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2454
345A B403          M         btfsc   reg, bit
2455
345C 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2456
345E 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2457
3460 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2458
               00099         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 1     ; IC3.O2
2459
3462 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2460
3464 B203          M         btfsc   reg, bit
2461
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 42
2462
 
2463
 
2464
LOC  OBJECT CODE     LINE SOURCE TEXT
2465
  VALUE
2466
 
2467
3466 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2468
3468 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2469
346A 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2470
               00100         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 0     ; IC3.O3
2471
346C 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2472
346E B003          M         btfsc   reg, bit
2473
3470 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2474
3472 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2475
3474 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2476
               00101         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC3.O4
2477
3476 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2478
3478 BE03          M         btfsc   reg, bit
2479
347A 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2480
347C 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2481
347E 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2482
               00102         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC3.O5
2483
3480 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2484
3482 BE03          M         btfsc   reg, bit
2485
3484 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2486
3486 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2487
3488 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2488
               00103         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC3.O6
2489
348A 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2490
348C BE03          M         btfsc   reg, bit
2491
348E 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2492
3490 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2493
3492 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2494
               00104         TIA_SR_WRITE_BIT MIOS_PARAMETER1, 7     ; IC3.O7
2495
3494 9C8C          M         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT  ; set out pin depending on register content (reg.bit)
2496
3496 BE03          M         btfsc   reg, bit
2497
3498 8C8C          M         bsf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT
2498
349A 8A8C          M         bsf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; rising clock edge
2499
349C 9A8C          M         bcf     TIA_SR_LAT_SCLK, TIA_SR_PIN_SCLK        ; falling clock edge
2500
               00105 #endif
2501
349E 888B      00106     bsf     TIA_SR_LAT_RCLK, TIA_SR_PIN_RCLK    ; latch TIA values
2502
               00107
2503
34A0 9A8B      00108         bcf     TIA_SR_LAT_WR, TIA_SR_PIN_WR    ; enable write (MBHP_TIA: chip select)
2504
34A2 9C8C      00109         bcf     TIA_SR_LAT_OUT, TIA_SR_PIN_OUT      ; clear out pin (standby)
2505
34A4 988B      00110     bcf     TIA_SR_LAT_RCLK, TIA_SR_PIN_RCLK    ; release latch
2506
               00111
2507
34A6 9A8B      00112     bcf TIA_SR_LAT_WR, TIA_SR_PIN_WR    ; enable write (MBHP_TIA: chip select)
2508
34A8 D000      00113         bra     $+2                             ; to ensure compatibility with on-board oscillator,
2509
34AA D000      00114         bra     $+2                             ; wait for 0.840 uS (1 us) (> one TIA clock cycle)
2510
34AC D000      00115         bra     $+2
2511
34AE D000      00116         bra     $+2
2512
34B0 D000      00117         bra     $+2
2513
34B2 8A8B      00118         bsf     TIA_SR_LAT_WR, TIA_SR_PIN_WR    ; disable write (MBHP_TIA: chip select)
2514
               00119
2515
34B4 0012      00120         return
2516
               00121
2517
               00122
2518
               00123
2519
               00124
2520
               00051
2521
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 43
2522
 
2523
 
2524
LOC  OBJECT CODE     LINE SOURCE TEXT
2525
  VALUE
2526
 
2527
               00052
2528
               00053 ;; ==========================================================================
2529
               00054 ;;  All MIOS hooks in one file
2530
               00055 ;; ==========================================================================
2531
               00056
2532
               00057 ;; --------------------------------------------------------------------------
2533
               00058 ;;  This function is called by MIOS after startup to initialize the
2534
               00059 ;;  application
2535
               00060 ;; --------------------------------------------------------------------------
2536
34B6 00061 USER_Init
2537
34B6 ECFA F019 00062         call    TIA_SR_Init
2538
34BA 6A11      00063         clrf    TIA_PIN_NUMBER
2539
34BC EC9C F01B 00064         call    TIA_SetPin
2540
34C0 0012      00065         return
2541
               00066
2542
               00067
2543
               00068 ;; --------------------------------------------------------------------------
2544
               00069 ;;  This function is called by MIOS in the mainloop when nothing else is to do
2545
               00070 ;; --------------------------------------------------------------------------
2546
34C2 00071 USER_Tick
2547
34C2 0012      00072         return
2548
               00073
2549
               00074
2550
               00075 ;; --------------------------------------------------------------------------
2551
               00076 ;;  This function is periodically called by MIOS. The frequency has to be
2552
               00077 ;;  initialized with MIOS_Timer_Set
2553
               00078 ;;  Note that this is an interrupt service routine! Use FSR2 instead of FSR0
2554
               00079 ;;  and IRQ_TMPx instead of TMPx -- and make the routine as fast as possible!
2555
               00080 ;; --------------------------------------------------------------------------
2556
34C4 00081 USER_Timer
2557
34C4 0012      00082         return
2558
               00083
2559
               00084
2560
               00085 ;; --------------------------------------------------------------------------
2561
               00086 ;;  This function is called by MIOS when a debug command has been received
2562
               00087 ;;  via SysEx
2563
               00088 ;;  Input:
2564
               00089 ;;     o WREG, MIOS_PARAMETER1, MIOS_PARAMETER2, MIOS_PARAMETER3 like
2565
               00090 ;;       specified in the debug command
2566
               00091 ;;  Output:
2567
               00092 ;;     o return values WREG, MIOS_PARAMETER1, MIOS_PARAMETER2, MIOS_PARAMETER3
2568
               00093 ;; --------------------------------------------------------------------------
2569
34C6 00094 USER_MPROC_DebugTrigger
2570
34C6 0012      00095         return
2571
               00096
2572
               00097
2573
               00098 ;; --------------------------------------------------------------------------
2574
               00099 ;;  This function is called by MIOS when the display content should be
2575
               00100 ;;  initialized. Thats the case during startup and after a temporary message
2576
               00101 ;;  has been printed on the screen
2577
               00102 ;; --------------------------------------------------------------------------
2578
34C8 00103 USER_DISPLAY_Init
2579
34C8 EC82 F016 00104         call    MIOS_LCD_Clear
2580
               00105
2581
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 44
2582
 
2583
 
2584
LOC  OBJECT CODE     LINE SOURCE TEXT
2585
  VALUE
2586
 
2587
               00106         TABLE_ADDR TEXT_WELCOME_0
2588
34CC 0E78          M         movlw   LOW(addr)               ; store Lo Byte
2589
34CE 6EF6          M         movwf   TBLPTRL
2590
34D0 0E35          M         movlw   HIGH(addr)              ; store Hi Byte
2591
34D2 6EF7          M         movwf   TBLPTRH
2592
                   M #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
2593
34D4 0E00          M         movlw   UPPER(addr)             ; store Upper Byte
2594
34D6 6EF8          M         movwf   TBLPTRU
2595
                   M #endif
2596
34D8 EC9E F016 00107         call    MIOS_LCD_PrintString
2597
34DC EC9E F016 00108         call    MIOS_LCD_PrintString
2598
               00109
2599
34E0 EC87 F019 00110         call    DEBUG_MSG_SendHeader
2600
34E4 0E0A      00111         movlw   '\n'
2601
34E6 ECA5 F019 00112         call    DEBUG_MSG_SendChar
2602
34EA ECA1 F019 00113         call    DEBUG_MSG_SendFooter
2603
               00114
2604
34EE EC87 F019 00115         call    DEBUG_MSG_SendHeader
2605
34F2 ECA8 F019 00116         call    DEBUG_MSG_SendASMString
2606
34F6 424D 4954 00117         db      "MBTIA Interconnection Test\n", 0
2607
     2041 6E49
2608
     6574 6372
2609
     6E6F 656E
2610
     7463 6F69
2611
     206E 6554
2612
     7473 000A
2613
3512 ECA1 F019 00118         call    DEBUG_MSG_SendFooter
2614
               00119
2615
3516 EC87 F019 00120         call    DEBUG_MSG_SendHeader
2616
351A ECA8 F019 00121         call    DEBUG_MSG_SendASMString
2617
351E 3D3D 3D3D 00122         db      "==========================\n", 0
2618
     3D3D 3D3D
2619
     3D3D 3D3D
2620
     3D3D 3D3D
2621
     3D3D 3D3D
2622
     3D3D 3D3D
2623
     3D3D 000A
2624
353A ECA1 F019 00123         call    DEBUG_MSG_SendFooter
2625
               00124
2626
353E EC87 F019 00125         call    DEBUG_MSG_SendHeader
2627
3542 ECA8 F019 00126         call    DEBUG_MSG_SendASMString
2628
3546 6C50 6165 00127         db      "Please play a note on any MIDI channel.\n", 0
2629
     6573 7020
2630
     616C 2079
2631
     2061 6F6E
2632
     6574 6F20
2633
     206E 6E61
2634
     2079 494D
2635
     4944 6320
2636
     6168 6E6E
2637
     6C65 0A2E
2638
     0000
2639
3570 ECA1 F019 00128         call    DEBUG_MSG_SendFooter
2640
               00129
2641
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 45
2642
 
2643
 
2644
LOC  OBJECT CODE     LINE SOURCE TEXT
2645
  VALUE
2646
 
2647
3574 8010      00130         bsf     DISPLAY_UPDATE_REQ, 0
2648
               00131
2649
3576 0012      00132         return
2650
               00133
2651
3578 00134 TEXT_WELCOME_0  STRING 15, 0x00, "Test TIA Module"
2652
3578 0F00 6554     M         da      ((length) << 8) | (pos), str
2653
     7473 5420
2654
     4149 4D20
2655
     646F 6C75
2656
     0065
2657
358A 00135 TEXT_WELCOME_1  STRING  4, 0x40, "Pin:"
2658
358A 0440 6950     M         da      ((length) << 8) | (pos), str
2659
     3A6E
2660
               00136
2661
               00137 ;; --------------------------------------------------------------------------
2662
               00138 ;;  This function is called in the mainloop when no temporary message is shown
2663
               00139 ;;  on screen. Print the realtime messages here
2664
               00140 ;; --------------------------------------------------------------------------
2665
3590 00141 USER_DISPLAY_Tick
2666
               00142         ;; display update requested from USER_SR_Service_Prepare on every LED change
2667
3590 A010      00143         btfss   DISPLAY_UPDATE_REQ, 0
2668
3592 0012      00144         return
2669
3594 9010      00145         bcf     DISPLAY_UPDATE_REQ, 0
2670
               00146
2671
               00147         ;; print pin name
2672
3596 0E45      00148         movlw   0x45
2673
3598 EC88 F016 00149         call    MIOS_LCD_CursorSet
2674
               00150         TABLE_ADDR TIA_PIN_NAMES_TABLE
2675
359C 0EB8          M         movlw   LOW(addr)               ; store Lo Byte
2676
359E 6EF6          M         movwf   TBLPTRL
2677
35A0 0E36          M         movlw   HIGH(addr)              ; store Hi Byte
2678
35A2 6EF7          M         movwf   TBLPTRH
2679
                   M #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
2680
35A4 0E00          M         movlw   UPPER(addr)             ; store Upper Byte
2681
35A6 6EF8          M         movwf   TBLPTRU
2682
                   M #endif
2683
35A8 5011      00151         movf    TIA_PIN_NUMBER, W
2684
35AA 0D04      00152         mullw   TIA_PIN_NAMES_LEN
2685
35AC 50F3      00153         movf    PRODL, W
2686
35AE 26F6      00154         addwf   TBLPTRL, F
2687
35B0 50F4      00155         movf    PRODH, W
2688
35B2 22F7      00156         addwfc  TBLPTRH, F
2689
35B4 0E04      00157         movlw   TIA_PIN_NAMES_LEN
2690
35B6 EC9C F016 00158         call    MIOS_LCD_PrintPreconfString
2691
               00159
2692
               00160
2693
               00161         ;; send message to MIOS Terminal
2694
35BA EC87 F019 00162         call    DEBUG_MSG_SendHeader
2695
               00163
2696
               00164         ;; special message for CS# pin (since it's inverted)
2697
35BE 5011      00165         movf    TIA_PIN_NUMBER, W
2698
35C0 0A09      00166         xorlw   9
2699
35C2 E12A      00167         bnz     USER_DISPLAY_Tick_Normal
2700
35C4 00168 USER_DISPLAY_Tick_W
2701
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 46
2702
 
2703
 
2704
LOC  OBJECT CODE     LINE SOURCE TEXT
2705
  VALUE
2706
 
2707
35C4 ECA8 F019 00169         call    DEBUG_MSG_SendASMString
2708
35C8 6950 206E 00170         db      "Pin 'W#' of TIA chip set to 0V, remaining digital pins set to 0V as well.", 0
2709
     5727 2723
2710
     6F20 2066
2711
     4954 2041
2712
     6863 7069
2713
     7320 7465
2714
     7420 206F
2715
     5630 202C
2716
     6572 616D
2717
     6E69 6E69
2718
     2067 6964
2719
     6967 6174
2720
     206C 6970
2721
     736E 7320
2722
     7465 7420
2723
     206F 5630
2724
     6120 2073
2725
     6577 6C6C
2726
     002E
2727
3612 ECA1 F019 00171         call    DEBUG_MSG_SendFooter
2728
3616 0012      00172         return
2729
               00173
2730
               00174
2731
3618 00175 USER_DISPLAY_Tick_Normal
2732
3618 ECA8 F019 00176         call    DEBUG_MSG_SendASMString
2733
361C 6950 206E 00177         db      "Pin '", 0
2734
     0027
2735
               00178
2736
               00179         TABLE_ADDR TIA_PIN_NAMES_TABLE
2737
3622 0EB8          M         movlw   LOW(addr)               ; store Lo Byte
2738
3624 6EF6          M         movwf   TBLPTRL
2739
3626 0E36          M         movlw   HIGH(addr)              ; store Hi Byte
2740
3628 6EF7          M         movwf   TBLPTRH
2741
                   M #if PIC_DERIVATIVE_CODE_SIZE > 0x10000
2742
362A 0E00          M         movlw   UPPER(addr)             ; store Upper Byte
2743
362C 6EF8          M         movwf   TBLPTRU
2744
                   M #endif
2745
362E 5011      00180         movf    TIA_PIN_NUMBER, W
2746
3630 0D04      00181         mullw   TIA_PIN_NAMES_LEN
2747
3632 50F3      00182         movf    PRODL, W
2748
3634 26F6      00183         addwf   TBLPTRL, F
2749
3636 50F4      00184         movf    PRODH, W
2750
3638 22F7      00185         addwfc  TBLPTRH, F
2751
               00186
2752
               00187         ;; always four chars
2753
363A 0009      00188         tblrd*+
2754
363C 50F5      00189         movf    TABLAT, W
2755
363E ECA5 F019 00190         call    DEBUG_MSG_SendChar
2756
3642 0009      00191         tblrd*+
2757
3644 50F5      00192         movf    TABLAT, W
2758
3646 ECA5 F019 00193         call    DEBUG_MSG_SendChar
2759
364A 0009      00194         tblrd*+
2760
364C 50F5      00195         movf    TABLAT, W
2761
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 47
2762
 
2763
 
2764
LOC  OBJECT CODE     LINE SOURCE TEXT
2765
  VALUE
2766
 
2767
364E ECA5 F019 00196         call    DEBUG_MSG_SendChar
2768
3652 0009      00197         tblrd*+
2769
3654 50F5      00198         movf    TABLAT, W
2770
3656 ECA5 F019 00199         call    DEBUG_MSG_SendChar
2771
               00200
2772
365A ECA8 F019 00201         call    DEBUG_MSG_SendASMString
2773
365E 2027 666F 00202         db      "' of TIA chip set to 5V, remaining digital pins set to 0V (exception: W# set to 5V)", 0
2774
     5420 4149
2775
     6320 6968
2776
     2070 6573
2777
     2074 6F74
2778
     3520 2C56
2779
     7220 6D65
2780
     6961 696E
2781
     676E 6420
2782
     6769 7469
2783
     6C61 7020
2784
     6E69 2073
2785
     6573 2074
2786
     6F74 3020
2787
     2056 6528
2788
     6378 7065
2789
     6974 6E6F
2790
     203A 2357
2791
     7320 7465
2792
     7420 206F
2793
     5635 0029
2794
36B2 ECA1 F019 00203         call    DEBUG_MSG_SendFooter
2795
               00204
2796
36B6 0012      00205         return
2797
               00206
2798
               00207
2799
  00000004     00208 TIA_PIN_NAMES_LEN       EQU     4
2800
  0000000A     00209 TIA_PIN_NAMES_NUM       EQU     10
2801
36B8 00210 TIA_PIN_NAMES_TABLE
2802
36B8 3041 2020 00211         db      "A0  "
2803
36BC 3141 2020 00212         db      "A1  "
2804
36C0 3241 2020 00213         db      "A2  "
2805
36C4 3341 2020 00214         db      "A3  "
2806
36C8 3044 2020 00215         db      "D0  "
2807
36CC 3144 2020 00216         db      "D1  "
2808
36D0 3244 2020 00217         db      "D2  "
2809
36D4 3344 2020 00218         db      "D3  "
2810
36D8 3444 2020 00219         db      "D4  "
2811
36DC 2357      00220         db      "W#"
2812
               00221
2813
               00222
2814
               00223 ;; --------------------------------------------------------------------------
2815
               00224 ;;  This function is called by MIOS when a complete MIDI event has been received
2816
               00225 ;;  Input:
2817
               00226 ;;     o first  MIDI event byte in MIOS_PARAMETER1
2818
               00227 ;;     o second MIDI event byte in MIOS_PARAMETER2
2819
               00228 ;;     o third  MIDI event byte in MIOS_PARAMETER3
2820
               00229 ;; --------------------------------------------------------------------------
2821
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 48
2822
 
2823
 
2824
LOC  OBJECT CODE     LINE SOURCE TEXT
2825
  VALUE
2826
 
2827
36DE 00230 USER_MPROC_NotifyReceivedEvent
2828
               00231         ;; if modulation wheel received: set new pin
2829
36DE 5003      00232         movf    MIOS_PARAMETER1, W
2830
36E0 0BF0      00233         andlw   0xf0
2831
36E2 0AB0      00234         xorlw   0xb0
2832
36E4 E10C      00235         bnz     USER_NotifyReceivedEvent_ChkNote
2833
36E6 5004      00236         movf    MIOS_PARAMETER2, W
2834
36E8 0A01      00237         xorlw   0x01
2835
36EA E109      00238         bnz     USER_NotifyReceivedEvent_ChkNote
2836
               00239
2837
36EC 5005      00240         movf    MIOS_PARAMETER3, W
2838
36EE 6E11      00241         movwf   TIA_PIN_NUMBER
2839
36F0 0E0A      00242         movlw   TIA_PIN_NAMES_NUM
2840
36F2 6011      00243         cpfslt  TIA_PIN_NUMBER, ACCESS
2841
36F4 6A11      00244         clrf TIA_PIN_NUMBER
2842
36F6 8010      00245         bsf     DISPLAY_UPDATE_REQ, 0
2843
               00246
2844
               00247         ;; set the pin depending on selected TIA number
2845
36F8 EC9C F01B 00248         call    TIA_SetPin
2846
               00249         rgoto   USER_NotifyReceivedEvent_End
2847
36FC D012          M         bra     label
2848
               00250
2849
               00251
2850
36FE 00252 USER_NotifyReceivedEvent_ChkNote
2851
               00253         ;; alternative control via MIDI keyboard (Note On Events with velocity > 0)
2852
36FE 5003      00254         movf    MIOS_PARAMETER1, W
2853
3700 0BF0      00255         andlw   0xf0
2854
3702 0A90      00256         xorlw   0x90
2855
3704 E10E      00257         bnz     USER_NotifyReceivedEvent_End
2856
3706 5005      00258         movf    MIOS_PARAMETER3, W
2857
3708 E00C      00259         bz      USER_NotifyReceivedEvent_End
2858
               00260         ;; normalize note to 0..11 range
2859
370A 5004      00261         movf    MIOS_PARAMETER2, W
2860
370C 00262 USER_NotifyReceivedEvent_NoteNor
2861
370C 0FF4      00263         addlw   -12
2862
               00264         BRA_IFCLR WREG, 7, ACCESS, USER_NotifyReceivedEvent_NoteNor
2863
370E AEE8          M         btfss   reg, bit, reg_a
2864
3710 D7FD          M         bra     label
2865
3712 0F0C      00265         addlw   12              ; now in range 0..23
2866
3714 6E11      00266         movwf   TIA_PIN_NUMBER
2867
               00267
2868
3716 0E0A      00268         movlw   TIA_PIN_NAMES_NUM
2869
3718 6011      00269         cpfslt  TIA_PIN_NUMBER, ACCESS
2870
371A 6A11      00270         clrf TIA_PIN_NUMBER
2871
371C 8010      00271         bsf     DISPLAY_UPDATE_REQ, 0
2872
               00272
2873
               00273         ;; set the pin depending on selected TIA number
2874
371E EC9C F01B 00274         call    TIA_SetPin
2875
               00275         ;;      rgoto   USER_NotifyReceivedEvent_End
2876
               00276
2877
3722 00277 USER_NotifyReceivedEvent_End
2878
3722 0012      00278         return
2879
               00279
2880
               00280
2881
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 49
2882
 
2883
 
2884
LOC  OBJECT CODE     LINE SOURCE TEXT
2885
  VALUE
2886
 
2887
               00281 ;; --------------------------------------------------------------------------
2888
               00282 ;;  This function is called by MIOS when a MIDI event has been received
2889
               00283 ;;  which has been specified in the CONFIG_MIDI_IN table
2890
               00284 ;;  Input:
2891
               00285 ;;     o number of entry in WREG
2892
               00286 ;;     o first  MIDI event byte in MIOS_PARAMETER1
2893
               00287 ;;     o second MIDI event byte in MIOS_PARAMETER2
2894
               00288 ;;     o third  MIDI event byte in MIOS_PARAMETER3
2895
               00289 ;; --------------------------------------------------------------------------
2896
3724 00290 USER_MPROC_NotifyFoundEvent
2897
3724 0012      00291         return
2898
               00292
2899
               00293
2900
               00294 ;; --------------------------------------------------------------------------
2901
               00295 ;;  This function is called by MIOS when a MIDI event has not been completly
2902
               00296 ;;  received within 2 seconds
2903
               00297 ;; --------------------------------------------------------------------------
2904
3726 00298 USER_MPROC_NotifyTimeout
2905
3726 0012      00299         return
2906
               00300
2907
               00301
2908
               00302 ;; --------------------------------------------------------------------------
2909
               00303 ;;  This function is called by MIOS when a MIDI byte has been received
2910
               00304 ;;  Input:
2911
               00305 ;;     o received MIDI byte in WREG and MIOS_PARAMETER1
2912
               00306 ;; --------------------------------------------------------------------------
2913
3728 00307 USER_MPROC_NotifyReceivedByte
2914
3728 0012      00308         return
2915
               00309
2916
               00310 ;; --------------------------------------------------------------------------
2917
               00311 ;;  This function is called by MIOS before the transfer of a MIDI byte.
2918
               00312 ;;  It can be used to monitor the Tx activity or to do any other actions
2919
               00313 ;;  (e.g. to switch a pin for multiplexed MIDI Outs) before the byte will
2920
               00314 ;;  be sent.
2921
               00315 ;;  Note that this is an interrupt service routine! Use FSR2 instead of FSR0
2922
               00316 ;;  and IRQ_TMPx instead of TMPx -- and make the routine as fast as possible!
2923
               00317 ;;  Input:
2924
               00318 ;;     o transmitted byte in WREG
2925
               00319 ;; --------------------------------------------------------------------------
2926
372A 00320 USER_MIDI_NotifyTx
2927
372A 0012      00321         return
2928
               00322
2929
               00323 ;; --------------------------------------------------------------------------
2930
               00324 ;;  This function is called by MIOS when a MIDI byte has been received.
2931
               00325 ;;  It can be used to monitor the Rx activity or to do any action - e.g.
2932
               00326 ;;  to react on realtime events like MIDI clock (0xf8) with a minimum latency
2933
               00327 ;;  Note that this is an interrupt service routine! Use FSR2 instead of FSR0
2934
               00328 ;;  and IRQ_TMPx instead of TMPx -- and make the routine as fast as possible!
2935
               00329 ;;  Input:
2936
               00330 ;;     o received byte in WREG
2937
               00331 ;; --------------------------------------------------------------------------
2938
372C 00332 USER_MIDI_NotifyRx
2939
372C 0012      00333         return
2940
               00334
2941
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 50
2942
 
2943
 
2944
LOC  OBJECT CODE     LINE SOURCE TEXT
2945
  VALUE
2946
 
2947
               00335 ;; --------------------------------------------------------------------------
2948
               00336 ;;  This function is called by MIOS when an button has been toggled
2949
               00337 ;;  Input:
2950
               00338 ;;     o Button number in WREG and MIOS_PARAMETER1
2951
               00339 ;;     o Button value MIOS_PARAMETER2:
2952
               00340 ;;       - 1 if button has been released (=5V)
2953
               00341 ;;       - 0 if button has been pressed (=0V)
2954
               00342 ;; --------------------------------------------------------------------------
2955
372E 00343 USER_DIN_NotifyToggle
2956
372E 0012      00344         return
2957
               00345
2958
               00346
2959
               00347 ;; --------------------------------------------------------------------------
2960
               00348 ;;  This function is called by MIOS when an encoder has been moved
2961
               00349 ;;  Input:
2962
               00350 ;;     o Encoder number in WREG and MIOS_PARAMETER1
2963
               00351 ;;     o signed incrementer value in MIOS_PARAMETER2:
2964
               00352 ;;       - is positive when encoder has been turned clockwise
2965
               00353 ;;       - is negative when encoder has been turned counter clockwise
2966
               00354 ;; --------------------------------------------------------------------------
2967
3730 00355 USER_ENC_NotifyChange
2968
3730 0012      00356         return
2969
               00357
2970
               00358
2971
               00359 ;; --------------------------------------------------------------------------
2972
               00360 ;;  This function is called by MIOS before the shift register are loaded
2973
               00361 ;;  Note that this is an interrupt service routine! Use FSR2 instead of FSR0
2974
               00362 ;;  and IRQ_TMPx instead of TMPx -- and make the routine as fast as possible
2975
               00363 ;; --------------------------------------------------------------------------
2976
3732 00364 USER_SR_Service_Prepare
2977
3732 0012      00365         return
2978
               00366
2979
               00367
2980
               00368 ;; --------------------------------------------------------------------------
2981
               00369 ;;  This function is called by MIOS after the shift register have been loaded
2982
               00370 ;;  Note that this is an interrupt service routine! Use FSR2 instead of FSR0
2983
               00371 ;;  and IRQ_TMPx instead of TMPx -- and make the routine as fast as possible
2984
               00372 ;; --------------------------------------------------------------------------
2985
3734 00373 USER_SR_Service_Finish
2986
3734 0012      00374         return
2987
               00375
2988
               00376 ;; --------------------------------------------------------------------------
2989
               00377 ;;  This function is called by MIOS when a pot has been moved
2990
               00378 ;;  Input:
2991
               00379 ;;     o Pot number in WREG and MIOS_PARAMETER1
2992
               00380 ;;     o LSB value in MIOS_PARAMETER2
2993
               00381 ;;     o MSB value in MIOS_PARAMETER3
2994
               00382 ;; --------------------------------------------------------------------------
2995
3736 00383 USER_AIN_NotifyChange
2996
3736 0012      00384         return
2997
               00385
2998
               00386
2999
               00387
3000
               00388 ;; --------------------------------------------------------------------------
3001
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 51
3002
 
3003
 
3004
LOC  OBJECT CODE     LINE SOURCE TEXT
3005
  VALUE
3006
 
3007
               00389 ;;  This function sets a TIA pin depending on TIA_PIN_NUMBER
3008
               00390 ;; --------------------------------------------------------------------------
3009
3738 00391 TIA_SetPin
3010
3738 9A8B      00392         bcf     TIA_SR_LAT_WR, TIA_SR_PIN_WR
3011
373A 6A03      00393         clrf    MIOS_PARAMETER1
3012
373C 6A04      00394         clrf    MIOS_PARAMETER2
3013
               00395
3014
373E 5011      00396         movf    TIA_PIN_NUMBER, W
3015
               00397         JUMPTABLE_2BYTES 15     ; entries
3016
3740 0FF1          M         addlw   -(max_value)    ; ensure that jump index is not greater than (max_value-1)
3017
3742 B0D8          M         skpnc
3018
3744 0EF1          M         movlw   -(max_value)
3019
3746 0F0F          M         addlw   max_value
3020
3748 ECC8 F016     M         call    MIOS_HLP_GetIndex_2bytes
3021
               00398         rgoto   TIA_SetPin0
3022
374C D00F          M         bra     label
3023
               00399         rgoto   TIA_SetPin1
3024
374E D012          M         bra     label
3025
               00400         rgoto   TIA_SetPin2
3026
3750 D015          M         bra     label
3027
               00401         rgoto   TIA_SetPin3
3028
3752 D018          M         bra     label
3029
               00402         rgoto   TIA_SetPin4
3030
3754 D01B          M         bra     label
3031
               00403         rgoto   TIA_SetPin5
3032
3756 D01E          M         bra     label
3033
               00404         rgoto   TIA_SetPin6
3034
3758 D021          M         bra     label
3035
               00405         rgoto   TIA_SetPin7
3036
375A D024          M         bra     label
3037
               00406         rgoto   TIA_SetPin8
3038
375C D027          M         bra     label
3039
               00407         rgoto   TIA_SetPin9
3040
375E D02A          M         bra     label
3041
               00408         rgoto   TIA_SetPinNone
3042
3760 D02B          M         bra     label
3043
               00409         rgoto   TIA_SetPinNone
3044
3762 D02A          M         bra     label
3045
               00410         rgoto   TIA_SetPinNone
3046
3764 D029          M         bra     label
3047
               00411         rgoto   TIA_SetPinNone
3048
3766 D028          M         bra     label
3049
               00412         rgoto   TIA_SetPinNone
3050
3768 D027          M         bra     label
3051
               00413         rgoto   TIA_SetPinNone
3052
376A D026          M         bra     label
3053
               00414
3054
376C 00415 TIA_SetPin0
3055
376C 0E01      00416         movlw   0x01            ; A0
3056
376E 6E03      00417         movwf   MIOS_PARAMETER1
3057
3770 EFFE F019 00418         goto    TIA_SR_Write
3058
               00419
3059
3774 00420 TIA_SetPin1
3060
3774 0E02      00421         movlw   0x02            ; A1
3061
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 52
3062
 
3063
 
3064
LOC  OBJECT CODE     LINE SOURCE TEXT
3065
  VALUE
3066
 
3067
3776 6E03      00422         movwf   MIOS_PARAMETER1
3068
3778 EFFE F019 00423         goto    TIA_SR_Write
3069
               00424
3070
377C 00425 TIA_SetPin2
3071
377C 0E04      00426         movlw   0x04            ; A2
3072
377E 6E03      00427         movwf   MIOS_PARAMETER1
3073
3780 EFFE F019 00428         goto    TIA_SR_Write
3074
               00429
3075
3784 00430 TIA_SetPin3
3076
3784 0E08      00431         movlw   0x08            ; A3
3077
3786 6E03      00432         movwf   MIOS_PARAMETER1
3078
3788 EFFE F019 00433         goto    TIA_SR_Write
3079
               00434
3080
378C 00435 TIA_SetPin4
3081
378C 0E01      00436         movlw   0x01            ; D0
3082
378E 6E04      00437         movwf   MIOS_PARAMETER2
3083
3790 EFFE F019 00438         goto    TIA_SR_Write
3084
               00439
3085
3794 00440 TIA_SetPin5
3086
3794 0E02      00441         movlw   0x02            ; D1
3087
3796 6E04      00442         movwf   MIOS_PARAMETER2
3088
3798 EFFE F019 00443         goto    TIA_SR_Write
3089
               00444
3090
379C 00445 TIA_SetPin6
3091
379C 0E04      00446         movlw   0x04            ; D2
3092
379E 6E04      00447         movwf   MIOS_PARAMETER2
3093
37A0 EFFE F019 00448         goto    TIA_SR_Write
3094
               00449
3095
37A4 00450 TIA_SetPin7
3096
37A4 0E08      00451         movlw   0x08            ; D3
3097
37A6 6E04      00452         movwf   MIOS_PARAMETER2
3098
37A8 EFFE F019 00453         goto    TIA_SR_Write
3099
               00454
3100
37AC 00455 TIA_SetPin8
3101
37AC 0E10      00456         movlw   0x10            ; D4
3102
37AE 6E04      00457         movwf   MIOS_PARAMETER2
3103
37B0 EFFE F019 00458         goto    TIA_SR_Write
3104
               00459
3105
37B4 00460 TIA_SetPin9
3106
37B4 9A8B      00461         bcf     TIA_SR_LAT_WR, TIA_SR_PIN_WR
3107
37B6 0012      00462         return
3108
               00463
3109
37B8 00464 TIA_SetPinNone
3110
37B8 0012      00465     return
3111
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 53
3112
 
3113
 
3114
SYMBOL TABLE
3115
  LABEL                             VALUE
3116
 
3117
A                                 00000000
3118
ABAT                              00000004
3119
ABDEN                             00000000
3120
ABDOVF                            00000007
3121
ACCESS                            00000000
3122
ACKDT                             00000005
3123
ACKEN                             00000004
3124
ACKSTAT                           00000006
3125
ACQT0                             00000003
3126
ACQT1                             00000004
3127
ACQT2                             00000005
3128
ADCON0                            00000FC2
3129
ADCON1                            00000FC1
3130
ADCON2                            00000FC0
3131
ADCS0                             00000000
3132
ADCS1                             00000001
3133
ADCS2                             00000002
3134
ADDEN                             00000003
3135
ADEN                              00000003
3136
ADFM                              00000007
3137
ADIE                              00000006
3138
ADIF                              00000006
3139
ADIP                              00000006
3140
ADON                              00000000
3141
ADRES                             00000FC3
3142
ADRESH                            00000FC4
3143
ADRESL                            00000FC3
3144
AN0                               00000000
3145
AN1                               00000001
3146
AN10                              00000000
3147
AN2                               00000002
3148
AN3                               00000003
3149
AN4                               00000005
3150
AN5                               00000000
3151
AN6                               00000001
3152
AN7                               00000002
3153
AN8                               00000001
3154
AN9                               00000004
3155
B0CON                             00000E20
3156
B0D0                              00000E26
3157
B0D00                             00000000
3158
B0D01                             00000001
3159
B0D02                             00000002
3160
B0D03                             00000003
3161
B0D04                             00000004
3162
B0D05                             00000005
3163
B0D06                             00000006
3164
B0D07                             00000007
3165
B0D1                              00000E27
3166
B0D10                             00000000
3167
B0D11                             00000001
3168
B0D12                             00000002
3169
B0D13                             00000003
3170
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 54
3171
 
3172
 
3173
LOC  OBJECT CODE     LINE SOURCE TEXT
3174
  VALUE
3175
 
3176
B0D14                             00000004
3177
B0D15                             00000005
3178
B0D16                             00000006
3179
B0D17                             00000007
3180
B0D2                              00000E28
3181
B0D20                             00000000
3182
B0D21                             00000001
3183
B0D22                             00000002
3184
B0D23                             00000003
3185
B0D24                             00000004
3186
B0D25                             00000005
3187
B0D26                             00000006
3188
B0D27                             00000007
3189
B0D3                              00000E29
3190
B0D30                             00000000
3191
B0D31                             00000001
3192
B0D32                             00000002
3193
B0D33                             00000003
3194
B0D34                             00000004
3195
B0D35                             00000005
3196
B0D36                             00000006
3197
B0D37                             00000007
3198
B0D4                              00000E2A
3199
B0D40                             00000000
3200
B0D41                             00000001
3201
B0D42                             00000002
3202
B0D43                             00000003
3203
B0D44                             00000004
3204
B0D45                             00000005
3205
B0D46                             00000006
3206
B0D47                             00000007
3207
B0D5                              00000E2B
3208
B0D50                             00000000
3209
B0D51                             00000001
3210
B0D52                             00000002
3211
B0D53                             00000003
3212
B0D54                             00000004
3213
B0D55                             00000005
3214
B0D56                             00000006
3215
B0D57                             00000007
3216
B0D6                              00000E2C
3217
B0D60                             00000000
3218
B0D61                             00000001
3219
B0D62                             00000002
3220
B0D63                             00000003
3221
B0D64                             00000004
3222
B0D65                             00000005
3223
B0D66                             00000006
3224
B0D67                             00000007
3225
B0D7                              00000E2D
3226
B0D70                             00000000
3227
B0D71                             00000001
3228
B0D72                             00000002
3229
B0D73                             00000003
3230
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 55
3231
 
3232
 
3233
LOC  OBJECT CODE     LINE SOURCE TEXT
3234
  VALUE
3235
 
3236
B0D74                             00000004
3237
B0D75                             00000005
3238
B0D76                             00000006
3239
B0D77                             00000007
3240
B0DLC                             00000E25
3241
B0EIDH                            00000E23
3242
B0EIDL                            00000E24
3243
B0IE                              00000002
3244
B0SIDH                            00000E21
3245
B0SIDL                            00000E22
3246
B0TXEN                            00000002
3247
B1CON                             00000E30
3248
B1D0                              00000E36
3249
B1D00                             00000000
3250
B1D01                             00000001
3251
B1D02                             00000002
3252
B1D03                             00000003
3253
B1D04                             00000004
3254
B1D05                             00000005
3255
B1D06                             00000006
3256
B1D07                             00000007
3257
B1D1                              00000E37
3258
B1D10                             00000000
3259
B1D11                             00000001
3260
B1D12                             00000002
3261
B1D13                             00000003
3262
B1D14                             00000004
3263
B1D15                             00000005
3264
B1D16                             00000006
3265
B1D17                             00000007
3266
B1D2                              00000E38
3267
B1D20                             00000000
3268
B1D21                             00000001
3269
B1D22                             00000002
3270
B1D23                             00000003
3271
B1D24                             00000004
3272
B1D25                             00000005
3273
B1D26                             00000006
3274
B1D27                             00000007
3275
B1D3                              00000E39
3276
B1D30                             00000000
3277
B1D31                             00000001
3278
B1D32                             00000002
3279
B1D33                             00000003
3280
B1D34                             00000004
3281
B1D35                             00000005
3282
B1D36                             00000006
3283
B1D37                             00000007
3284
B1D4                              00000E3A
3285
B1D40                             00000000
3286
B1D41                             00000001
3287
B1D42                             00000002
3288
B1D43                             00000003
3289
B1D44                             00000004
3290
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 56
3291
 
3292
 
3293
LOC  OBJECT CODE     LINE SOURCE TEXT
3294
  VALUE
3295
 
3296
B1D45                             00000005
3297
B1D46                             00000006
3298
B1D47                             00000007
3299
B1D5                              00000E3B
3300
B1D50                             00000000
3301
B1D51                             00000001
3302
B1D52                             00000002
3303
B1D53                             00000003
3304
B1D54                             00000004
3305
B1D55                             00000005
3306
B1D56                             00000006
3307
B1D57                             00000007
3308
B1D6                              00000E3C
3309
B1D60                             00000000
3310
B1D61                             00000001
3311
B1D62                             00000002
3312
B1D63                             00000003
3313
B1D64                             00000004
3314
B1D65                             00000005
3315
B1D66                             00000006
3316
B1D67                             00000007
3317
B1D7                              00000E3D
3318
B1D70                             00000000
3319
B1D71                             00000001
3320
B1D72                             00000002
3321
B1D73                             00000003
3322
B1D74                             00000004
3323
B1D75                             00000005
3324
B1D76                             00000006
3325
B1D77                             00000007
3326
B1DLC                             00000E35
3327
B1EIDH                            00000E33
3328
B1EIDL                            00000E34
3329
B1IE                              00000003
3330
B1SIDH                            00000E31
3331
B1SIDL                            00000E32
3332
B1TXEN                            00000003
3333
B2CON                             00000E40
3334
B2D0                              00000E46
3335
B2D00                             00000000
3336
B2D01                             00000001
3337
B2D02                             00000002
3338
B2D03                             00000003
3339
B2D04                             00000004
3340
B2D05                             00000005
3341
B2D06                             00000006
3342
B2D07                             00000007
3343
B2D1                              00000E47
3344
B2D10                             00000000
3345
B2D11                             00000001
3346
B2D12                             00000002
3347
B2D13                             00000003
3348
B2D14                             00000004
3349
B2D15                             00000005
3350
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 57
3351
 
3352
 
3353
LOC  OBJECT CODE     LINE SOURCE TEXT
3354
  VALUE
3355
 
3356
B2D16                             00000006
3357
B2D17                             00000007
3358
B2D2                              00000E48
3359
B2D20                             00000000
3360
B2D21                             00000001
3361
B2D22                             00000002
3362
B2D23                             00000003
3363
B2D24                             00000004
3364
B2D25                             00000005
3365
B2D26                             00000006
3366
B2D27                             00000007
3367
B2D3                              00000E49
3368
B2D30                             00000000
3369
B2D31                             00000001
3370
B2D32                             00000002
3371
B2D33                             00000003
3372
B2D34                             00000004
3373
B2D35                             00000005
3374
B2D36                             00000006
3375
B2D37                             00000007
3376
B2D4                              00000E4A
3377
B2D40                             00000000
3378
B2D41                             00000001
3379
B2D42                             00000002
3380
B2D43                             00000003
3381
B2D44                             00000004
3382
B2D45                             00000005
3383
B2D46                             00000006
3384
B2D47                             00000007
3385
B2D5                              00000E4B
3386
B2D50                             00000000
3387
B2D51                             00000001
3388
B2D52                             00000002
3389
B2D53                             00000003
3390
B2D54                             00000004
3391
B2D55                             00000005
3392
B2D56                             00000006
3393
B2D57                             00000007
3394
B2D6                              00000E4C
3395
B2D60                             00000000
3396
B2D61                             00000001
3397
B2D62                             00000002
3398
B2D63                             00000003
3399
B2D64                             00000004
3400
B2D65                             00000005
3401
B2D66                             00000006
3402
B2D67                             00000007
3403
B2D7                              00000E4D
3404
B2D70                             00000000
3405
B2D71                             00000001
3406
B2D72                             00000002
3407
B2D73                             00000003
3408
B2D74                             00000004
3409
B2D75                             00000005
3410
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 58
3411
 
3412
 
3413
LOC  OBJECT CODE     LINE SOURCE TEXT
3414
  VALUE
3415
 
3416
B2D76                             00000006
3417
B2D77                             00000007
3418
B2DLC                             00000E45
3419
B2EIDH                            00000E43
3420
B2EIDL                            00000E44
3421
B2IE                              00000004
3422
B2SIDH                            00000E41
3423
B2SIDL                            00000E42
3424
B2TXEN                            00000004
3425
B3CON                             00000E50
3426
B3D0                              00000E56
3427
B3D00                             00000000
3428
B3D01                             00000001
3429
B3D02                             00000002
3430
B3D03                             00000003
3431
B3D04                             00000004
3432
B3D05                             00000005
3433
B3D06                             00000006
3434
B3D07                             00000007
3435
B3D1                              00000E57
3436
B3D10                             00000000
3437
B3D11                             00000001
3438
B3D12                             00000002
3439
B3D13                             00000003
3440
B3D14                             00000004
3441
B3D15                             00000005
3442
B3D16                             00000006
3443
B3D17                             00000007
3444
B3D2                              00000E58
3445
B3D20                             00000000
3446
B3D21                             00000001
3447
B3D22                             00000002
3448
B3D23                             00000003
3449
B3D24                             00000004
3450
B3D25                             00000005
3451
B3D26                             00000006
3452
B3D27                             00000007
3453
B3D3                              00000E59
3454
B3D30                             00000000
3455
B3D31                             00000001
3456
B3D32                             00000002
3457
B3D33                             00000003
3458
B3D34                             00000004
3459
B3D35                             00000005
3460
B3D36                             00000006
3461
B3D37                             00000007
3462
B3D4                              00000E5A
3463
B3D40                             00000000
3464
B3D41                             00000001
3465
B3D42                             00000002
3466
B3D43                             00000003
3467
B3D44                             00000004
3468
B3D45                             00000005
3469
B3D46                             00000006
3470
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 59
3471
 
3472
 
3473
LOC  OBJECT CODE     LINE SOURCE TEXT
3474
  VALUE
3475
 
3476
B3D47                             00000007
3477
B3D5                              00000E5B
3478
B3D50                             00000000
3479
B3D51                             00000001
3480
B3D52                             00000002
3481
B3D53                             00000003
3482
B3D54                             00000004
3483
B3D55                             00000005
3484
B3D56                             00000006
3485
B3D57                             00000007
3486
B3D6                              00000E5C
3487
B3D60                             00000000
3488
B3D61                             00000001
3489
B3D62                             00000002
3490
B3D63                             00000003
3491
B3D64                             00000004
3492
B3D65                             00000005
3493
B3D66                             00000006
3494
B3D67                             00000007
3495
B3D7                              00000E5D
3496
B3D70                             00000000
3497
B3D71                             00000001
3498
B3D72                             00000002
3499
B3D73                             00000003
3500
B3D74                             00000004
3501
B3D75                             00000005
3502
B3D76                             00000006
3503
B3D77                             00000007
3504
B3DLC                             00000E55
3505
B3EIDH                            00000E53
3506
B3EIDL                            00000E54
3507
B3IE                              00000005
3508
B3SIDH                            00000E51
3509
B3SIDL                            00000E52
3510
B3TXEN                            00000005
3511
B46D77                            00000007
3512
B4CON                             00000E60
3513
B4D0                              00000E66
3514
B4D00                             00000000
3515
B4D01                             00000001
3516
B4D02                             00000002
3517
B4D03                             00000003
3518
B4D04                             00000004
3519
B4D05                             00000005
3520
B4D06                             00000006
3521
B4D07                             00000007
3522
B4D1                              00000E67
3523
B4D10                             00000000
3524
B4D11                             00000001
3525
B4D12                             00000002
3526
B4D13                             00000003
3527
B4D14                             00000004
3528
B4D15                             00000005
3529
B4D16                             00000006
3530
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 60
3531
 
3532
 
3533
LOC  OBJECT CODE     LINE SOURCE TEXT
3534
  VALUE
3535
 
3536
B4D17                             00000007
3537
B4D2                              00000E68
3538
B4D20                             00000000
3539
B4D21                             00000001
3540
B4D22                             00000002
3541
B4D23                             00000003
3542
B4D24                             00000004
3543
B4D25                             00000005
3544
B4D26                             00000006
3545
B4D27                             00000007
3546
B4D3                              00000E69
3547
B4D30                             00000000
3548
B4D31                             00000001
3549
B4D32                             00000002
3550
B4D33                             00000003
3551
B4D34                             00000004
3552
B4D35                             00000005
3553
B4D36                             00000006
3554
B4D37                             00000007
3555
B4D4                              00000E6A
3556
B4D40                             00000000
3557
B4D41                             00000001
3558
B4D42                             00000002
3559
B4D43                             00000003
3560
B4D44                             00000004
3561
B4D45                             00000005
3562
B4D46                             00000006
3563
B4D47                             00000007
3564
B4D5                              00000E6B
3565
B4D50                             00000000
3566
B4D51                             00000001
3567
B4D52                             00000002
3568
B4D53                             00000003
3569
B4D54                             00000004
3570
B4D55                             00000005
3571
B4D56                             00000006
3572
B4D57                             00000007
3573
B4D6                              00000E6C
3574
B4D60                             00000000
3575
B4D61                             00000001
3576
B4D62                             00000002
3577
B4D63                             00000003
3578
B4D64                             00000004
3579
B4D65                             00000005
3580
B4D66                             00000006
3581
B4D67                             00000007
3582
B4D7                              00000E6D
3583
B4D70                             00000000
3584
B4D71                             00000001
3585
B4D72                             00000002
3586
B4D73                             00000003
3587
B4D74                             00000004
3588
B4D75                             00000005
3589
B4D76                             00000006
3590
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 61
3591
 
3592
 
3593
LOC  OBJECT CODE     LINE SOURCE TEXT
3594
  VALUE
3595
 
3596
B4D77                             00000007
3597
B4DLC                             00000E65
3598
B4EIDH                            00000E63
3599
B4EIDL                            00000E64
3600
B4IE                              00000006
3601
B4SIDH                            00000E61
3602
B4SIDL                            00000E62
3603
B4TXEN                            00000006
3604
B57D07                            00000007
3605
B57D23                            00000003
3606
B5CON                             00000E70
3607
B5D0                              00000E76
3608
B5D00                             00000000
3609
B5D01                             00000001
3610
B5D02                             00000002
3611
B5D03                             00000003
3612
B5D04                             00000004
3613
B5D05                             00000005
3614
B5D06                             00000006
3615
B5D07                             00000007
3616
B5D1                              00000E77
3617
B5D10                             00000000
3618
B5D11                             00000001
3619
B5D12                             00000002
3620
B5D13                             00000003
3621
B5D14                             00000004
3622
B5D15                             00000005
3623
B5D16                             00000006
3624
B5D17                             00000007
3625
B5D2                              00000E78
3626
B5D20                             00000000
3627
B5D21                             00000001
3628
B5D22                             00000002
3629
B5D23                             00000003
3630
B5D24                             00000004
3631
B5D25                             00000005
3632
B5D26                             00000006
3633
B5D27                             00000007
3634
B5D3                              00000E79
3635
B5D30                             00000000
3636
B5D31                             00000001
3637
B5D32                             00000002
3638
B5D33                             00000003
3639
B5D34                             00000004
3640
B5D35                             00000005
3641
B5D36                             00000006
3642
B5D37                             00000007
3643
B5D4                              00000E7A
3644
B5D40                             00000000
3645
B5D41                             00000001
3646
B5D42                             00000002
3647
B5D43                             00000003
3648
B5D44                             00000004
3649
B5D45                             00000005
3650
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 62
3651
 
3652
 
3653
LOC  OBJECT CODE     LINE SOURCE TEXT
3654
  VALUE
3655
 
3656
B5D46                             00000006
3657
B5D47                             00000007
3658
B5D5                              00000E7B
3659
B5D50                             00000000
3660
B5D51                             00000001
3661
B5D52                             00000002
3662
B5D53                             00000003
3663
B5D54                             00000004
3664
B5D55                             00000005
3665
B5D56                             00000006
3666
B5D57                             00000007
3667
B5D6                              00000E7C
3668
B5D60                             00000000
3669
B5D61                             00000001
3670
B5D62                             00000002
3671
B5D63                             00000003
3672
B5D64                             00000004
3673
B5D65                             00000005
3674
B5D66                             00000006
3675
B5D67                             00000007
3676
B5D7                              00000E7D
3677
B5D70                             00000000
3678
B5D71                             00000001
3679
B5D72                             00000002
3680
B5D73                             00000003
3681
B5D74                             00000004
3682
B5D75                             00000005
3683
B5D76                             00000006
3684
B5D77                             00000007
3685
B5DLC                             00000E75
3686
B5EIDH                            00000E73
3687
B5EIDL                            00000E74
3688
B5IE                              00000007
3689
B5SIDH                            00000E71
3690
B5SIDL                            00000E72
3691
B5TXEN                            00000007
3692
BANKED                            00000001
3693
BAUDCON                           00000FB8
3694
BCLIE                             00000003
3695
BCLIF                             00000003
3696
BCLIP                             00000003
3697
BF                                00000000
3698
BGST                              00000005
3699
BIE0                              00000DFA
3700
BOR                               00000000
3701
BRG16                             00000003
3702
BRGCON1                           00000F70
3703
BRGCON2                           00000F71
3704
BRGCON3                           00000F72
3705
BRGH                              00000002
3706
BRP0                              00000000
3707
BRP1                              00000001
3708
BRP2                              00000002
3709
BRP3                              00000003
3710
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 63
3711
 
3712
 
3713
LOC  OBJECT CODE     LINE SOURCE TEXT
3714
  VALUE
3715
 
3716
BRP4                              00000004
3717
BRP5                              00000005
3718
BSEL0                             00000DF8
3719
BSR                               00000FE0
3720
C                                 00000000
3721
C1INA                             00000001
3722
C1INB                             00000000
3723
C1INV                             00000004
3724
C1OUT                             00000006
3725
C2INA                             00000003
3726
C2INB                             00000002
3727
C2INV                             00000005
3728
C2OUT                             00000007
3729
CANCAP                            00000004
3730
CANCON                            00000F6F
3731
CANCON_RO0                        00000F5F
3732
CANCON_RO1                        00000F4F
3733
CANCON_RO2                        00000F3F
3734
CANCON_RO3                        00000F2F
3735
CANCON_RO4                        00000E7F
3736
CANCON_RO5                        00000E6F
3737
CANCON_RO6                        00000E5F
3738
CANCON_RO7                        00000E4F
3739
CANCON_RO8                        00000E3F
3740
CANCON_RO9                        00000E2F
3741
CANRX                             00000003
3742
CANSTAT                           00000F6E
3743
CANSTAT_RO0                       00000F5E
3744
CANSTAT_RO1                       00000F4E
3745
CANSTAT_RO2                       00000F3E
3746
CANSTAT_RO3                       00000F2E
3747
CANSTAT_RO4                       00000E7E
3748
CANSTAT_RO5                       00000E6E
3749
CANSTAT_RO6                       00000E5E
3750
CANSTAT_RO7                       00000E4E
3751
CANSTAT_RO8                       00000E3E
3752
CANSTAT_RO9                       00000E2E
3753
CANTX                             00000002
3754
CCP1                              00000002
3755
CCP1CON                           00000FBD
3756
CCP1IE                            00000002
3757
CCP1IF                            00000002
3758
CCP1IP                            00000002
3759
CCP1M0                            00000000
3760
CCP1M1                            00000001
3761
CCP1M2                            00000002
3762
CCP1M3                            00000003
3763
CCPR1                             00000FBE
3764
CCPR1H                            00000FBF
3765
CCPR1L                            00000FBE
3766
CFGS                              00000006
3767
CHS0                              00000002
3768
CHS1                              00000003
3769
CHS2                              00000004
3770
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 64
3771
 
3772
 
3773
LOC  OBJECT CODE     LINE SOURCE TEXT
3774
  VALUE
3775
 
3776
CHS3                              00000005
3777
CIOCON                            00000F73
3778
CIS                               00000003
3779
CK                                00000006
3780
CKE                               00000006
3781
CKP                               00000004
3782
CLKI                              00000007
3783
CLKO                              00000006
3784
CM0                               00000000
3785
CM1                               00000001
3786
CM2                               00000002
3787
CMCON                             00000FB4
3788
CMIE                              00000006
3789
CMIF                              00000006
3790
CMIP                              00000006
3791
COMSTAT                           00000F74
3792
CREN                              00000004
3793
CS                                00000002
3794
CSRC                              00000007
3795
CVR0                              00000000
3796
CVR1                              00000001
3797
CVR2                              00000002
3798
CVR3                              00000003
3799
CVRCON                            00000FB5
3800
CVREF_CVRCON                      00000004
3801
CVREF_PORTA                       00000000
3802
CVREN                             00000007
3803
CVROE                             00000006
3804
CVRR                              00000005
3805
CVRSS                             00000004
3806
D                                 00000005
3807
DATA_ADDRESS                      00000005
3808
DC                                00000001
3809
DC1B0                             00000004
3810
DC1B1                             00000005
3811
DEBUG_MSG_SendASMString           00003350
3812
DEBUG_MSG_SendASMStringLoop       0000335C
3813
DEBUG_MSG_SendASMStringLoop_End   00003366
3814
DEBUG_MSG_SendASMString_NoIAlign  00003376
3815
DEBUG_MSG_SendBCD1                00003388
3816
DEBUG_MSG_SendBCD1_Cont           000033E0
3817
DEBUG_MSG_SendBCD2                0000339E
3818
DEBUG_MSG_SendBCD2_Cont           000033D6
3819
DEBUG_MSG_SendBCD3                000033A6
3820
DEBUG_MSG_SendBCD3_Cont           000033CC
3821
DEBUG_MSG_SendBCD4                000033AE
3822
DEBUG_MSG_SendBCD4_Cont           000033C2
3823
DEBUG_MSG_SendBCD5                000033B4
3824
DEBUG_MSG_SendBCD5_Cont           000033B8
3825
DEBUG_MSG_SendBCD_D1              000033F0
3826
DEBUG_MSG_SendBCD_D2              000033EC
3827
DEBUG_MSG_SendBCD_D3              000033E8
3828
DEBUG_MSG_SendBCD_D4              000033E4
3829
DEBUG_MSG_SendBCD_D5              000033E2
3830
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 65
3831
 
3832
 
3833
LOC  OBJECT CODE     LINE SOURCE TEXT
3834
  VALUE
3835
 
3836
DEBUG_MSG_SendChar                0000334A
3837
DEBUG_MSG_SendFooter              00003342
3838
DEBUG_MSG_SendHeader              0000330E
3839
DEBUG_MSG_SendHex1                00003388
3840
DEBUG_MSG_SendHex2                00003394
3841
DFLC0                             00000000
3842
DFLC1                             00000001
3843
DFLC2                             00000002
3844
DFLC3                             00000003
3845
DFLC4                             00000004
3846
DISPLAY_UPDATE_REQ                00000010
3847
DLC0                              00000000
3848
DLC1                              00000001
3849
DLC2                              00000002
3850
DLC3                              00000003
3851
DONE                              00000001
3852
D_A                               00000005
3853
ECANCON                           00000F77
3854
ECCP1                             00000004
3855
ECCP1AS                           00000FB6
3856
ECCP1CON                          00000FBA
3857
ECCP1DEL                          00000FB7
3858
ECCP1IE                           00000000
3859
ECCP1IF                           00000000
3860
ECCP1IP                           00000000
3861
ECCP1M0                           00000000
3862
ECCP1M1                           00000001
3863
ECCP1M2                           00000002
3864
ECCP1M3                           00000003
3865
ECCPAS0                           00000004
3866
ECCPAS1                           00000005
3867
ECCPAS2                           00000006
3868
ECCPASE                           00000007
3869
ECCPR1                            00000FBB
3870
ECCPR1H                           00000FBC
3871
ECCPR1L                           00000FBB
3872
EDC1B0                            00000004
3873
EDC1B1                            00000005
3874
EEADR                             00000FA9
3875
EEADRH                            00000FAA
3876
EECON1                            00000FA6
3877
EECON2                            00000FA7
3878
EEDATA                            00000FA8
3879
EEIE                              00000004
3880
EEIF                              00000004
3881
EEIP                              00000004
3882
EEPGD                             00000007
3883
EICODE0                           00000000
3884
EICODE1                           00000001
3885
EICODE2                           00000002
3886
EICODE3                           00000003
3887
EICODE4                           00000004
3888
EID0                              00000000
3889
EID1                              00000001
3890
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 66
3891
 
3892
 
3893
LOC  OBJECT CODE     LINE SOURCE TEXT
3894
  VALUE
3895
 
3896
EID10                             00000002
3897
EID11                             00000003
3898
EID12                             00000004
3899
EID13                             00000005
3900
EID14                             00000006
3901
EID15                             00000007
3902
EID16                             00000000
3903
EID17                             00000001
3904
EID2                              00000002
3905
EID3                              00000003
3906
EID4                              00000004
3907
EID5                              00000005
3908
EID6                              00000006
3909
EID7                              00000007
3910
EID8                              00000000
3911
EID9                              00000001
3912
ENDRHI                            00000005
3913
EPWM1M0                           00000006
3914
EPWM1M1                           00000007
3915
ERRIE                             00000005
3916
ERRIF                             00000005
3917
ERRIP                             00000005
3918
EWARN                             00000000
3919
EWIN0                             00000000
3920
EWIN1                             00000001
3921
EWIN2                             00000002
3922
EWIN3                             00000003
3923
EWIN4                             00000004
3924
EXID                              00000003
3925
EXIDE                             00000003
3926
EXIDEN                            00000003
3927
F                                 00000005
3928
F0BP_0                            00000000
3929
F0BP_1                            00000001
3930
F0BP_2                            00000002
3931
F0BP_3                            00000003
3932
F10BP_0                           00000000
3933
F10BP_1                           00000001
3934
F10BP_2                           00000002
3935
F10BP_3                           00000003
3936
F11BP_0                           00000004
3937
F11BP_1                           00000005
3938
F11BP_2                           00000006
3939
F11BP_3                           00000007
3940
F12BP_0                           00000000
3941
F12BP_1                           00000001
3942
F12BP_2                           00000002
3943
F12BP_3                           00000003
3944
F13BP_0                           00000004
3945
F13BP_1                           00000005
3946
F13BP_2                           00000006
3947
F13BP_3                           00000007
3948
F14BP_0                           00000000
3949
F14BP_1                           00000001
3950
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 67
3951
 
3952
 
3953
LOC  OBJECT CODE     LINE SOURCE TEXT
3954
  VALUE
3955
 
3956
F14BP_2                           00000002
3957
F14BP_3                           00000003
3958
F15BP_0                           00000004
3959
F15BP_1                           00000005
3960
F15BP_2                           00000006
3961
F15BP_3                           00000007
3962
F1BP_0                            00000004
3963
F1BP_1                            00000005
3964
F1BP_2                            00000006
3965
F1BP_3                            00000007
3966
F2BP_0                            00000000
3967
F2BP_1                            00000001
3968
F2BP_2                            00000002
3969
F2BP_3                            00000003
3970
F3BP_0                            00000004
3971
F3BP_1                            00000005
3972
F3BP_2                            00000006
3973
F3BP_3                            00000007
3974
F4BP_0                            00000000
3975
F4BP_1                            00000001
3976
F4BP_2                            00000002
3977
F4BP_3                            00000003
3978
F5BP_0                            00000004
3979
F5BP_1                            00000005
3980
F5BP_2                            00000006
3981
F5BP_3                            00000007
3982
F6BP_0                            00000000
3983
F6BP_1                            00000001
3984
F6BP_2                            00000002
3985
F6BP_3                            00000003
3986
F7BP_0                            00000004
3987
F7BP_1                            00000005
3988
F7BP_2                            00000006
3989
F7BP_3                            00000007
3990
F8BP_0                            00000000
3991
F8BP_1                            00000001
3992
F8BP_2                            00000002
3993
F8BP_3                            00000003
3994
F9BP_0                            00000004
3995
F9BP_1                            00000005
3996
F9BP_2                            00000006
3997
F9BP_3                            00000007
3998
FAST                              00000001
3999
FERR                              00000002
4000
FIFOEMPTY                         00000007
4001
FIFOMWIE                          00000000
4002
FIFOWM                            00000005
4003
FIFOWMIE                          00000000
4004
FIFOWMIF                          00000000
4005
FIFOWMIP                          00000000
4006
FIL0_0                            00000000
4007
FIL0_1                            00000001
4008
FIL10_0                           00000004
4009
FIL10_1                           00000005
4010
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 68
4011
 
4012
 
4013
LOC  OBJECT CODE     LINE SOURCE TEXT
4014
  VALUE
4015
 
4016
FIL11_0                           00000006
4017
FIL11_1                           00000007
4018
FIL12_0                           00000000
4019
FIL12_1                           00000001
4020
FIL13_0                           00000002
4021
FIL13_1                           00000003
4022
FIL14_0                           00000004
4023
FIL14_1                           00000005
4024
FIL15_0                           00000006
4025
FIL15_1                           00000007
4026
FIL1_0                            00000002
4027
FIL1_1                            00000003
4028
FIL2_0                            00000004
4029
FIL2_1                            00000005
4030
FIL3_0                            00000006
4031
FIL3_1                            00000007
4032
FIL4_0                            00000000
4033
FIL4_1                            00000001
4034
FIL5_0                            00000002
4035
FIL5_1                            00000003
4036
FIL6_0                            00000004
4037
FIL6_1                            00000005
4038
FIL7_0                            00000006
4039
FIL7_1                            00000007
4040
FIL8_0                            00000000
4041
FIL8_1                            00000001
4042
FIL9_0                            00000002
4043
FIL9_1                            00000003
4044
FILHIT0                           00000000
4045
FILHIT1                           00000001
4046
FILHIT2                           00000002
4047
FILHIT3                           00000003
4048
FILHIT4                           00000004
4049
FLC0                              00000000
4050
FLC1                              00000001
4051
FLC2                              00000002
4052
FLC3                              00000003
4053
FLC4                              00000004
4054
FLT0                              00000000
4055
FP0                               00000000
4056
FP1                               00000001
4057
FP2                               00000002
4058
FP3                               00000003
4059
FREE                              00000004
4060
FSR0                              00000000
4061
FSR0H                             00000FEA
4062
FSR0L                             00000FE9
4063
FSR1                              00000001
4064
FSR1H                             00000FE2
4065
FSR1L                             00000FE1
4066
FSR2                              00000002
4067
FSR2H                             00000FDA
4068
FSR2L                             00000FD9
4069
GCEN                              00000007
4070
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 69
4071
 
4072
 
4073
LOC  OBJECT CODE     LINE SOURCE TEXT
4074
  VALUE
4075
 
4076
GIE                               00000007
4077
GIEH                              00000007
4078
GIEL                              00000006
4079
GO                                00000001
4080
GO_DONE                           00000001
4081
HLVDCON                           00000FD2
4082
HLVDEN                            00000004
4083
HLVDIE                            00000002
4084
HLVDIF                            00000002
4085
HLVDIN                            00000005
4086
HLVDIP                            00000002
4087
HLVDL0                            00000000
4088
HLVDL1                            00000001
4089
HLVDL2                            00000002
4090
HLVDL3                            00000003
4091
I2C_DAT                           00000005
4092
I2C_READ                          00000002
4093
I2C_START                         00000003
4094
I2C_STOP                          00000004
4095
IBF                               00000007
4096
IBOV                              00000005
4097
ICODE0                            00000000
4098
ICODE1                            00000001
4099
ICODE2                            00000002
4100
ICODE3                            00000003
4101
ICODE4                            00000004
4102
IDLEN                             00000007
4103
INDF0                             00000FEF
4104
INDF1                             00000FE7
4105
INDF2                             00000FDF
4106
INT0                              00000000
4107
INT0E                             00000004
4108
INT0F                             00000001
4109
INT0IE                            00000004
4110
INT0IF                            00000001
4111
INT1                              00000001
4112
INT1E                             00000003
4113
INT1F                             00000000
4114
INT1IE                            00000003
4115
INT1IF                            00000000
4116
INT1IP                            00000006
4117
INT1P                             00000006
4118
INT2                              00000002
4119
INT2E                             00000004
4120
INT2F                             00000001
4121
INT2IE                            00000004
4122
INT2IF                            00000001
4123
INT2IP                            00000007
4124
INT2P                             00000007
4125
INTCON                            00000FF2
4126
INTCON2                           00000FF1
4127
INTCON3                           00000FF0
4128
INTEDG0                           00000006
4129
INTEDG1                           00000005
4130
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 70
4131
 
4132
 
4133
LOC  OBJECT CODE     LINE SOURCE TEXT
4134
  VALUE
4135
 
4136
INTEDG2                           00000004
4137
INTSCR                            00000007
4138
INTSRC                            00000007
4139
IOFS                              00000002
4140
IPEN                              00000007
4141
IPR1                              00000F9F
4142
IPR2                              00000FA2
4143
IPR3                              00000FA5
4144
IRCF0                             00000004
4145
IRCF1                             00000005
4146
IRCF2                             00000006
4147
IRQ_TMP1                          0000000B
4148
IRQ_TMP2                          0000000C
4149
IRQ_TMP3                          0000000D
4150
IRQ_TMP4                          0000000E
4151
IRQ_TMP5                          0000000F
4152
IRVST                             00000005
4153
IRXIE                             00000007
4154
IRXIF                             00000007
4155
IRXIP                             00000007
4156
IVRST                             00000005
4157
JTOFF                             00000001
4158
KBI0                              00000004
4159
KBI1                              00000005
4160
KBI2                              00000006
4161
KBI3                              00000007
4162
LATA                              00000F89
4163
LATA0                             00000000
4164
LATA1                             00000001
4165
LATA2                             00000002
4166
LATA3                             00000003
4167
LATA4                             00000004
4168
LATA5                             00000005
4169
LATA6                             00000006
4170
LATA7                             00000007
4171
LATB                              00000F8A
4172
LATB0                             00000000
4173
LATB1                             00000001
4174
LATB2                             00000002
4175
LATB3                             00000003
4176
LATB4                             00000004
4177
LATB5                             00000005
4178
LATB6                             00000006
4179
LATB7                             00000007
4180
LATC                              00000F8B
4181
LATC0                             00000000
4182
LATC1                             00000001
4183
LATC2                             00000002
4184
LATC3                             00000003
4185
LATC4                             00000004
4186
LATC5                             00000005
4187
LATC6                             00000006
4188
LATC7                             00000007
4189
LATD                              00000F8C
4190
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 71
4191
 
4192
 
4193
LOC  OBJECT CODE     LINE SOURCE TEXT
4194
  VALUE
4195
 
4196
LATD0                             00000000
4197
LATD1                             00000001
4198
LATD2                             00000002
4199
LATD3                             00000003
4200
LATD4                             00000004
4201
LATD5                             00000005
4202
LATD6                             00000006
4203
LATD7                             00000007
4204
LATE                              00000F8D
4205
LATE0                             00000000
4206
LATE1                             00000001
4207
LATE2                             00000002
4208
LVDCON                            00000FD2
4209
LVDEN                             00000004
4210
LVDIE                             00000002
4211
LVDIF                             00000002
4212
LVDIN                             00000005
4213
LVDIP                             00000002
4214
LVDL0                             00000000
4215
LVDL1                             00000001
4216
LVDL2                             00000002
4217
LVDL3                             00000003
4218
LVV0                              00000000
4219
LVV1                              00000001
4220
LVV2                              00000002
4221
LVV3                              00000003
4222
MDSEL0                            00000006
4223
MDSEL1                            00000007
4224
MIOS_AIN_DeadbandGet              00002C5C
4225
MIOS_AIN_DeadbandSet              00002C60
4226
MIOS_AIN_DynamicPrioGet           00002DD4
4227
MIOS_AIN_DynamicPrioSet           00002DD0
4228
MIOS_AIN_LastPinsGet              00002DD8
4229
MIOS_AIN_Muxed                    00002C64
4230
MIOS_AIN_NumberGet                00002C68
4231
MIOS_AIN_NumberSet                00002C6C
4232
MIOS_AIN_Pin7bitGet               00002C70
4233
MIOS_AIN_PinGet                   00002C74
4234
MIOS_AIN_PinLSBGet                00002C78
4235
MIOS_AIN_PinMSBGet                00002C7C
4236
MIOS_AIN_UnMuxed                  00002C80
4237
MIOS_BANKSTICK_CtrlGet            00002DE0
4238
MIOS_BANKSTICK_CtrlSet            00002DDC
4239
MIOS_BANKSTICK_Read               00002D70
4240
MIOS_BANKSTICK_ReadPage           00002E30
4241
MIOS_BANKSTICK_Write              00002D74
4242
MIOS_BANKSTICK_WritePage          00002DE4
4243
MIOS_BOX_CFG0                     00000000
4244
MIOS_BOX_CFG0_20MHz               00000007
4245
MIOS_BOX_CFG0_LCD_TYPE0           00000000
4246
MIOS_BOX_CFG0_LCD_TYPE1           00000001
4247
MIOS_BOX_CFG0_LCD_TYPE2           00000002
4248
MIOS_BOX_CFG0_MBLINK              00000005
4249
MIOS_BOX_CFG0_MERGER              00000004
4250
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 72
4251
 
4252
 
4253
LOC  OBJECT CODE     LINE SOURCE TEXT
4254
  VALUE
4255
 
4256
MIOS_BOX_CFG0_TO_HOST             00000006
4257
MIOS_BOX_CFG0_USE_GLCD            00000003
4258
MIOS_BOX_CFG1                     00000001
4259
MIOS_BOX_CFG1_BS_A0               00000000
4260
MIOS_BOX_CFG1_BS_A1               00000001
4261
MIOS_BOX_CFG1_BS_A2               00000002
4262
MIOS_BOX_CFG1_BS_DIS_VERIFY       00000003
4263
MIOS_BOX_CFG1_IIC_STRETCH_CLK     00000004
4264
MIOS_BOX_STAT                     00000002
4265
MIOS_BOX_STAT_AUTOREPEAT          00000004
4266
MIOS_BOX_STAT_BS_AVAILABLE        00000000
4267
MIOS_BOX_STAT_FERR                00000006
4268
MIOS_BOX_STAT_MBLINK_TUNNEL_PASS  00000001
4269
MIOS_BOX_STAT_MLCD_TRANSFER       00000005
4270
MIOS_BOX_STAT_SUSPEND_ALL         00000002
4271
MIOS_BOX_STAT_SUSPEND_USER        00000003
4272
MIOS_CLCD_SpecialCharInit         00002DC8
4273
MIOS_CLCD_SpecialCharsInit        00002DCC
4274
MIOS_DIN_PinAutoRepeatDisable     00002DC0
4275
MIOS_DIN_PinAutoRepeatEnable      00002DBC
4276
MIOS_DIN_PinAutoRepeatGet         00002DC4
4277
MIOS_DIN_PinGet                   00002CB4
4278
MIOS_DIN_SRGet                    00002CB8
4279
MIOS_DOUT_PinGet                  00002CBC
4280
MIOS_DOUT_PinSet                  00002CC0
4281
MIOS_DOUT_PinSet0                 00002CC4
4282
MIOS_DOUT_PinSet1                 00002CC8
4283
MIOS_DOUT_SRGet                   00002CCC
4284
MIOS_DOUT_SRSet                   00002CD0
4285
MIOS_Delay                        00002D9C
4286
MIOS_EEPROM_Read                  00002D60
4287
MIOS_EEPROM_ReadPage              00002E34
4288
MIOS_EEPROM_Write                 00002D64
4289
MIOS_EEPROM_WritePage             00002E38
4290
MIOS_ENC_Abs7bitAdd               00002CD4
4291
MIOS_ENC_Abs7bitGet               00002CD8
4292
MIOS_ENC_Abs7bitSet               00002CDC
4293
MIOS_ENC_MODE_DETENTED            000000AA
4294
MIOS_ENC_MODE_DETENTED1           000000AA
4295
MIOS_ENC_MODE_DETENTED2           00000022
4296
MIOS_ENC_MODE_DETENTED3           00000088
4297
MIOS_ENC_MODE_DETENTED4           000000A5
4298
MIOS_ENC_MODE_DETENTED5           0000005A
4299
MIOS_ENC_MODE_NON_DETENTED        000000FF
4300
MIOS_ENC_NumberGet                00002CE0
4301
MIOS_ENC_PIN_TABLE                00003280
4302
MIOS_ENC_SPEED_FAST               00000002
4303
MIOS_ENC_SPEED_NORMAL             00000001
4304
MIOS_ENC_SPEED_SLOW               00000000
4305
MIOS_ENC_SpeedGet                 00002CE4
4306
MIOS_ENC_SpeedSet                 00002CE8
4307
MIOS_FLASH_Read                   00002D68
4308
MIOS_FLASH_Write                  00002D6C
4309
MIOS_GLCD_BUFFER                  00000570
4310
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 73
4311
 
4312
 
4313
LOC  OBJECT CODE     LINE SOURCE TEXT
4314
  VALUE
4315
 
4316
MIOS_GLCD_FONT                    00007CFC
4317
MIOS_GLCD_FONT_HEIGHT             0000057E
4318
MIOS_GLCD_FONT_OFFSET             00000580
4319
MIOS_GLCD_FONT_PTRH               00000582
4320
MIOS_GLCD_FONT_PTRL               00000581
4321
MIOS_GLCD_FONT_PTRU               0000058E
4322
MIOS_GLCD_FONT_WIDTH              0000057D
4323
MIOS_GLCD_FONT_X0                 0000057F
4324
MIOS_GLCD_FontInit                00002D54
4325
MIOS_GLCD_GCURSOR_X               0000057B
4326
MIOS_GLCD_GCURSOR_Y               0000057C
4327
MIOS_GLCD_GCursorGet              00002D58
4328
MIOS_GLCD_GCursorSet              00002D5C
4329
MIOS_GLCD_TMP1                    00000585
4330
MIOS_GLCD_TMP2                    00000586
4331
MIOS_GLCD_TMP3                    00000587
4332
MIOS_GLCD_TMP4                    00000588
4333
MIOS_GPCounterGet                 00002DA0
4334
MIOS_HLP_16bitAddSaturate         00002DB8
4335
MIOS_HLP_AddressFromTable         00002D84
4336
MIOS_HLP_Dec2BCD                  00002DE8
4337
MIOS_HLP_GetBitANDMask            00002D88
4338
MIOS_HLP_GetBitORMask             00002D8C
4339
MIOS_HLP_GetIndex_2bytes          00002D90
4340
MIOS_HLP_GetIndex_4bytes          00002D94
4341
MIOS_HLP_IndirectJump             00002D98
4342
MIOS_IIC_AckSend                  00002E14
4343
MIOS_IIC_ByteReceive              00002E10
4344
MIOS_IIC_ByteSend                 00002E0C
4345
MIOS_IIC_CtrlGet                  00002E20
4346
MIOS_IIC_CtrlSet                  00002E1C
4347
MIOS_IIC_NakSend                  00002E18
4348
MIOS_IIC_Start                    00002E04
4349
MIOS_IIC_Stop                     00002E08
4350
MIOS_LCD_CURSOR_POS               0000057A
4351
MIOS_LCD_CURSOR_POS_REAL          0000058D
4352
MIOS_LCD_Clear                    00002D04
4353
MIOS_LCD_Cmd                      00002D08
4354
MIOS_LCD_CursorGet                00002D0C
4355
MIOS_LCD_CursorSet                00002D10
4356
MIOS_LCD_Data                     00002D14
4357
MIOS_LCD_Init                     00002D18
4358
MIOS_LCD_MessageStart             00002DF4
4359
MIOS_LCD_MessageStop              00002DF8
4360
MIOS_LCD_OPTION1                  00000578
4361
MIOS_LCD_OPTION2                  00000579
4362
MIOS_LCD_PrintBCD1                00002D1C
4363
MIOS_LCD_PrintBCD2                00002D20
4364
MIOS_LCD_PrintBCD3                00002D24
4365
MIOS_LCD_PrintBCD4                00002DEC
4366
MIOS_LCD_PrintBCD5                00002DF0
4367
MIOS_LCD_PrintChar                00002D28
4368
MIOS_LCD_PrintHex1                00002D2C
4369
MIOS_LCD_PrintHex2                00002D30
4370
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 74
4371
 
4372
 
4373
LOC  OBJECT CODE     LINE SOURCE TEXT
4374
  VALUE
4375
 
4376
MIOS_LCD_PrintMessage             00002D34
4377
MIOS_LCD_PrintPreconfString       00002D38
4378
MIOS_LCD_PrintString              00002D3C
4379
MIOS_LCD_TIMEOUT0                 00000583
4380
MIOS_LCD_TIMEOUT1                 00000584
4381
MIOS_LCD_TYPE_CLCD                00000000
4382
MIOS_LCD_TYPE_GLCD0               00000001
4383
MIOS_LCD_TYPE_GLCD1               00000002
4384
MIOS_LCD_TYPE_GLCD2               00000003
4385
MIOS_LCD_TYPE_GLCD3               00000004
4386
MIOS_LCD_TYPE_GLCD4               00000005
4387
MIOS_LCD_TYPE_GLCD_CUSTOM         00000007
4388
MIOS_LCD_TYPE_MLCD                00000006
4389
MIOS_LCD_TypeAutoSet              00002D40
4390
MIOS_LCD_TypeGet                  00002D44
4391
MIOS_LCD_TypeSet                  00002D48
4392
MIOS_LCD_Y0_OFFSET                00000589
4393
MIOS_LCD_Y1_OFFSET                0000058A
4394
MIOS_LCD_Y2_OFFSET                0000058B
4395
MIOS_LCD_Y3_OFFSET                0000058C
4396
MIOS_LCD_YAddressGet              00002D4C
4397
MIOS_LCD_YAddressSet              00002D50
4398
MIOS_MF_DeadbandGet               00002C94
4399
MIOS_MF_DeadbandSet               00002C98
4400
MIOS_MF_Disable                   00002C9C
4401
MIOS_MF_Enable                    00002CA0
4402
MIOS_MF_FaderMove                 00002CA4
4403
MIOS_MF_PWM_DutyCycleDownGet      00002C84
4404
MIOS_MF_PWM_DutyCycleDownSet      00002C88
4405
MIOS_MF_PWM_DutyCycleUpGet        00002C8C
4406
MIOS_MF_PWM_DutyCycleUpSet        00002C90
4407
MIOS_MF_PWM_PeriodGet             00002DFC
4408
MIOS_MF_PWM_PeriodSet             00002E00
4409
MIOS_MF_SuspendDisable            00002CA8
4410
MIOS_MF_SuspendEnable             00002CAC
4411
MIOS_MF_SuspendGet                00002CB0
4412
MIOS_MF_TouchDetectionReset       00002E2C
4413
MIOS_MIDI_BeginStream             00002C00
4414
MIOS_MIDI_DeviceIDAutoSet         00002C04
4415
MIOS_MIDI_DeviceIDGet             00002C08
4416
MIOS_MIDI_DeviceIDSet             00002C0C
4417
MIOS_MIDI_EndStream               00002C10
4418
MIOS_MIDI_INTERFACE_COMMON        00000000
4419
MIOS_MIDI_INTERFACE_TO_HOST       00000001
4420
MIOS_MIDI_Init                    00002C14
4421
MIOS_MIDI_InterfaceAutoSet        00002C18
4422
MIOS_MIDI_InterfaceGet            00002C1C
4423
MIOS_MIDI_InterfaceSet            00002C20
4424
MIOS_MIDI_MERGER_DISABLED         00000000
4425
MIOS_MIDI_MERGER_ENABLED          00000001
4426
MIOS_MIDI_MERGER_MBLINK_EP        00000002
4427
MIOS_MIDI_MERGER_MBLINK_FP        00000003
4428
MIOS_MIDI_MergerGet               00002C24
4429
MIOS_MIDI_MergerSet               00002C28
4430
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 75
4431
 
4432
 
4433
LOC  OBJECT CODE     LINE SOURCE TEXT
4434
  VALUE
4435
 
4436
MIOS_MIDI_RxBufferFree            00002C2C
4437
MIOS_MIDI_RxBufferGet             00002C30
4438
MIOS_MIDI_RxBufferPut             00002C34
4439
MIOS_MIDI_RxBufferUsed            00002C38
4440
MIOS_MIDI_TxBufferFlush           00002C3C
4441
MIOS_MIDI_TxBufferFree            00002C40
4442
MIOS_MIDI_TxBufferGet             00002C44
4443
MIOS_MIDI_TxBufferPut             00002C48
4444
MIOS_MIDI_TxBufferUsed            00002C4C
4445
MIOS_MPROC_EVENT_TABLE            00003080
4446
MIOS_MPROC_MergerDisable          00002C50
4447
MIOS_MPROC_MergerEnable           00002C54
4448
MIOS_MPROC_MergerGet              00002C58
4449
MIOS_PARAMETER1                   00000003
4450
MIOS_PARAMETER2                   00000004
4451
MIOS_PARAMETER3                   00000005
4452
MIOS_RESERVED_144                 00002E40
4453
MIOS_RESERVED_145                 00002E44
4454
MIOS_RESERVED_146                 00002E48
4455
MIOS_RESERVED_147                 00002E4C
4456
MIOS_RESERVED_148                 00002E50
4457
MIOS_RESERVED_149                 00002E54
4458
MIOS_RESERVED_150                 00002E58
4459
MIOS_RESERVED_151                 00002E5C
4460
MIOS_RESERVED_152                 00002E60
4461
MIOS_RESERVED_153                 00002E64
4462
MIOS_RESERVED_154                 00002E68
4463
MIOS_RESERVED_155                 00002E6C
4464
MIOS_RESERVED_156                 00002E70
4465
MIOS_RESERVED_157                 00002E74
4466
MIOS_RESERVED_158                 00002E78
4467
MIOS_RESERVED_159                 00002E7C
4468
MIOS_RESERVED_160                 00002E80
4469
MIOS_RESERVED_161                 00002E84
4470
MIOS_RESERVED_162                 00002E88
4471
MIOS_RESERVED_163                 00002E8C
4472
MIOS_RESERVED_164                 00002E90
4473
MIOS_RESERVED_165                 00002E94
4474
MIOS_RESERVED_166                 00002E98
4475
MIOS_RESERVED_167                 00002E9C
4476
MIOS_RESERVED_168                 00002EA0
4477
MIOS_RESERVED_169                 00002EA4
4478
MIOS_RESERVED_170                 00002EA8
4479
MIOS_RESERVED_171                 00002EAC
4480
MIOS_RESERVED_172                 00002EB0
4481
MIOS_RESERVED_173                 00002EB4
4482
MIOS_RESERVED_174                 00002EB8
4483
MIOS_RESERVED_175                 00002EBC
4484
MIOS_RESERVED_176                 00002EC0
4485
MIOS_RESERVED_177                 00002EC4
4486
MIOS_RESERVED_178                 00002EC8
4487
MIOS_RESERVED_179                 00002ECC
4488
MIOS_RESERVED_180                 00002ED0
4489
MIOS_RESERVED_181                 00002ED4
4490
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 76
4491
 
4492
 
4493
LOC  OBJECT CODE     LINE SOURCE TEXT
4494
  VALUE
4495
 
4496
MIOS_RESERVED_182                 00002ED8
4497
MIOS_RESERVED_183                 00002EDC
4498
MIOS_RESERVED_184                 00002EE0
4499
MIOS_RESERVED_185                 00002EE4
4500
MIOS_RESERVED_186                 00002EE8
4501
MIOS_RESERVED_187                 00002EEC
4502
MIOS_RESERVED_188                 00002EF0
4503
MIOS_RESERVED_189                 00002EF4
4504
MIOS_RESERVED_190                 00002EF8
4505
MIOS_RESERVED_191                 00002EFC
4506
MIOS_RESERVED_192                 00002F00
4507
MIOS_RESERVED_193                 00002F04
4508
MIOS_RESERVED_194                 00002F08
4509
MIOS_RESERVED_195                 00002F0C
4510
MIOS_RESERVED_196                 00002F10
4511
MIOS_RESERVED_197                 00002F14
4512
MIOS_RESERVED_198                 00002F18
4513
MIOS_RESERVED_199                 00002F1C
4514
MIOS_RESERVED_200                 00002F20
4515
MIOS_RESERVED_201                 00002F24
4516
MIOS_RESERVED_202                 00002F28
4517
MIOS_RESERVED_203                 00002F2C
4518
MIOS_RESERVED_204                 00002F30
4519
MIOS_RESERVED_205                 00002F34
4520
MIOS_RESERVED_206                 00002F38
4521
MIOS_RESERVED_207                 00002F3C
4522
MIOS_RESERVED_208                 00002F40
4523
MIOS_RESERVED_209                 00002F44
4524
MIOS_RESERVED_210                 00002F48
4525
MIOS_RESERVED_211                 00002F4C
4526
MIOS_RESERVED_212                 00002F50
4527
MIOS_RESERVED_213                 00002F54
4528
MIOS_RESERVED_214                 00002F58
4529
MIOS_RESERVED_215                 00002F5C
4530
MIOS_RESERVED_216                 00002F60
4531
MIOS_RESERVED_217                 00002F64
4532
MIOS_RESERVED_218                 00002F68
4533
MIOS_RESERVED_219                 00002F6C
4534
MIOS_RESERVED_220                 00002F70
4535
MIOS_RESERVED_221                 00002F74
4536
MIOS_RESERVED_222                 00002F78
4537
MIOS_RESERVED_223                 00002F7C
4538
MIOS_RESERVED_224                 00002F80
4539
MIOS_RESERVED_225                 00002F84
4540
MIOS_RESERVED_226                 00002F88
4541
MIOS_RESERVED_227                 00002F8C
4542
MIOS_RESERVED_228                 00002F90
4543
MIOS_RESERVED_229                 00002F94
4544
MIOS_RESERVED_230                 00002F98
4545
MIOS_RESERVED_231                 00002F9C
4546
MIOS_RESERVED_232                 00002FA0
4547
MIOS_RESERVED_233                 00002FA4
4548
MIOS_RESERVED_234                 00002FA8
4549
MIOS_RESERVED_235                 00002FAC
4550
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 77
4551
 
4552
 
4553
LOC  OBJECT CODE     LINE SOURCE TEXT
4554
  VALUE
4555
 
4556
MIOS_RESERVED_236                 00002FB0
4557
MIOS_RESERVED_237                 00002FB4
4558
MIOS_RESERVED_238                 00002FB8
4559
MIOS_RESERVED_239                 00002FBC
4560
MIOS_RESERVED_240                 00002FC0
4561
MIOS_RESERVED_241                 00002FC4
4562
MIOS_RESERVED_242                 00002FC8
4563
MIOS_RESERVED_243                 00002FCC
4564
MIOS_RESERVED_244                 00002FD0
4565
MIOS_RESERVED_245                 00002FD4
4566
MIOS_RESERVED_246                 00002FD8
4567
MIOS_RESERVED_247                 00002FDC
4568
MIOS_RESERVED_248                 00002FE0
4569
MIOS_RESERVED_249                 00002FE4
4570
MIOS_RESERVED_250                 00002FE8
4571
MIOS_RESERVED_251                 00002FEC
4572
MIOS_RESERVED_252                 00002FF0
4573
MIOS_RESERVED_253                 00002FF4
4574
MIOS_RESERVED_254                 00002FF8
4575
MIOS_RESERVED_255                 00002FFC
4576
MIOS_Reset                        00002DA4
4577
MIOS_SRIO_DebounceGet             00002E28
4578
MIOS_SRIO_DebounceSet             00002E24
4579
MIOS_SRIO_NumberGet               00002CEC
4580
MIOS_SRIO_NumberSet               00002CF0
4581
MIOS_SRIO_TS_SensitivityGet       00002CF4
4582
MIOS_SRIO_TS_SensitivitySet       00002CF8
4583
MIOS_SRIO_UpdateFrqGet            00002CFC
4584
MIOS_SRIO_UpdateFrqSet            00002D00
4585
MIOS_SystemResume                 00002DA8
4586
MIOS_SystemSuspend                00002DAC
4587
MIOS_TIMER_Init                   00002D78
4588
MIOS_TIMER_ReInit                 00002E3C
4589
MIOS_TIMER_Start                  00002D7C
4590
MIOS_TIMER_Stop                   00002D80
4591
MIOS_UserResume                   00002DB0
4592
MIOS_UserSuspend                  00002DB4
4593
MSEL0                             00000DF0
4594
MSEL1                             00000DF1
4595
MSEL2                             00000DF2
4596
MSEL3                             00000DF3
4597
N                                 00000004
4598
NOT_A                             00000005
4599
NOT_ADDRESS                       00000005
4600
NOT_BOR                           00000000
4601
NOT_CS                            00000002
4602
NOT_DONE                          00000001
4603
NOT_PD                            00000002
4604
NOT_POR                           00000001
4605
NOT_RBPU                          00000007
4606
NOT_RD                            00000000
4607
NOT_RI                            00000004
4608
NOT_SS                            00000005
4609
NOT_T1SYNC                        00000002
4610
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 78
4611
 
4612
 
4613
LOC  OBJECT CODE     LINE SOURCE TEXT
4614
  VALUE
4615
 
4616
NOT_T3SYNC                        00000002
4617
NOT_TO                            00000003
4618
NOT_W                             00000002
4619
NOT_WR                            00000001
4620
NOT_WRITE                         00000002
4621
OBF                               00000006
4622
OERR                              00000001
4623
OPMODE                            00000005
4624
OPMODE0                           00000005
4625
OPMODE1                           00000006
4626
OPMODE2                           00000007
4627
OSC1                              00000007
4628
OSC2                              00000006
4629
OSCCON                            00000FD3
4630
OSCFIE                            00000007
4631
OSCFIF                            00000007
4632
OSCFIP                            00000007
4633
OSCTUNE                           00000F9B
4634
OSTS                              00000003
4635
OV                                00000003
4636
P                                 00000004
4637
P1A                               00000004
4638
P1B                               00000005
4639
P1C                               00000006
4640
P1D                               00000007
4641
PC                                00000FF9
4642
PCFG0                             00000000
4643
PCFG1                             00000001
4644
PCFG2                             00000002
4645
PCFG3                             00000003
4646
PCL                               00000FF9
4647
PCLATH                            00000FFA
4648
PCLATU                            00000FFB
4649
PD                                00000002
4650
PDC0                              00000000
4651
PDC1                              00000001
4652
PDC2                              00000002
4653
PDC3                              00000003
4654
PDC4                              00000004
4655
PDC5                              00000005
4656
PDC6                              00000006
4657
PEIE                              00000006
4658
PEN                               00000002
4659
PGC                               00000006
4660
PGD                               00000007
4661
PGM                               00000005
4662
PIE1                              00000F9D
4663
PIE2                              00000FA0
4664
PIE3                              00000FA3
4665
PIR1                              00000F9E
4666
PIR2                              00000FA1
4667
PIR3                              00000FA4
4668
PLLEN                             00000006
4669
PLUSW0                            00000FEB
4670
gpasm-0.13.7 beta               main.asm    6-8-2013  12:49:28           PAGE 79
4671
 
4672
 
4673
LOC  OBJECT CODE     LINE SOURCE TEXT
4674
  VALUE
4675
 
4676
PLUSW1                            00000FE3
4677
PLUSW2                            00000FDB
4678
POR                               00000001
4679
PORTA                             00000F80
4680
PORTB                             00000F81
4681
PORTC                             00000F82
4682
PORTD                             00000F83
4683
PORTE                             00000F84
4684
POSTDEC0                          00000FED
4685
POSTDEC1                          00000FE5
4686
POSTDEC2                          00000FDD
4687
POSTINC0                          00000FEE
4688
POSTINC1                          00000FE6
4689
POSTINC2                          00000FDE
4690
PR2                               00000FCB
4691
PREINC0                           00000FEC
4692
PREINC1                           00000FE4
4693
PREINC2                           00000FDC
4694
PROD                              00000FF3
4695
PRODH                             00000FF4
4696
PRODL                             00000FF3
4697
PRSEG0                            00000000
4698
PRSEG1                            00000001
4699
PRSEG2                            00000002
4700
PRSEN                             00000007
4701
PSA                               00000003
4702
PSP0                              00000000
4703
PSP1                              00000001
4704
PSP2                              00000002
4705
PSP3                              00000003
4706
PSP4                              00000004
4707
PSP5                              00000005
4708
PSP6                              00000006
4709
PSP7                              00000007
4710
PSPIE                             00000007
4711
PSPIF                             00000007
4712
PSPIP                             00000007