Post Reply 
Displaying String on Free42 & DM42
02-04-2018, 10:30 PM (This post was last modified: 02-04-2018 10:33 PM by Bill (Smithville NJ).)
Post: #1
Displaying String on Free42 & DM42
This is a cross post that I did on the Swiss Micros Forum. I normally do not cross post, but I felt there might be some people here who might be interested in this also and who might not visit the other forum. The routines described here will also work on the Free42 but are of course limited to the smaller screen.

While the DM42 has a beautiful screen and capability to display multiple lines to it, the HP-42S programming leaves a lot to be desired in the way information can be presented to the screen.

I’ve been wondering how I was going to make use of this additional screen real estate when wawachief posted his Sudoko program demonstrating that numeric digits could be drawn on the screen. I have taken this idea further by creating some font and screen display routines.

FONTS –

Creates a 1 x 128 Matrix Table “CH” for storing the alpha characters.
Each element had the five alpha characters that are used to draw a Font Character to the screen.
Note: “CH” starts at 1 and not zero. So each Character is stored at one higher than its character code.
Label “99” is used.

DISPLAY –
Displays the Alpha Register onto the screen.
Upon entry, the Alpha Register contains the string to display and Register “P” contains a complex number which is the screen coordinate.
Labels 97 and 98 are used.
Register “00” is used for the ISG looping.
Registers 101 to 145 are used indirectly for storing the index value into the “CH” matrix array.
Note: SIZE must be set to at least 150.

I have created a sample program STRING that calls FONTS, then loops 15 times displaying the value of PI at various points on the screen.

Code:

00 { 78-Byte Prgm }
01▸LBL "STRING"
02 XEQ "FONTS"
03 2
04 STO "GrMod"
05 CLLCD
06 1.015
07 STO 01
08▸LBL 01
09 CLA
10 8
11 RCL× 01
12 7
13 -
14 ENTER
15 COMPLEX
16 STO "P"
17 "PI= "
18 RCL 01
19 2
20 ÷
21 FIX IND ST X
22 PI
23 ARCL ST X
24 XEQ "DISPLAY"
25 ISG 01
26 GTO 01
27 END

Code:

00 { 82-Byte Prgm }
01▸LBL "DISPLAY"
02 ALENG
03 X=0?
04 RTN
05 100
06 +
07 1ᴇ3
08 ÷
09 101
10 +
11 ENTER
12 STO 00
13▸LBL 97
14 ATOX
15 1
16 +
17 STO IND 00
18 R↓
19 ISG 00
20 GTO 97
21 R↓
22 STO 00
23 INDEX "CH"
24▸LBL 98
25 CLA
26 1
27 RCL IND 00
28 STOIJ
29 RCLEL
30 ARCL ST X
31 RCL "P"
32 AGRAPH
33 6
34 STO+ "P"
35 ISG 00
36 GTO 98
37 RTN
38 END


Code:

