Hi,
is there a way to get the "L/F" (linefeed) symbol into a string without actually "executing" the linefeed?
Cheers!
Meino
Getting the L/F-symbol into a string ?
Getting the L/F-symbol into a string ?
DM 42 - SN: 00373, Firmware release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
-
- Posts: 1107
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: Getting the L/F-symbol into a string ?
Indeed there is; it's character 138. This is not in the ALPHA menu, so you have to do 138 XTOA.
Re: Getting the L/F-symbol into a string ?
? But it is under PUNC, 2nd page.
Werner
Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L
Re: Getting the L/F-symbol into a string ?
I think the question was for programs, in which case I understand that the LF character from the alpha menu executes a line feed when the string is viewed through AVIEW. Otherwise presumably the poster would have found LF in the alpha menu as well?
Sam
Re: Getting the L/F-symbol into a string ?
As usual, I should learn that when Thomas posts something, I had better think twice...
Indeed, the 138 XTOA char does not show a linefeed when AVIEW'd, while char 10 (the one from the ALPHA menu) does.
Both characters show the same glyph btw.
Cheers, Werner
Indeed, the 138 XTOA char does not show a linefeed when AVIEW'd, while char 10 (the one from the ALPHA menu) does.
Both characters show the same glyph btw.
Cheers, Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L
Re: Getting the L/F-symbol into a string ?
Hi,
thanks a lot - that helps!
Interesting, that 138 ist exactly 10 (the "normal L/F") 128 (half of 256/8bit) +
Cheers!
Meino
thanks a lot - that helps!
Interesting, that 138 ist exactly 10 (the "normal L/F") 128 (half of 256/8bit) +
Cheers!
Meino
DM 42 - SN: 00373, Firmware release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
-
- Posts: 1107
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: Getting the L/F-symbol into a string ?
I don't know if this is an intentional feature or just a consequence of how character codes are mapped to characters. The top half of the code space, codes 128-255, mirrors the bottom half, except for codes 128 and 129, which are used to construct the X: and Y: labels, and for code 138, which looks the same as code 10 in strings but does not perform a line feed in AVIEW and PRA. Which makes me wonder, what about ESC, code 27? Does code 27 initiate an actual escape sequence when sent to an 82240 using PRA, and if so, what about code 155?
Free42 doesn't emulate escape sequences at all so testing this would require an actual 82240, being driven by an actual HP-42S, or maybe a DM42.
Free42 doesn't emulate escape sequences at all so testing this would require an actual 82240, being driven by an actual HP-42S, or maybe a DM42.
Re: Getting the L/F-symbol into a string ?
I've not followed the details above, but have the required tools - give me a small program fragment and I'm happy to give it a try and confirm what they do.Thomas Okken wrote: ↑Tue Oct 20, 2020 3:49 pmI don't know if this is an intentional feature or just a consequence of how character codes are mapped to characters. The top half of the code space, codes 128-255, mirrors the bottom half, except for codes 128 and 129, which are used to construct the X: and Y: labels, and for code 138, which looks the same as code 10 in strings but does not perform a line feed in AVIEW and PRA. Which makes me wonder, what about ESC, code 27? Does code 27 initiate an actual escape sequence when sent to an 82240 using PRA, and if so, what about code 155?
Free42 doesn't emulate escape sequences at all so testing this would require an actual 82240, being driven by an actual HP-42S, or maybe a DM42.
--bob p
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
-
- Posts: 1107
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: Getting the L/F-symbol into a string ?
Great! Could you try this?
Code: Select all
00 { 82-Byte Prgm }
01▸LBL "PTEST"
02 CLX
03 STO 00
04▸LBL 00
05 "LINE"
06 10
07 RCL+ 00
08 XTOA
09 ├"FEED"
10 PRA
11 "PLAIN "
12 27
13 RCL+ 00
14 XTOA
15 253
16 XTOA
17 ├"WIDE"
18 R↓
19 XTOA
20 252
21 XTOA
22 PRA
23 RCL 00
24 128
25 XOR
26 STO 00
27 X≠0?
28 GTO 00
29 END
Re: Getting the L/F-symbol into a string ?
Thanks Thomas.
Results are nearly identical; note that the LF character is printed slightly differently:
DM42: as the small "L F" characters vertically separated
HP-42S: as the greater than or equal to (small angle pointing to the right above horiz. line at the bottom
As for the bottom line, I'm not sure if this is what you expected, but they are the same.
Results are nearly identical; note that the LF character is printed slightly differently:
DM42: as the small "L F" characters vertically separated
HP-42S: as the greater than or equal to (small angle pointing to the right above horiz. line at the bottom
As for the bottom line, I'm not sure if this is what you expected, but they are the same.
--bob p
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100