Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/p2_environment.asm @ 167:cb055a7d75f3
+ Use overlay local vars.
+ Make all private functions static.
+ Merge calc_tissue 2sec and 1min
+ Merge sim_tissue 1min and 10min
+ Expose basic display utilities for c-code.
+ Prepare stand-alone utilities for p2_main.c testing platform.
+ New c utility: int read_custom_function(cf#)
| author | JeanDo |
|---|---|
| date | Mon, 24 Jan 2011 23:31:57 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 166:80de93d72a17 | 167:cb055a7d75f3 |
|---|---|
| 1 ; ******************************************************************** | |
| 2 ; ** ASM code for simulation / tests without full simulation code ** | |
| 3 ; ** This is NOT a part of the OSTC ** | |
| 4 ; ******************************************************************** | |
| 5 | |
| 6 ;///////////////////////////////////////////////////////////////////////////// | |
| 7 ; OSTC - diving computer code | |
| 8 ; Copyright (C) 2008 HeinrichsWeikamp GbR | |
| 9 ; | |
| 10 ; This program is free software: you can redistribute it and/or modify | |
| 11 ; it under the terms of the GNU General Public License as published by | |
| 12 ; the Free Software Foundation, either version 3 of the License, or | |
| 13 ; (at your option) any later version. | |
| 14 ; | |
| 15 ; This program is distributed in the hope that it will be useful, | |
| 16 ; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 ; GNU General Public License for more details. | |
| 19 ; | |
| 20 ; You should have received a copy of the GNU General Public License | |
| 21 ; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 22 ; | |
| 23 ;///////////////////////////////////////////////////////////////////////////// | |
| 24 ; History: | |
| 25 ; 01/24/11 : [jDG] make p2_main.c link with oled+wordprocessor display functions | |
| 26 | |
| 27 LIST P=18F4685 ;directive to define processor | |
| 28 #include <P18F4685.INC> ;processor specific variable definitions | |
| 29 | |
| 30 ;============================================================================= | |
| 31 ; Reset and interupt vectors. | |
| 32 ; | |
| 33 reset_v code 0x0000 | |
| 34 extern main | |
| 35 restart goto main | |
| 36 | |
| 37 ORG 0x0008 ; Interupt vector | |
| 38 bra HighInt | |
| 39 ORG 0x0018 ; Other interupt vector | |
| 40 HighInt: retfie ; Return from everything. | |
| 41 | |
| 42 #include definitions.asm | |
| 43 #include strings.inc | |
| 44 | |
| 45 ;============================================================================= | |
| 46 ; Minimal routines to include | |
| 47 ; | |
| 48 p2_env code 0x400 | |
| 49 #include wait.asm ; Delay routines. | |
| 50 #include oled_samsung.asm ; Screen display routines. | |
| 51 #include aa_wordprocessor.asm ; Text printing routines. | |
| 52 #include strings.asm ; String concatenations. | |
| 53 | |
| 54 ;============================================================================= | |
| 55 ; | |
| 56 ; Fake a few calls, to avoid linking the whole OSTC simulation code. | |
| 57 ; Note: Needing to do so is a clear indication that cleanups are necessary... | |
| 58 ; | |
| 59 global PLED_warnings_color | |
| 60 PLED_warnings_color: | |
| 61 movlw b'11100000' ; Red | |
| 62 goto PLED_set_color | |
| 63 | |
| 64 global PLED_standard_color | |
| 65 PLED_standard_color: | |
| 66 setf WREG ; White | |
| 67 goto PLED_set_color | |
| 68 | |
| 69 global getcustom15 | |
| 70 getcustom15: | |
| 71 clrf hi | |
| 72 clrf lo | |
| 73 return | |
| 74 | |
| 75 ;============================================================================= | |
| 76 ; Needed fonts definition. | |
| 77 #include aa_fonts.asm | |
| 78 end | |
| 79 |
