annotate src/strings.asm @ 647:357341239438

Merge
author heinrichs weikamp
date Thu, 14 Oct 2021 12:04:12 +0200
parents 4050675965ea
children 75e90cd0c2c3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
3 ; File strings.asm * combined next generation V3.09.4l
0
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Implementation code various string functions.
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: 560
diff changeset
10 ; 2010-12-02 : [jDG] Creation
0
heinrichsweikamp
parents:
diff changeset
11 ;
heinrichsweikamp
parents:
diff changeset
12 ; See strings.inc for doc and public calling macros.
heinrichsweikamp
parents:
diff changeset
13
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 251
diff changeset
14 #include "hwos.inc"
0
heinrichsweikamp
parents:
diff changeset
15 #include "varargs.inc"
heinrichsweikamp
parents:
diff changeset
16
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
17 extern aa_wordprocessor
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
18 extern text_1_base
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
19 extern text_1_text
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
20
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
21 IF _language_2 != none
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
22 extern text_2_base
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
23 extern text_2_text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
24 ENDIF
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
25
0
heinrichsweikamp
parents:
diff changeset
26
heinrichsweikamp
parents:
diff changeset
27 ;=============================================================================
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
28 strings CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
29 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
30
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
31 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
32 ; to be used via Macro: Variants that call the Word Processor at the end
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
33 ;-----------------------------------------------------------------------------
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
34
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
35 global strcpy_block_print
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
36 global strcat_block_print
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
37 strcpy_block_print:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
38 lfsr FSR2,buffer ; load pointer to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
39 strcat_block_print:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
40 bsf aa_aux_flag ; call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
41 bra strings_com_block_VARARG; continue with common part for VARARGS PROM texts
0
heinrichsweikamp
parents:
diff changeset
42
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
43
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
44 global strcpy_text_print
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
45 global strcat_text_print
0
heinrichsweikamp
parents:
diff changeset
46 strcpy_text_print:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
47 lfsr FSR2,buffer ; load pointer to buffer
0
heinrichsweikamp
parents:
diff changeset
48 strcat_text_print:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
49 bsf aa_aux_flag ; call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
50 bra strings_com_text_VARARG ; continue with common part for VARARGS multi-lingual texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
51
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
52
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
53 global putc_print
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
54 global print
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
55 putc_print:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
56 movwf POSTINC2 ; append the character to the string
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
57 print:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
58 bsf aa_aux_flag ; call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
59 bra strings_common_term ; append string terminator
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
60
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
61
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
62 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
63 ; to be used via Macro: Variants that do not call the Word Processor at end
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
64 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
65
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
66 global strcpy_block
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
67 global strcat_block
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
68 strcpy_block:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
69 lfsr FSR2,buffer ; load pointer to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
70 strcat_block:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
71 bcf aa_aux_flag ; do not call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
72 bra strings_com_block_VARARG; continue with common part for VARARGS PROM texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
73
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
74
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
75 global strcpy_text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
76 global strcat_text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
77 strcpy_text:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
78 lfsr FSR2,buffer ; load pointer to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
79 strcat_text:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
80 bcf aa_aux_flag ; do not call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
81 bra strings_com_text_VARARG ; continue with common part for VARARGS multi-lingual texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
82
0
heinrichsweikamp
parents:
diff changeset
83
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
84 global strcpy_text_FSR
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
85 global strcat_text_FSR
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
86 strcpy_text_FSR:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
87 lfsr FSR2,buffer ; load pointer to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
88 strcat_text_FSR:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
89 bcf aa_aux_flag ; do not call Word Processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
90 bra strings_com_text_FSR ; continue with common part for FSR multi-lingual texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
91
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
92
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
93 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
94 ; Common Parts for all above Functions
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
95 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
96
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
97 strings_com_block_VARARG:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
98 VARARGS_BEGIN
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
99 rcall strcat_prom ; append text to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
100 VARARGS_ALIGN ; word-align the table pointer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
101 VARARGS_END
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
102 bra strings_common_term ; continue with common part for all texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
103
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
104 strings_com_text_VARARG:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
105 VARARGS_BEGIN
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
106 rcall text_get_fsr ; get pointer to multi-lingual text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
107 VARARGS_END
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
108 ;bra strings_com_text_FSR ; continue with common part for FSR multi-lingual texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
109
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
110 strings_com_text_FSR:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
111 rcall text_get_tblptr ; get pointer to translated text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
112 rcall strcat_prom ; append text to buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
113 ;bra strings_common_term ; continue with common part for all texts
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
114
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
115 strings_common_term:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
116 clrf INDF2 ; append string terminator
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
117 btfss aa_aux_flag ; shall call the Word Processor?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
118 return ; NO - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
119 goto aa_wordprocessor ; YES - dump buffer to screen and return
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
120
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
121
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
122 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
123 ; Helper Function - get Pointer to multi-lingual Text into FSR1
0
heinrichsweikamp
parents:
diff changeset
124 ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
125 text_get_fsr:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
126 tblrd*+ ; get pointer, low byte
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
127 movff TABLAT,FSR1L ; store in FSR1L
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
128 tblrd*+ ; get pointer, low byte
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
129 movff TABLAT,FSR1H ; store in FSR1H
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
130 return ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
131
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
132
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
133 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
134 ; Helper Function - get Pointer to translated Text into TBLPTR
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
135 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
136 ; Input: FSR1 = pointer to multi-lingual text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
137 ; opt_language = selected language
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
138 ; Output: TBLPTR = 24 bit PROM address 0x09000 / 0x09400 -> problem
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
139 ; 0x07000 / 0x07400 -> ok
0
heinrichsweikamp
parents:
diff changeset
140 text_get_tblptr:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
141 ; load TBLPTR with the index address of the selected text, expanded from 12 to 24 bit
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
142 movlw UPPER(text_1_base) ; get address, upper byte = 0x00 of index base
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
143 movwf TBLPTRU ; set TBLPTR, upper byte to 0x00
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
144 movlw HIGH(text_1_base) ; get address, high byte = 0x90 of index base
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
145 iorwf FSR1H,W ; add address, high byte = 0x0H from FSR1H
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
146 movwf TBLPTRH ; set TBLPTR, high byte to 0x9H
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
147 movff FSR1L,TBLPTRL ; set TBLPTR, low byte to 0xLL from FSR1L
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 448
diff changeset
148
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
149 IF _language_2 != none
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
150 ; adjust the index address in case language 2 is selected
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
151 movff opt_language,WREG ; get language selection
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
152 tstfsz WREG ; language 2 selected ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
153 bsf TBLPTRH,2 ; YES - add offset (0x00400) between the index tables
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
154 ENDIF
0
heinrichsweikamp
parents:
diff changeset
155
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
156 ; read the address of the translated text in 16 bit format
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
157 tblrd*+ ; read low byte and buffer it in WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
158 movff TABLAT,WREG ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
159 tblrd*+ ; read high byte and keep it in TABLAT
0
heinrichsweikamp
parents:
diff changeset
160
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
161 ; load TBLPTR with the address of the translated text expanded to 24 bit
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
162 movff WREG, TBLPTRL ; set TBLPTR, low byte
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
163 movlw UPPER(text_1_text) ; get address, upper byte of text table
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
164 IF _language_2 != none
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
165 btfsc TBLPTRH,2 ; using language 2?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
166 movlw UPPER(text_2_text) ; YES - get upper address of language 2
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
167 ENDIF
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
168 movwf TBLPTRU ; set TBLPTR, upper byte
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
169 movff TABLAT,TBLPTRH ; set TBLPTR, high byte
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
170
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
171 return ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
172
0
heinrichsweikamp
parents:
diff changeset
173
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
174 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
175 ; Helper Function - append a null-terminated String from TBLPTR to Buffer
0
heinrichsweikamp
parents:
diff changeset
176 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
177 ; Input: TBLPTR : string pointer into PROM
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
178 ; FRS2 : current character position
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
179 ; Output: string in buffer, FSR2 pointing to the closing null byte
0
heinrichsweikamp
parents:
diff changeset
180 ;
heinrichsweikamp
parents:
diff changeset
181 strcat_prom:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
182 tblrd*+ ; read one character from PROM
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
183 movf TABLAT,W ; copy character to WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
184 movwf POSTINC2 ; copy from WREG to buffer and increment buffer pointer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
185 ; was character = NULL ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
186 bnz strcat_prom ; NO - loop
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
187 movf POSTDEC2,W ; YES - dummy read to step back buffer pointer by 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
188 return ; - done
0
heinrichsweikamp
parents:
diff changeset
189
heinrichsweikamp
parents:
diff changeset
190
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
191 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
192 ; to by used via Macro: set Font Size and Output Position in one Batch
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
193 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
194 global start_tiny_block
0
heinrichsweikamp
parents:
diff changeset
195 start_tiny_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
196 movlw .0 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
197 bra start_block_common ; start block
0
heinrichsweikamp
parents:
diff changeset
198
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
199 global start_small_block
0
heinrichsweikamp
parents:
diff changeset
200 start_small_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
201 movlw .1 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
202 bra start_block_common ; start block
0
heinrichsweikamp
parents:
diff changeset
203
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
204 global start_std_block
0
heinrichsweikamp
parents:
diff changeset
205 start_std_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
206 movlw .2 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
207 bra start_block_common ; start block
0
heinrichsweikamp
parents:
diff changeset
208
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
209 global start_medium_block
0
heinrichsweikamp
parents:
diff changeset
210 start_medium_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
211 movlw .3 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
212 bra start_block_common ; start block
0
heinrichsweikamp
parents:
diff changeset
213
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
214 global start_large_block
0
heinrichsweikamp
parents:
diff changeset
215 start_large_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
216 movlw .4 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
217 bra start_block_common ; start block
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
218
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
219 global start_huge_block
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
220 start_huge_block:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
221 movlw .5 ; set size encoding
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
222 ;bra start_block_common ; start block
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
223
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
224 start_block_common:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
225 movff WREG,font_size ; needs a bank-safe move here! (TODO: why?)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
226
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
227 VARARGS_BEGIN
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
228 VARARGS_GET8 win_leftx2 ; get horizontal position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
229 VARARGS_GET8 win_top ; get vertical position
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
230 VARARGS_END
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
231
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
232 lfsr FSR2,buffer ; initialize output buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
233 return ; done
0
heinrichsweikamp
parents:
diff changeset
234
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
235 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
236
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 628
diff changeset
237 END