Slashes in HP48 source code



#2

I'm a new HP48 user who recently inherited my dad's old 48G. I have a question about 48 source code with slashes. In the Advanced User's Guide, there are no slashes in the program listings, but in the source on the Goodies Disks and most places online (i.e. at http://www.hpmuseum.org/software/48vigenc.htm), there are slashes "\" before each << and >>. Can someone clue me in as to what these signify, and whether they are necessary?


#3

Those back-slashes are used to represent the 48G characters with ASCII codes above 127 with characters in the first half of the ASCII table, which is standard for all code pages. For instance, \<< and \>> stand for the program delimiters and \PI stands for the pi symbol.

Refer to the HP 48G User's Guide, page 27-16, for the complete ASCII Characters Translations table.

#4

Those slashes mark characters that don't have equivalents in ASCII. A 48/49 series calculator will insert them into an RPL program transferred in "text" mode to a PC. So, for example \<< stands for the character with decimal code 171 in the calculator's character set. \>> similarly stands for the character with code 187. If you type these translated codes into a source file on the PC, then transfer it to the calculator in text mode, the kermit server will do the opposite translation, from the backslash escaped codes to the ASCII equivalent. The hp 49g+ & 48gII_advanced user's reference manual (HP link) has a table of these translations in Appendix J. I think they are broadly similar to the 48G translations, though there might be differences in detail.

Regards,
Howard

#5

So, if I was going to type a program directly into my calculator from a source file on my computer, I would simply ignore the replace \<< and \>> with << and >>, and other characters such as \pi with the actual pi symbol?
BTW, have you seen Pi: Faith in Chaos? It's good.


#6

Quote:
So, if I was going to type a program directly into my calculator from a source file on my computer, I would simply ignore the replace \<< and \>> with << and >>, and other characters such as \pi with the actual pi symbol?

That's right. Most of the escaped symbols are easy to guess, like \>>, \<< and \->. For others you need the tables Gerson and I pointed you to.

Quote:
BTW, have you seen Pi: Faith in Chaos? It's good.

No. I'm culturally isolated. 8)

Regards,
Howard


#7

Thanks very much! I just typed in by hand a Pythagorean triangle calculator and it worked fine. I appreciate everyone's help.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 237 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  Where to the 32-bit version of User Code Utiltiy for HP-41 ? Olivier (Wa) 2 325 09-26-2013, 01:55 AM
Last Post: Olivier (Wa)
  A HP42S Code Editor Andreas 9 849 09-22-2013, 03:17 AM
Last Post: Andreas
  Dynamic Gaussian Quadrature code in Excel VBA Namir 4 464 07-30-2013, 07:37 PM
Last Post: Namir
  any open source HP 10BII emulators? John 15 1,216 06-12-2013, 09:58 AM
Last Post: Kimberly Thompson
  HP48 source Han 0 209 05-26-2013, 03:34 PM
Last Post: Han
  HP-65 Morse Code Dan Lewis 7 589 01-29-2013, 05:22 PM
Last Post: Mike T.
  Source for N-Cell NiMh Batteries and Charging adapters TnC_Products 14 1,041 12-16-2012, 10:26 AM
Last Post: Dieter
  Building WP-34S calc.bin from source - long post (sorry!) Nigel J Dowrick 5 511 07-14-2012, 07:41 AM
Last Post: Paul Dale
  Source (Online) for 71/41 Programs John W Kercheval 15 968 06-04-2012, 02:14 PM
Last Post: Christoph Klug

Forum Jump: