annotate src/text_multilang.inc @ 632:0347acdf6d8e

changelog updates
author heinrichsweikamp
date Sat, 29 Feb 2020 16:57:45 +0100
parents c40025d8e750
children 4050675965ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
3 ; File text_multilang.inc combined next generation V3.0.1
0
heinrichsweikamp
parents:
diff changeset
4 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
5 ; Implementation of texts in various selectable languages
0
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
10 ; 2011-06-12 : [jDG] Creation
0
heinrichsweikamp
parents:
diff changeset
11 ;
heinrichsweikamp
parents:
diff changeset
12 ; Text definitions (text_french.asm example):
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
13 ; TCODE tYes, "Oui" ; Yes
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
14 ; TCODE tNo, "Non" ; No
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
15 ; TCODE tLogbk, "Carnet de plongées" ; Logbook
0
heinrichsweikamp
parents:
diff changeset
16 ;
heinrichsweikamp
parents:
diff changeset
17 ; Text direct usage:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
18 ; lfsr FSR1,tYes ; load a 12 bit text index
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
19 ; call strcpy_text ; copy to string buffer
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
20 ; PUTC '/' ; place a single character into the text buffer
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
21 ; lfsr FSR1,tNo
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
22 ; call strcat_text_print ; append next text and call word processor to output all text to the screen
0
heinrichsweikamp
parents:
diff changeset
23 ;
heinrichsweikamp
parents:
diff changeset
24 ; RATIONALS:
heinrichsweikamp
parents:
diff changeset
25 ; - The macro should define a label so that text files can be reordered
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
26 ; to keep consistency while adding more options (and make translator life easier).
0
heinrichsweikamp
parents:
diff changeset
27 ;
heinrichsweikamp
parents:
diff changeset
28 ; - The text positions is keept in menu blocks for the menu processor.
heinrichsweikamp
parents:
diff changeset
29 ;
heinrichsweikamp
parents:
diff changeset
30 ; - library function take text number from the FSR1 register, because a
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
31 ; lfsr instruction loads a 12 bit constant at once.
0
heinrichsweikamp
parents:
diff changeset
32 ;
heinrichsweikamp
parents:
diff changeset
33 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
34
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
35 ; Pass 1: generate a jump table and define labels
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
36 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
37 TCODE_1 macro label, text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
38 tcode_idx set tcode_idx+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
39 If LANG == 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
40 global label
0
heinrichsweikamp
parents:
diff changeset
41 label:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
42 Endif
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
43 dw t#v(LANG)_#v(tcode_idx)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
44 endm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
45
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
46
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
47 ; Pass 2: generates string table
0
heinrichsweikamp
parents:
diff changeset
48 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
49 TCODE_2 macro label, text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
50 tcode_idx set tcode_idx+1
0
heinrichsweikamp
parents:
diff changeset
51 t#v(LANG)_#v(tcode_idx):
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
52 db text, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
53 endm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
54
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
55
0
heinrichsweikamp
parents:
diff changeset
56 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
57 ; strcpy_text : copy a multiling text into string buffer
0
heinrichsweikamp
parents:
diff changeset
58 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
59 ; Input : FSR1 text index
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
60 ; Output : Buffer filled with the text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
61 ; FSR2 pointer to end of copied text (the null char)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
62 ; Trashed: WREG
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
63
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
64 extern strcpy_text
0
heinrichsweikamp
parents:
diff changeset
65
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
66
0
heinrichsweikamp
parents:
diff changeset
67 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
68 ; strcpy_text_print : same as above, but calls word processor afterward
0
heinrichsweikamp
parents:
diff changeset
69 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
70 ; Input : FSR1 text index
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
71 ; Output : Buffer filled with the text.
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
72 ; FSR2 pointer to end of copied text (the null char)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
73 ; Trashed: WREG
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
74
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
75 extern strcpy_text_print
0
heinrichsweikamp
parents:
diff changeset
76
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
77
0
heinrichsweikamp
parents:
diff changeset
78 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
79 ; strcat_text : append a multiling text to FSR2 pointer
0
heinrichsweikamp
parents:
diff changeset
80 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
81 ; Input : FSR1 text index
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
82 ; FSR2 current position (in buffer)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
83 ; Output : FSR2 pointer to end of copied text (the null char)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
84 ; Trashed: WREG
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
85
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
86 extern strcat_text
0
heinrichsweikamp
parents:
diff changeset
87
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
88
0
heinrichsweikamp
parents:
diff changeset
89 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
90 ; strcat_text_print : aame as above, but calls word processor afterward
0
heinrichsweikamp
parents:
diff changeset
91 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
92 ; Input : FSR1 text index
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
93 ; FSR2 current position (in buffer)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
94 ; Output : FSR2 pointer to end of copied text (the null char)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
95 ; Trashed: WREG
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
96
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 0
diff changeset
97 extern strcat_text_print
0
heinrichsweikamp
parents:
diff changeset
98