comparison code_part1/OSTC_code_asm_part1/definitions.asm @ 123:6a94f96e9cea

The big cleanup, again.
author JeanDo
date Thu, 30 Dec 2010 23:45:20 +0100
parents 14a074e1a375
children 4f9f477bb452
comparison
equal deleted inserted replaced
122:3003a8040b78 123:6a94f96e9cea
32 #DEFINE T0CON_debounce b'00000000' ; Timer0 Switch Debounce 32 #DEFINE T0CON_debounce b'00000000' ; Timer0 Switch Debounce
33 33
34 #DEFINE FT_SMALL .0 34 #DEFINE FT_SMALL .0
35 #DEFINE FT_MEDIUM .1 35 #DEFINE FT_MEDIUM .1
36 #DEFINE FT_LARGE .2 36 #DEFINE FT_LARGE .2
37
38 #DEFINE AAFONTS ; The nicer fonts (not working yet...)
39 37
40 ; Color Definitions: 8Bit RGB b'RRRGGGBB' 38 ; Color Definitions: 8Bit RGB b'RRRGGGBB'
41 ;#DEFINE color_red b'11100000' 39 ;#DEFINE color_red b'11100000'
42 #DEFINE color_blue b'00000011' 40 #DEFINE color_blue b'00000011'
43 #DEFINE color_green b'00011100' 41 #DEFINE color_green b'00011100'
82 CBLOCK 0x060 ;Bank 0 80 CBLOCK 0x060 ;Bank 0
83 letter:.026 ;letter buffer 81 letter:.026 ;letter buffer
84 win_color1 82 win_color1
85 win_color2 83 win_color2
86 win_top 84 win_top
85 win_height ; String (and font) height
87 win_leftx2 86 win_leftx2
87 win_width ; String width (more than 255 for aa_wordprocessor !)
88 win_font 88 win_font
89 win_invert 89 win_invert
90 wp_temp 90 ENDC
91 ENDC 91
92 ifdef AAFONTS
93 CBLOCK
94 aa_flags ; Various flags for aa_wordprocessor
95 aa_width:2 ; String width (more than 255...) !
96 aa_height ; String (and font) height
97 aa_bitlen ; Count of pixels when decoding bitmaps.
98 aa_start:2 ; PROM ptr to start of encoded bitmap
99 aa_end:2 ; and end of it.
100 aa_colorDiv:2 ; Current color, divided by 2 or 4
101 ENDC
102 endif
103 ; the following is used by the C-code up to 0x0E0!! 92 ; the following is used by the C-code up to 0x0E0!!
104 CBLOCK 0x0E0 ;Bank 0 93 CBLOCK 0x0E0 ;Bank 0
105 gf_decolist_copy:.32 94 gf_decolist_copy:.32
106 ENDC 95 ENDC
107 96
124 113
125 textnumber ;for textdisplay and textlookup 114 textnumber ;for textdisplay and textlookup
126 textlength 115 textlength
127 textaddress:2 116 textaddress:2
128 117
129 LastSetRow
130 LastSetColumn
131 average_depth_hold:4 ; Holds Sum of depths 118 average_depth_hold:4 ; Holds Sum of depths
132 b0_lo ; Temp (calculate_average) 119 b0_lo ; Temp (calculate_average)
133 b0_hi ; Temp (calculate_average) 120 b0_hi ; Temp (calculate_average)
134 average_divesecs:2 ; Used for resetable average depth display 121 average_divesecs:2 ; Used for resetable average depth display
135 surface_interval:2 ; Surface Interval [mins] 122 surface_interval:2 ; Surface Interval [mins]
136 123
137 draw_box_temp1
138 draw_box_temp2
139 draw_box_temp3
140
141 flag1 ;Flag register 33 124 flag1 ;Flag register 33
142 flag2 125 flag2
143 flag3 126 flag3
144 flag4 127 flag4
145 flag5 ; has to be exacly here, is modified by c-code (no sensor int) 128 flag5 ; has to be exacly here, is modified by c-code (no sensor int)
179 162
180 timer1int_counter1 ;Timer 1 counter 163 timer1int_counter1 ;Timer 1 counter
181 timer1int_counter2 ;Timer 1 counter 164 timer1int_counter2 ;Timer 1 counter
182 165
183 uart1_temp ;RS232 temp variables 166 uart1_temp ;RS232 temp variables
184 uart2_temp;70 167 uart2_temp ;70
185 168
186 divA:2 ;math routines 169 divA:2 ;math routines
187 divB 170 divB
188 xC:4 171 xC:4
189 xA:2 172 xA:2
327 logbook_temp4 ; Temp used in logbook display&Divemode&Gassetup 310 logbook_temp4 ; Temp used in logbook display&Divemode&Gassetup
328 logbook_temp5 ; Temp used in logbook display&Divemode&Gassetup 311 logbook_temp5 ; Temp used in logbook display&Divemode&Gassetup
329 logbook_temp6 ; Temp used in logbook display&Divemode&Gassetup 312 logbook_temp6 ; Temp used in logbook display&Divemode&Gassetup
330 313
331 convert_value_temp:3 ; used in menu_battery_state_convert_date 314 convert_value_temp:3 ; used in menu_battery_state_convert_date
332 box_temp:5
333 time_correction_value ; Adds to Seconds on midnight 315 time_correction_value ; Adds to Seconds on midnight
334 ENDC 316 ENDC
335
336 ifndef AAFONTS
337 CBLOCK
338 win_color1_temp
339 win_color2_temp ; Backup color registers
340 ENDC
341 endif
342
343 317
344 CBLOCK 0x200 ;Bank 2 318 CBLOCK 0x200 ;Bank 2
345 int_O_tissue_for_debug:.32 ; deco_debug copies pressure of tissue to this variable 319 int_O_tissue_for_debug:.32 ; deco_debug copies pressure of tissue to this variable
346 int_O_GF_spare____:2; // 0x240 320 int_O_GF_spare____:2; // 0x240
347 int_O_GF_step:2; // 0x242 321 int_O_GF_step:2; // 0x242
420 char_O_relative_gradient_GF; ; 0x566 new in v.102 394 char_O_relative_gradient_GF; ; 0x566 new in v.102
421 char_I_deco_gas_change2; // 0x567 new in v.102 395 char_I_deco_gas_change2; // 0x567 new in v.102
422 char_I_deco_gas_change3; // 0x568 new in v.102 396 char_I_deco_gas_change3; // 0x568 new in v.102
423 char_I_deco_gas_change4; // 0x569 new in v.102 397 char_I_deco_gas_change4; // 0x569 new in v.102
424 char_I_deco_gas_change5; // 0x56A new in v.102 398 char_I_deco_gas_change5; // 0x56A new in v.102
425
426
427 ENDC 399 ENDC
428 400
429 CBLOCK 0x700 ;Bank 7 401 CBLOCK 0x700 ;Bank 7
430 ; variables used exclusively in dd: 402 ; variables used exclusively in dd:
431 dd_temp_BSR ; has to be first in bank7 403 dd_temp_BSR ; has to be first in bank7
457 429
458 CBLOCK 0x94A ;Bank 9 430 CBLOCK 0x94A ;Bank 9
459 char_O_hash:.16 ; MD2 hash values = d'16' 431 char_O_hash:.16 ; MD2 hash values = d'16'
460 ENDC 432 ENDC
461 433
462
463 ; C-code Routines
464 ; PART 3
465 ifndef AAFONTS
466 #DEFINE main_wordprocessor 0x0B468
467 endif
468
469 ; C-code Routines 434 ; C-code Routines
470 ; PART 2 435 ; PART 2
471 extern deco_calc_CNS_decrease_15min 436 extern deco_calc_CNS_decrease_15min
472 extern deco_calc_CNS_fraction 437 extern deco_calc_CNS_fraction
473 extern deco_calc_desaturation_time 438 extern deco_calc_desaturation_time