Mercurial > public > hwos_code
comparison src/text_multilang.asm @ 634:4050675965ea
3.10 stable release
author | heinrichsweikamp |
---|---|
date | Tue, 28 Apr 2020 17:34:31 +0200 |
parents | c40025d8e750 |
children | 9a64914a8fca |
comparison
equal
deleted
inserted
replaced
633:690c48db7b5b | 634:4050675965ea |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File text_multilang.asm combined next generation V3.0.4 | 3 ; File text_multilang.asm * combined next generation V3.09.4k |
4 ; | 4 ; |
5 ; Implementation text in various selectable languages. | 5 ; Implementation text in various selectable languages. |
6 ; | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
8 ;============================================================================= | 8 ;============================================================================= |
10 ; 2011-06-12 : [jDG] Creation | 10 ; 2011-06-12 : [jDG] Creation |
11 | 11 |
12 #include "hwos.inc" | 12 #include "hwos.inc" |
13 #include "text_multilang.inc" | 13 #include "text_multilang.inc" |
14 | 14 |
15 ; Because text are indexed by 12 bits values in FSR register, they can't | 15 |
16 ; just be anywhere. It is safe to make them start at address 0xHHH000. | 16 ; Because multi-lingual texts are indexed using a FSR register and a FSR |
17 texts code 0x009000 | 17 ; register only holds 12 bit, the texts need to be aligned to a 4 kB block |
18 ; in program memory. That is, they need to start at an address 0xXX000. | |
19 | |
20 | |
21 | |
22 ; fast hack **ONLY** for **CHANGING** languages ( en / de / fr / it ) | |
23 | |
24 #undefine _language_1 | |
25 #define _language_1 fr | |
26 ; | |
27 #undefine _language_2 | |
28 #define _language_2 it | |
29 | |
30 | |
31 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
32 ; LANGUAGE 1 | |
33 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
34 | |
18 | 35 |
19 ;============================================================================= | 36 ;============================================================================= |
37 text_1_base CODE 0x09000 ; ! DO NOT CHANGE ! *** Index Table *** | |
38 ;============================================================================= | |
39 | |
20 global text_1_base | 40 global text_1_base |
21 text_1_base: | 41 text_1_base: |
22 ;---- PASS 1 : generate description block ------------------------------------ | 42 |
23 tcode_idx set 0 | 43 tcode_idx set 0 |
24 LANG set 0 | 44 LANG set 0 |
25 #define TCODE TCODE_1 | 45 #define TCODE TCODE_1 |
26 | 46 |
27 IF _language_1==en | 47 IF _language_1==en |
47 ENDIF | 67 ENDIF |
48 ENDIF | 68 ENDIF |
49 | 69 |
50 #undefine TCODE | 70 #undefine TCODE |
51 | 71 |
52 ;---- PASS 2 : generate text contents ---------------------------------------- | 72 |
73 ;============================================================================= | |
74 text_1_text CODE_PACK ; *** Text Table *** | |
75 ;============================================================================= | |
76 | |
77 global text_1_text | |
78 text_1_text: | |
79 | |
53 tcode_idx set 0 | 80 tcode_idx set 0 |
54 #define TCODE TCODE_2 | 81 #define TCODE TCODE_2 |
55 | 82 |
56 IF _language_1==en | 83 IF _language_1==en |
57 #include "text_english.inc" | 84 #include "text_english.inc" |
71 ENDIF | 98 ENDIF |
72 ENDIF | 99 ENDIF |
73 | 100 |
74 #undefine TCODE | 101 #undefine TCODE |
75 | 102 |
103 | |
104 | |
105 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
106 ; LANGUAGE 2 | |
107 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
108 | |
109 IF _language_2 != none | |
110 | |
111 | |
76 ;============================================================================= | 112 ;============================================================================= |
77 | 113 text_2_base CODE 0x09400 ; ! DO NOT CHANGE ! *** Index Table *** |
78 IF _language_2!=none | 114 ;============================================================================= |
79 | 115 |
80 global text_2_base | 116 global text_2_base |
81 text_2_base: | 117 text_2_base: |
82 ;---- PASS 1 : generate description block ------------------------------------ | 118 |
83 tcode_idx set 0 | 119 tcode_idx set 0 |
84 LANG set 1 | 120 LANG set 1 |
85 #define TCODE TCODE_1 | 121 #define TCODE TCODE_1 |
86 | 122 |
87 IF _language_2==en | 123 IF _language_2==en |
107 ENDIF | 143 ENDIF |
108 ENDIF | 144 ENDIF |
109 | 145 |
110 #undefine TCODE | 146 #undefine TCODE |
111 | 147 |
112 ;---- PASS 2 : generate text contents ---------------------------------------- | 148 |
149 ;============================================================================= | |
150 text_2_text CODE_PACK ; *** Text Table *** | |
151 ;============================================================================= | |
152 | |
153 global text_2_text | |
154 text_2_text: | |
155 | |
113 tcode_idx set 0 | 156 tcode_idx set 0 |
114 #define TCODE TCODE_2 | 157 #define TCODE TCODE_2 |
115 | 158 |
116 IF _language_2==en | 159 IF _language_2==en |
117 #include "text_english.inc" | 160 #include "text_english.inc" |
131 ENDIF | 174 ENDIF |
132 ENDIF | 175 ENDIF |
133 | 176 |
134 #undefine TCODE | 177 #undefine TCODE |
135 | 178 |
136 ENDIF | 179 ENDIF ; _language_2 |
137 | 180 |
138 ;============================================================================= | 181 ;----------------------------------------------------------------------------- |
139 | 182 |
140 END | 183 END |