00 { 1374-Byte Prgm }
01▸LBL "FONTS"
02 1
03 128
04 NEWMAT
05 STO "CH"
06 INDEX "CH"
07 "¿¿*¿¿"
08 XEQ 99
09 ""Å¿Å""
10 XEQ 99
11 "← "
12 127
13 XTOA
14 ├"××"
15 XEQ 99
16 " @>×√"
17 XEQ 99
18 "U*U*U"
19 XEQ 99
20 "AcUIc"
21 XEQ 99
22 127
23 XTOA
24 XTOA
25 ├">Ö¿"
26 XEQ 99
27 "▒|▒|▒"
28 XEQ 99
29 "0HE@ "
30 XEQ 99
31 "PXTRQ"
32 XEQ 99
33 "→¿÷x("
34 XEQ 99
35 "QRTXP"
36 XEQ 99
37 "Å4ÖÄÅ"
38 XEQ 99
39 " p"
40 168
41 XTOA
42 ├" ?"
43 XEQ 99
44 "← ├ ←"
45 XEQ 99
46 "¿¿*Ö¿"
47 XEQ 99
48 "¿Ö*¿¿"
49 XEQ 99
50 "~  "
51 30
52 XTOA
53 ├" "
54 XEQ 99
55 "H~IA√"
56 XEQ 99
57 "÷↓[LF]↓÷"
58 XEQ 99
59 "xÄÑÄx"
60 XEQ 99
61 "|[LF]μ"}"
62 XEQ 99
63 "|°£°|"
64 XEQ 99
65 "`PXdB"
66 XEQ 99
67 ">**"÷"
68 XEQ 99
69 "~≤├IA"
70 XEQ 99
71 "`÷`÷`"
72 XEQ 99
73 "•ÑqPP"
74 XEQ 99
75 "<CBC<"
76 XEQ 99
77 "<A@A<"
78 XEQ 99
79 "U*U*U"
80 XEQ 99
81 "<<<<<"
82 XEQ 99
83 "÷÷÷÷÷"
84 XEQ 99
85 "÷÷_÷÷"
86 XEQ 99
87 "÷π÷π÷"
88 XEQ 99
89 "Å├Å├Å"
90 XEQ 99
91 "$*├*£"
92 XEQ 99
93 "#°¿db"
94 XEQ 99
95 "6IV P"
96 XEQ 99
97 "÷÷π÷÷"
98 XEQ 99
99 "÷Ö"A÷"
100 XEQ 99
101 "÷A"Ö÷"
102 XEQ 99
103 "¿*Ö*¿"
104 XEQ 99
105 "¿¿>¿¿"
106 XEQ 99
107 "÷"
108 176
109 XTOA
110 ├"p÷÷"
111 XEQ 99
112 "¿¿¿¿÷"
113 XEQ 99
114 "÷``÷÷"
115 XEQ 99
116 " ←¿▒√"
117 XEQ 99
118 ">QIE>"
119 XEQ 99
120 "÷B├@÷"
121 XEQ 99
122 "bQIIF"
123 XEQ 99
124 ""III6"
125 XEQ 99
126 "ᴇÅ£├←"
127 XEQ 99
128 "'EEE9"
129 XEQ 99
130 "<JII0"
131 XEQ 99
132 "×q≤Σ∫"
133 XEQ 99
134 "6III6"
135 XEQ 99
136 6
137 XTOA
138 ├"II)"
139 30
140 XTOA
141 XEQ 99
142 "÷66÷÷"
143 XEQ 99
144 "÷"
145 182
146 XTOA
147 ├"v÷÷"
148 XEQ 99
149 "¿Å"A÷"
150 XEQ 99
151 "ÅÅÅÅÅ"
152 XEQ 99
153 "A"Å¿÷"
154 XEQ 99
155 "√×Q≤▸"
156 XEQ 99
157 ">A]U↑"
158 XEQ 99
159 "~≤≤≤~"
160 XEQ 99
161 127
162 XTOA
163 ├"III6"
164 XEQ 99
165 ">AAA""
166 XEQ 99
167 127
168 XTOA
169 ├"AA"Ö"
170 XEQ 99
171 127
172 XTOA
173 ├"IIIA"
174 XEQ 99
175 127
176 XTOA
177 ├"≤≤≤×"
178 XEQ 99
179 ">AAQr"
180 XEQ 99
181 127
182 XTOA
183 ├"¿¿¿"
184 127
185 XTOA
186 XEQ 99
187 "÷A├A÷"
188 XEQ 99
189 "0@@@?"
190 XEQ 99
191 127
192 XTOA
193 ├"¿Å"A"
194 XEQ 99
195 127
196 XTOA
197 ├"@@@@"
198 XEQ 99
199 127
200 XTOA
201 ├"√≠√├"
202 XEQ 99
203 127
204 XTOA
205 ├"▒¿←├"
206 XEQ 99
207 ">AAA>"
208 XEQ 99
209 127
210 XTOA
211 ├"≤≤≤▸"
212 XEQ 99
213 ">AQ!↑"
214 XEQ 99
215 127
216 XTOA
217 ├"≤Æ)F"
218 XEQ 99
219 "&III2"
220 XEQ 99
221 "××├××"
222 XEQ 99
223 "?@@@?"
224 XEQ 99
225 "πᴇ`ᴇπ"
226 XEQ 99
227 127
228 XTOA
229 ├" ᴇ ├"
230 XEQ 99
231 "cÅ¿Åc"
232 XEQ 99
233 "∫▒x▒∫"
234 XEQ 99
235 "aQIEC"
236 XEQ 99
237 "÷├AA÷"
238 XEQ 99
239 "√▒¿← "
240 XEQ 99
241 "÷AA├÷"
242 XEQ 99
243 "▒√├√▒"
244 XEQ 99
245 128
246 XTOA
247 XTOA
248 XTOA
249 XTOA
250 XTOA
251 XEQ 99
252 "÷∫▒÷÷"
253 XEQ 99
254 " TTTx"
255 XEQ 99
256 127
257 XTOA
258 ├"DDD8"
259 XEQ 99
260 "8DDDD"
261 XEQ 99
262 "8DDD├"
263 XEQ 99
264 "8TTTX"
265 XEQ 99
266 "÷¿~≤√"
267 XEQ 99
268 "ᴇ"
269 164
270 XTOA
271 XTOA
272 XTOA
273 ├"x"
274 XEQ 99
275 127
276 XTOA
277 ├"▒▒▒x"
278 XEQ 99
279 "÷D}@÷"
280 XEQ 99
281 "÷@"
282 128
283 XTOA
284 132
285 XTOA
286 ├"}"
287 XEQ 99
288 127
289 XTOA
290 ├"←(D÷"
291 XEQ 99
292 "÷A├@÷"
293 XEQ 99
294 "|▒8▒|"
295 XEQ 99
296 "|▒▒▒x"
297 XEQ 99
298 "8DDD8"
299 XEQ 99
300 252
301 XTOA
302 ├"$$$ᴇ"
303 XEQ 99
304 "ᴇ$$$"
305 252
306 XTOA
307 XEQ 99
308 "|¿▒▒▒"
309 XEQ 99
310 "HTTT$"
311 XEQ 99
312 "÷▒?D "
313 XEQ 99
314 "<@@@|"
315 XEQ 99
316 "Ö @ Ö"
317 XEQ 99
318 "<@0@<"
319 XEQ 99
320 "D(←(D"
321 XEQ 99
322 "Ö   |"
323 XEQ 99
324 "DdTLD"
325 XEQ 99
326 "¿6AA÷"
327 XEQ 99
328 "÷÷├÷÷"
329 XEQ 99
330 "÷AA6¿"
331 XEQ 99
332 "¿▒¿←¿"
333 XEQ 99
334 127
335 XTOA
336 ├"¿¿¿¿"
337▸LBL 99
338 ASTO ST X
339 STOEL
340 J+
341 CLA
342 RTN
343 END


