rprosperi wrote: ↑Wed Oct 21, 2020 3:55 am
Appendix E in the manual covers displayed characters but basically doesn't help much by simply saying 130-255 are 'identical' to 2-127.
I guess that's just an indirect way of saying "we didn't care about those character codes when we designed this calculator... and neither should you."
rprosperi wrote: ↑Wed Oct 21, 2020 3:55 am
The symbol "¶" the DM42 program prints for char(13) seems to be the same as char(245) - I've no idea why that would happen, though this is obviously the Carriage Return, so odd behavior is not uncommon.
The ↵ doesn't exist in the 82240 character set. I think mapping it to ¶ is clever because they both represent a hard line break. Sort of.
Like mapping the calculator code to 138 to printer code 144, it's a nice touch by SM. Their choice for code 128 seems like a mistake, though. But, as indicated by the 82240 manual, since the upper half of the calculator and the upper half of the printer character sets are totally different and the original calculator doesn't bother to perform any kind of mapping between the two, it doesn't really matter much what Free42 or the DM42 do with them, either. My choice to make the virtual printer and Copy match the display characters was motivated mainly by the desire to keep things simple.
rprosperi wrote: ↑Wed Oct 21, 2020 3:55 am
In Free42, do you substitute the special char "↵" for the normal char(13)? If so, is "↵" char(245) on the virtual printer?
In the Free42 print-out code, and also for Copy, for all characters, I picked Unicode characters that resembled the ones used by the HP-42S as closely as possible. Hence ↵ for 13, and also ↑ instead of ^ for 94. The only exceptions are 10 and 27, where I used the strings [LF] and [ESC] instead of the obvious Unicode characters U+240A and U+241B, because to me those are just too hard to read -- ␊ and ␛, nope. Too small.