annotate code_part1/OSTC_code_asm_part1/p2_environment.asm @ 346:193d1adc97b7 ScreenDump

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