NOTE: I used the DM42 decoder/encoder page to directly edit the byte codes for where the "append" character was in the string. I may also have edited other bytes (can't remember which ones) for some of the other special characters.

Attachment includes RAW files for FONTS, DISPLAY & STRING, plus PDF of Source with comments.


.bmp  SCREEN.bmp (Size: 12.31 KB / Downloads: 130)

I would appreciate any comments, corrections, suggestions that you may have.

I would also like to thank Thomas Okken for making FREE42 and sharing the source code where I obtained the Character Code font data: bigchars.

Bill
Smithville, NJ


Attached File(s)
.zip  S.zip (Size: 307.99 KB / Downloads: 48)
Find all posts by this user
Quote this message in a reply
02-06-2018, 02:55 AM
Post: #2
RE: Displaying String on Free42 & DM42
Bill,

Great work! A couple of possibly stupid questions.

Once you have a font matrix on the 42 do you need the 'Fonts' program installed or is it only used to create the matrix?

Does this have to take over the entire screen? Probably not possible but I would love it if you could set the DM42 display to the default X Y or X Menu used by the HP42S and use the upper part of the display for information and status display for the programs you create.

Either way this is an interesting bridge giving more control of the display similar to the HP48.

Ken
Find all posts by this user
Quote this message in a reply
02-06-2018, 09:58 PM
Post: #3
RE: Displaying String on Free42 & DM42
(02-06-2018 02:55 AM)Ken S Wrote:  Bill,

Great work! A couple of possibly stupid questions.

Once you have a font matrix on the 42 do you need the 'Fonts' program installed or is it only used to create the matrix?

Does this have to take over the entire screen? Probably not possible but I would love it if you could set the DM42 display to the default X Y or X Menu used by the HP42S and use the upper part of the display for information and status display for the programs you create.

Either way this is an interesting bridge giving more control of the display similar to the HP48.

Ken


Hi Ken,

FONTS is run to create and fill the Matrix with data. Once run, it would not need to be run again, unless you cleared the Matrix variable or did a clear all.

It appears to take over the entire screen. But I haven't really played with it enough to know if there are settings that change that behavior.

Like you, I was looking for a way to more conveniently display multiple results on the screen, instead of doing r/s to see each result or recalling registers to review results.

I'm looking at incorporating the smallchar fonts from the Free42 code. this would allow for subscripts, etc. So it might be possible to say "X2=" where the 2 would subscripted.

Bill
Smithville, NJ
Find all posts by this user
Quote this message in a reply
02-07-2018, 02:13 AM
Post: #4
RE: Displaying String on Free42 & DM42
Bill,

I would really love to be able to use something like this while still having access to the custom program menu keys and the X register. Maybe a new display setting which emulates the original HP42S dispay exactly leaving everything above the display for custom information created by your program.

Something which Swiss Micros would probably have to do, I don't believe Thomas Okken had anything to do with the programming for the large display since his emulator does display exactly as the 42s does.

I will try to experiment with this when I have a bit more time and see what the limitations are.

Thanks again for your work on this,

Ken
Find all posts by this user
Quote this message in a reply
02-13-2018, 02:48 AM (This post was last modified: 02-13-2018 02:51 AM by Bill (Smithville NJ).)
Post: #5
RE: Displaying String on Free42 & DM42
I have updated the routines to now include both "Big Char" and "Small Char" fonts as specified in Free42.
I have also changed the way the programs interface. So if you have previously tried these, please download these and review the changes below.
There are two routines:

FONTS.raw: Creates 2 x 128 Matrix "CHARS" for storing alpha characters. Row 1 contains "Big Chars", Row 2 contains "Small Chars"

FONTS just needs to be run once. As long as Matrix "CHARS" remains in memory, no need to rerun.

DISPLAY.RAW: Displays the Alpha Register on the screen at a specific location

Upon entry to DISPLAY, the Alpha Register contains the string to display, and X and Y registers contains screen coordinates, X=Row, Y=Column

The calling program should initialize FONTS (if needed), put a string in the Alpha Register and the screen coordinates into X & Y.

The Display routine includes the ability to switch back and forth between the two Char sizes and to display subscripts and superscripts. The ARROW characters are used as "Mode Change" characters. Just place an Arrow Character in the Alpha String where you wish to switch modes.

Modes are as follows:
Left Arrow - Switch to "Small Chars"
Right Arrow - Switch to "Big Chars"
Up Arrow - Switch to Superscript
Down Arrow - Switch to Subscript

To display the arrows in lieu of doing a mode switch, then put two of them in sequence. Fir example, two Left Arrows in a row would print the Left Arrow on the screen in lieu of switching to "Small Chars".

NOTE 1: DISPLAY ALWAYS starts out in "Big Chars".
NOTE 2: DISPLAY includes a "SIZE 150" command. If your calling program requires a larger SIZE, then you need to change this.
NOTE 3: DISPLAY uses Register 97-99 and 101 - 145.

The attached ZIP file contains FONTS.raw, DISPLAY.raw, S1.raw and S2.raw plus screen images for S1 and S2.

S1 is a sample program that displays both "Big Chars" & "Small Chars" on the screen for comparison purposes.
S2 is a sample program that demonstrates subscripts and superscripts.

Attached file XLS.zip includes excel program listings with my comments.

I would appreciate any comments, suggestions, recommendations that you may have.
There has been no attempt to preserve the Stack. Likewise there are no tricky stack manipulations.

Bill
Smithville, NJ


.zip  Fonts-Display-S1-S2.zip (Size: 4.07 KB / Downloads: 33)


.zip  xls.zip (Size: 47.34 KB / Downloads: 25)
Find all posts by this user
Quote this message in a reply
03-26-2018, 12:18 AM
Post: #6
RE: Displaying String on Free42 & DM42
(02-04-2018 10:30 PM)Bill (Smithville NJ) Wrote:  This is a cross post that I did on the Swiss Micros Forum. I normally do not cross post, but I felt there might be some people here who might be interested in this also and who might not visit the other forum. The routines described here will also work on the Free42 but are of course limited to the smaller screen.

While the DM42 has a beautiful screen and capability to display multiple lines to it, the HP-42S programming leaves a lot to be desired in the way information can be presented to the screen.
......

I have created a sample program STRING that calls FONTS, then loops 15 times displaying the value of PI at various points on the screen
Bill
Smithville, NJ

Hi Bill....very nice! I downloaded your program files, that displayed Pi, and ran it on my DM42. This is exactly what this large screen was destined to do! Now I'm off to play around with your other files to examine the display manipulation possibilities. Thanks!
Jim J.
Find all posts by this user
Quote this message in a reply
03-29-2018, 09:58 AM
Post: #7
RE: Displaying String on Free42 & DM42
Hi Bill,
nice & thanks already for the huge effort in creating the FONTS program.
As a suggestion, I'd have 5 control characters: the 4 arrows and an 'escape' character to indicate that the following character is to be drawn, not interpreted, eg a quote. That way, there's no need to 'remember' the previous character.
Also, (I'm rewriting DISPLAY for my own needs ;-), I use a matrix "CTRL" of control characters. To then determine whether the current char is a control character, I use
[FIND], which verifies all of them in a single command. RCLIJ GTO IND ST X or Y can be used to branch to the specific control character code. If it's not found, [FIND] will skip the next instruction (should've been called [FIND?] instead).

Thanks, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
03-29-2018, 11:04 PM
Post: #8
RE: Displaying String on Free42 & DM42
(03-29-2018 09:58 AM)Werner Wrote:  Hi Bill,
nice & thanks already for the huge effort in creating the FONTS program.
As a suggestion, I'd have 5 control characters: the 4 arrows and an 'escape' character to indicate that the following character is to be drawn, not interpreted, eg a quote. That way, there's no need to 'remember' the previous character.
Also, (I'm rewriting DISPLAY for my own needs ;-), I use a matrix "CTRL" of control characters. To then determine whether the current char is a control character, I use
[FIND], which verifies all of them in a single command. RCLIJ GTO IND ST X or Y can be used to branch to the specific control character code. If it's not found, [FIND] will skip the next instruction (should've been called [FIND?] instead).

Thanks, Werner

Hi Werner,

Thanks for the suggestions.
I had thought of using an "escape" character, but since I wished to be able to print all characters, didn't want to give up a character code. Which "escape" character do you have in mind to use?

Using a Matrix to store the control codes sounds interesting. I'm not that familiar with the Matrix FIND function. I'd be interested in seeing your final version of the code.

Thanks,

Bill
Smithville, NJ
Find all posts by this user
Quote this message in a reply
03-30-2018, 07:04 AM
Post: #9
RE: Displaying String on Free42 & DM42
(03-29-2018 11:04 PM)Bill (Smithville NJ) Wrote:  I had thought of using an "escape" character, but since I wished to be able to print all characters, didn't want to give up a character code. Which "escape" character do you have in mind to use?

I thought of using a quote - to draw a quote you would then use two quotes of course, so you don't 'give up' any character.

(03-29-2018 11:04 PM)Bill (Smithville NJ) Wrote:  I'd be interested in seeing your final version of the code.

I'd better get on with it, then ;-)

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
04-05-2018, 02:00 PM
Post: #10
RE: Displaying String on Free42 & DM42
My version, or, my first working version ;-)
Changes wrt. Bill's:
- 128x2 matrix that holds the fonts is called FONTS. It is the transpose of Bill's CHARS.
- escape char ' to indicate the next char is to be drawn
- 5x1 matrix CTRL of control characters 14,15,16,94,39. To be created manually.
- last char is always drawn
- REGS is not used
- 2 entries, one for double wide/high chars. Can be used to draw extra large text in 200x120, or normal text in 400x240. Or for a really big font on the 42S ;-)

