annotate code_part1/OSTC_code_asm_part1/io.asm @ 0:96a35aeda5f2

Initial setup
author heinrichsweikamp
date Tue, 12 Jan 2010 15:05:59 +0100
parents
children 73014f788032
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; Copyright (C) 2009 HeinrichsWeikamp GbR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; low-level routines for i/O
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17 ; written: 090801
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18 ; last updated: 090801
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; ToDo:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 set_LEDy: ; Yellow LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 bsf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25 clear_LEDy ; Yellow LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
26 bcf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29 set_LEDr: ; Red LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 bsf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 clear_LEDr ; Red LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 bcf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 toggle_LEDr ; Red LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 btg LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40 set_LEDg: ; Green LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 bsf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43 clear_LEDg ; Green LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 bcf LED_red
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 set_LEDusb: ; USB LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 bsf LED_blue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50 clear_LEDusb; USB LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51 bcf LED_blue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
53
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54 set_LEDnofly: ; nofly LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55 bsf LED_blue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57 clear_LEDnofly; nofly LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 bcf LED_blue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60 toggle_LEDnofly ; nofly LED
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 btg LED_blue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64