Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/definitions.asm @ 142:8b75ba28d641
Screen-flipping custom function.
- Fix bank safe addressings.
author | JeanDo |
---|---|
date | Fri, 07 Jan 2011 03:01:02 +0100 |
parents | 87a53efbb5ba |
children | fc699a7460e6 |
comparison
equal
deleted
inserted
replaced
141:622da16b768f | 142:8b75ba28d641 |
---|---|
52 #DEFINE warn_ppo2 d'4' | 52 #DEFINE warn_ppo2 d'4' |
53 #DEFINE warn_velocity d'5' | 53 #DEFINE warn_velocity d'5' |
54 #DEFINE warn_ceiling d'6' | 54 #DEFINE warn_ceiling d'6' |
55 #DEFINE warn_gas_in_gaslist d'7' | 55 #DEFINE warn_gas_in_gaslist d'7' |
56 | 56 |
57 | |
58 ;Configuration bits | 57 ;Configuration bits |
59 CONFIG OSC = IRCIO67 ;Internal oscillator block, port function on RA6 and RA7 | 58 CONFIG OSC = IRCIO67 ;Internal oscillator block, port function on RA6 and RA7 |
60 CONFIG FCMEN = OFF ;Fail-Safe Clock Monitor disabled | 59 CONFIG FCMEN = OFF ;Fail-Safe Clock Monitor disabled |
61 CONFIG IESO = OFF ;Oscillator Switchover mode disabled | 60 CONFIG IESO = OFF ;Oscillator Switchover mode disabled |
62 | 61 |
72 | 71 |
73 CONFIG DEBUG = OFF ;Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins | 72 CONFIG DEBUG = OFF ;Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins |
74 CONFIG XINST = OFF ;Instruction set extension and Indexed Addressing mode disabled (Legacy mode) | 73 CONFIG XINST = OFF ;Instruction set extension and Indexed Addressing mode disabled (Legacy mode) |
75 CONFIG LVP = OFF ;Single-Supply ICSP disabled | 74 CONFIG LVP = OFF ;Single-Supply ICSP disabled |
76 CONFIG STVREN = OFF ;Stack full/underflow will not cause Reset | 75 CONFIG STVREN = OFF ;Stack full/underflow will not cause Reset |
76 | |
77 ;============================================================================= | |
77 | 78 |
78 CBLOCK 0x800 | 79 CBLOCK 0x800 |
79 c_code_data_stack:.64 ; Reserve space for C-code data space. Eg.when calling log. | 80 c_code_data_stack:.64 ; Reserve space for C-code data space. Eg.when calling log. |
80 endc | 81 endc |
81 | 82 |
92 | 93 |
93 CBLOCK 0x060 ;Bank 0 | 94 CBLOCK 0x060 ;Bank 0 |
94 letter:.026 ;letter buffer | 95 letter:.026 ;letter buffer |
95 win_color1 | 96 win_color1 |
96 win_color2 | 97 win_color2 |
97 win_top | 98 win_top ; Box/text position (0..239). |
98 win_height ; String (and font) height | 99 win_height ; Box/text height (1..240) |
99 win_leftx2 | 100 win_leftx2 ; Box/text position (0..159) |
100 win_width ; String width (more than 255 for aa_wordprocessor !) | 101 win_width ; box width (1..160) |
101 win_font | 102 win_font |
102 win_invert | 103 win_invert |
104 win_flags ; flip_screen flag, transparent fonts, etc... | |
103 ENDC | 105 ENDC |
104 | 106 |
105 CBLOCK 0x100 ;Bank 1 | 107 CBLOCK 0x100 ;Bank 1 |
106 wreg_temp ;variables used for context saving during ISR | 108 wreg_temp ;variables used for context saving during ISR |
107 status_temp | 109 status_temp |
288 | 290 |
289 ; ontime_since_last_charge:2 ; Ontime in minutes since last complete charge cycle | 291 ; ontime_since_last_charge:2 ; Ontime in minutes since last complete charge cycle |
290 ; sleeptime_since_last_charge:2; Sleeptime in hours since last complete charge | 292 ; sleeptime_since_last_charge:2; Sleeptime in hours since last complete charge |
291 | 293 |
292 debug_char:6 ; For debugmode | 294 debug_char:6 ; For debugmode |
293 debug_temp ; For debugmode | |
294 | 295 |
295 apnoe_mins ; single descent minutes for Apnoe mode | 296 apnoe_mins ; single descent minutes for Apnoe mode |
296 apnoe_secs ; single descent seconds for Apnoe mode | 297 apnoe_secs ; single descent seconds for Apnoe mode |
297 apnoe_max_pressure:2 ; Max. Pressure in Apnoe mode | 298 apnoe_max_pressure:2 ; Max. Pressure in Apnoe mode |
298 apnoe_timeout_counter ; counts minutes for apnoe timeout | 299 apnoe_timeout_counter ; counts minutes for apnoe timeout |
476 | 477 |
477 #DEFINE oled_rs PORTE,0 ;0 | 478 #DEFINE oled_rs PORTE,0 ;0 |
478 #DEFINE oled_nreset PORTE,1 ;0 | 479 #DEFINE oled_nreset PORTE,1 ;0 |
479 #DEFINE oled_e_nwr PORTE,2 ;0 | 480 #DEFINE oled_e_nwr PORTE,2 ;0 |
480 | 481 |
482 ; Bank0 flags | |
483 #DEFINE win_flip_screen win_flags,0 ; 180° rotation of the OLED screen. | |
484 | |
481 ; Flags | 485 ; Flags |
482 #DEFINE FLAG_scale flag1,0 ; Wordprocessor | 486 #DEFINE FLAG_scale flag1,0 ; Wordprocessor |
483 #DEFINE FLAG_truncated flag1,1 ; Wordprocessor | 487 #DEFINE FLAG_truncated flag1,1 ; Wordprocessor |
484 #DEFINE pre_zero_flag flag1,2 ; leading zeros | 488 #DEFINE pre_zero_flag flag1,2 ; leading zeros |
485 #DEFINE neg_flag flag1,3 ; e.g. Sub_16 (sub_c = sub_a - sub_b) | 489 #DEFINE neg_flag flag1,3 ; e.g. Sub_16 (sub_c = sub_a - sub_b) |