I also changed the name to DISPXY, to not interfere with your DISPLAY, but also because I was thinking along the lines of adding DISP that simply outputs text on a certain line, like on the 48/49/50.

Code:
 { 295-Byte Prgm }
>LBL "DSP2XY"
 2
 GTO 00
>LBL "DISPXY"
 1
>LBL 00
 ALENG
 X=0?
 RTN         ( quick return when nothing to do )
 X<>Y
 STO ".D"     ( multiplication factor )
 SIGN
 STO ".S"     ( font size, 1=large, 2=small )
 DIM ".C"
 Rv
 Rv
 COMPLEX
 STO ".P"
 INDEX ".C"
>LBL 12     ( create a matrix of char codes )
 ATOX
 ->
 FC? 77
 GTO 12
 SF 25
>LBL 90
 INDEX ".C"
 RCLEL
 DELR
 FC? 25     ( last char is always drawn )
 GTO 00
 INDEX "CTRL"
 [FIND]
 GTO IND ST X     ( control chars )
 GTO 00
>LBL 15     ( large font )
>LBL 16     ( small font )
 14
 -
 STO ".S"
 GTO 90
>LBL 94     ( superscript )
 +/-
>LBL 14     ( subscript )
 SIGN
 5
 RCL- ".S"     ( 3 or 4 depending on font size )
 *         ( up or down )
 RCL× ".D"
 0
 X<>Y
 COMPLEX
 STO+ ".P"
 GTO 90
