annotate code_part1/OSTC_code_asm_part1/multilang_text.asm @ 226:24cd6e256d61

Better gas lookup policy, supporting unsorted list.
author JeanDo
date Fri, 04 Mar 2011 01:20:18 +0100
parents 3b5f81c06db8
children 8147c35da3ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
2 ; OSTC - diving computer code
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
4
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
8 ; (at your option) any later version.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
9
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
13 ; GNU General Public License for more details.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
14
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
17
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
18
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
19 ; hold texts and parameters for the texts
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
21 ; History:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
22 ; 2007/10/13: written
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
23 ; 2008/05/24: Last update Matthias
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
24 ; 2011/02/02: moving texts to english_text.asm to prepare multilingual.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
25 ; known bugs:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
26 ; ToDo:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
27
187
3b5f81c06db8 French Version Primer.
JeanDo
parents: 182
diff changeset
28 texts code_pack 0x15000
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
29
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
30 TCODE_1 macro x, y, text
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
31 ; Compile-time checking on provided parameters:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
32 If x<0 || x>.159
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
33 Error "Bad X coordinate ", #v(tcode_idx), x
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
34 Endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
35 If y<0 || y>.239
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
36 Error "Bad Y coordinate ", y
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
37 Endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
38 dw tcode_ptr_#v(tcode_idx)
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
39 db 0+x, 0+y
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
40 tcode_idx set tcode_idx+1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
41 endm
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
42
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
43 TCODE_2 macro x, y, text
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
44 tcode_ptr_#v(tcode_idx):
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
45 db text, 0
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
46 tcode_idx set tcode_idx+1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
47 endm
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
48
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
49 ;---- Manage language -------------------------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
50 ; Compile with ASM macro definition GERMAN=1 to use another
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
51 ; file...
182
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
52 #ifdef SPANISH
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
53 #define LANGUAGE_FILE "spanish_text.asm"
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
54 #endif
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
55 #ifdef GERMAN
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
56 #define LANGUAGE_FILE "german_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
57 #endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
58 #ifdef FRENCH
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
59 #define LANGUAGE_FILE "french_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
60 #endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
61 #ifndef LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
62 #define LANGUAGE_FILE "english_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
63 #endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
64
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
65 ;---- PASS 1 : generate description block ------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
66 text_pointer:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
67
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
68 tcode_idx set 1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
69 #define TCODE TCODE_1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
70 #include LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
71 #undefine TCODE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
72
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
73 ;---- PASS 2 : generate text contens -----------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
74 tcode_idx set 1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
75 #define TCODE TCODE_2
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
76 #include LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
77 #undefine TCODE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
78
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
79 code
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
80