Mercurial > public > hwos_code
comparison src/text_multilang.inc @ 623:c40025d8e750
3.03 beta released
author | heinrichsweikamp |
---|---|
date | Mon, 03 Jun 2019 14:01:48 +0200 |
parents | ca4556fb60b9 |
children | 4050675965ea |
comparison
equal
deleted
inserted
replaced
622:02d1386429a6 | 623:c40025d8e750 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File text_multilang.inc | 3 ; File text_multilang.inc combined next generation V3.0.1 |
4 ; | 4 ; |
5 ; Implementation of texts in various selectable languages | 5 ; Implementation of texts 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 ;============================================================================= |
31 ; lfsr instruction loads a 12 bit constant at once. | 31 ; lfsr instruction loads a 12 bit constant at once. |
32 ; | 32 ; |
33 ;============================================================================= | 33 ;============================================================================= |
34 | 34 |
35 ; Pass 1: generate a jump table and define labels | 35 ; Pass 1: generate a jump table and define labels |
36 ; | |
36 TCODE_1 macro label, text | 37 TCODE_1 macro label, text |
37 tcode_idx set tcode_idx+1 | 38 tcode_idx set tcode_idx+1 |
38 If LANG == 0 | 39 If LANG == 0 |
39 global label | 40 global label |
40 label: | 41 label: |
41 Endif | 42 Endif |
42 dw t#v(LANG)_#v(tcode_idx) | 43 dw t#v(LANG)_#v(tcode_idx) |
43 endm | 44 endm |
45 | |
46 | |
47 ; Pass 2: generates string table | |
44 ; | 48 ; |
45 ; Pass 2: generates string table | |
46 TCODE_2 macro label, text | 49 TCODE_2 macro label, text |
47 tcode_idx set tcode_idx+1 | 50 tcode_idx set tcode_idx+1 |
48 t#v(LANG)_#v(tcode_idx): | 51 t#v(LANG)_#v(tcode_idx): |
49 db text, 0 | 52 db text, 0 |
50 endm | 53 endm |
51 ; | 54 |
55 | |
52 ;============================================================================= | 56 ;============================================================================= |
53 ; strcpy_text : copy a multiling text into string buffer | 57 ; strcpy_text : copy a multiling text into string buffer |
54 ; | 58 ; |
55 ; Input : FSR1 text index | 59 ; Input : FSR1 text index |
56 ; Output : Buffer filled with the text | 60 ; Output : Buffer filled with the text |
57 ; FSR2 pointer to end of copied text (the null char) | 61 ; FSR2 pointer to end of copied text (the null char) |
58 ; Trashed: WREG | 62 ; Trashed: WREG |
63 | |
59 extern strcpy_text | 64 extern strcpy_text |
65 | |
60 | 66 |
61 ;============================================================================= | 67 ;============================================================================= |
62 ; strcpy_text_print : same as above, but calls word processor afterward | 68 ; strcpy_text_print : same as above, but calls word processor afterward |
63 ; | 69 ; |
64 ; Input : FSR1 text index | 70 ; Input : FSR1 text index |
65 ; Output : Buffer filled with the text. | 71 ; Output : Buffer filled with the text. |
66 ; FSR2 pointer to end of copied text (the null char) | 72 ; FSR2 pointer to end of copied text (the null char) |
67 ; Trashed: WREG | 73 ; Trashed: WREG |
74 | |
68 extern strcpy_text_print | 75 extern strcpy_text_print |
76 | |
69 | 77 |
70 ;============================================================================= | 78 ;============================================================================= |
71 ; strcat_text : append a multiling text to FSR2 pointer | 79 ; strcat_text : append a multiling text to FSR2 pointer |
72 ; | 80 ; |
73 ; Input : FSR1 text index | 81 ; Input : FSR1 text index |
74 ; FSR2 current position (in buffer) | 82 ; FSR2 current position (in buffer) |
75 ; Output : FSR2 pointer to end of copied text (the null char) | 83 ; Output : FSR2 pointer to end of copied text (the null char) |
76 ; Trashed: WREG | 84 ; Trashed: WREG |
85 | |
77 extern strcat_text | 86 extern strcat_text |
87 | |
78 | 88 |
79 ;============================================================================= | 89 ;============================================================================= |
80 ; strcat_text_print : aame as above, but calls word processor afterward | 90 ; strcat_text_print : aame as above, but calls word processor afterward |
81 ; | 91 ; |
82 ; Input : FSR1 text index | 92 ; Input : FSR1 text index |
83 ; FSR2 current position (in buffer) | 93 ; FSR2 current position (in buffer) |
84 ; Output : FSR2 pointer to end of copied text (the null char) | 94 ; Output : FSR2 pointer to end of copied text (the null char) |
85 ; Trashed: WREG | 95 ; Trashed: WREG |
96 | |
86 extern strcat_text_print | 97 extern strcat_text_print |
87 | 98 |