>LBL 39     ( draw next char )
 INDEX ".C"
 RCLEL
 DELR
>LBL 00     ( draw char in X )
 INDEX "FONTS"
 1
 +
 RCL ".S"
 STOIJ
 RCLEL
 XTOA
 GTO IND ".D"
>LBL 02     ( double width and height )
 ALENG
 STO+ ST X
 1
 NEWMAT
 EDIT         ( X: 0 )
>LBL 04     ( loop over all characters )
 ATOX
 7
>LBL 03
 4
 R^
 *
 STO ST T
 Rv
 BIT?
 ISG ST Z
 LBL 03
 DSE ST X
 X=0?
 X=0?
 GTO 03
 3
 R^
 *
 ENTER
 ->
 Rv
 ->
 FC? 77
 GTO 04
 EXITALL
 256
 /
 ENTER
 IP
 XTOA
 0
 8
 COMPLEX
 RCL+ ".P"
 AGRAPH
 R^
 FP
 256
 *
 CLA
 XTOA
>LBL 01
 RCL ".P"
 AGRAPH
 ALENG         ( adjust Position )
 RCL+ ".D"
 STO+ ".P"
 CLA
 FS? 25
 GTO 90
 EXITALL 
 CLV ".P"
 CLV ".S"
 CLV ".C"
 CLV ".D"
 END

Cheers, Werner


Attached File(s)
.zip  DISPXY.zip (Size: 430 bytes / Downloads: 10)

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
04-05-2018, 09:05 PM
Post: #11
RE: Displaying String on Free42 & DM42
(04-05-2018 02:00 PM)Werner Wrote:  My version, or, my first working version ;-)
Cheers, Werner

Hi Werner,

I'm having some trouble getting it work. Could you post a zip file with all the routines plus a sample program that uses them.

Thanks,

Bill
Smithville, NJ
Find all posts by this user
Quote this message in a reply
04-06-2018, 07:02 AM
Post: #12
RE: Displaying String on Free42 & DM42
Hello Bill,
from having your matrix CHARS in memory do the following two things:

Code:
RCL "CHARS"
TRANS
STO "FONTS"

and

Code:
5
ENTER
1
NEWMAT
EDIT
14
->
15
->
16
->
94
->
39
->
EXITALL
STO "CTRL"

Then it will work. The reason it doesn't is probably because you don't have the matrix "CTRL", and since I use flag 25 it doesn't error out on not finding it.

As for examples, yours work perfectly, all you need to do is to replace the calls to DISPLAY by DISPXY. And to replace the doubling of the control characters by preceding them with a quote.
Of course, just specifying 3 for the GrMod and calling DSP2XY doesn't show well, as the coordinates are hardcoded for single-spaced fonts. That's where DISP (with lines) would come in. I'll try and add that in and a few examples as well.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
04-06-2018, 03:34 PM
Post: #13
RE: Displaying String on Free42 & DM42
Hi Werner,

Made the changes and it works great.

Now to study the code to see how it works.
I had looked at doubling the font size but wasn't quite sure how to approach it. I'll have to see how you did it.

Thanks for the update.

Bill
Smithville, NJ
Find all posts by this user
Quote this message in a reply
04-07-2018, 09:07 AM
Post: #14
RE: Displaying String on Free42 & DM42
Hi Bill.
To double the font's width and height, each pixel has to become a block of 4 pixels.
Horizontally, that is simple: just draw the character twice. Vertically, however, it amounts to converting eg 53 = 110101b to 111100110011b or 3891.
No need to figure out how I did in in the routine I posted as I found a faster, shorter and easier way (triple win!):

Code:
 128
 /
 7
 X<>Y
>LBL 03
 IP
 RCL+ ST L
 STO+ ST X
 DSE ST Y
 GTO 03
 3
 *

The loop is used to space the bits apart, and the 3 * doubles them.
DSP2XY is still quite slow though.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 6 Guest(s)