Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!fseipel From: fseipel@magnus.acs.ohio-state.edu (Frank E Seipel) Newsgroups: comp.sys.handhelds Subject: Periodic Table Message-ID: <1991Apr19.215621.2022@magnus.acs.ohio-state.edu> Date: 19 Apr 91 21:56:21 GMT Sender: news@magnus.acs.ohio-state.edu Organization: The Ohio State University Lines: 254 Originator: fseipel@bottom.magnus.acs.ohio-state.edu Nntp-Posting-Host: bottom.magnus.acs.ohio-state.edu { from the Hewlett Packard calculator BBS (telnet hpcvbbs.hp.com) }: Item: 262 by _ryanh at hpcvbbs.UUCP Author: [Ryan Hill] Subj: Chemistry Keyw: atomic fmula weights and periodic table Date: Thu Apr 18 1991 20:15 Lines: 17 This is a program that given an abbreviation, like Pb, will give the atomic number, weight, and full name like a periodic table. I wish the search routine could be in machine language, but I couldn't do that. If you can, please do. Or, given a formula, like H2O, it will give the weight of the formula, typed in as {"H" 2 "O" 1}. There are five programs, FORM, for the formula mass. FIND, takes an abbreviation and gives info. SHW, used by FIND to display values. NAM, names of all of the elements. ELM, atomic number, and weight data on the elements. Input for FIND just has to be a symbol for an element, don't use quotes! Input for FORM goes like this. You put the symbol in quotes, followed by the amount of it, (don't forget to put 1 when it is only one!) and so on. This must be in a list though. I wished that I could have a picture of the table, and flip through it like the Chem Applications Pac cartridge. If anybody can, please do. Please upload any revisions. Thanks. %%HP: T(1)A(D)F(.); DIR FORM + 0 0 0 0 S T Y Z + DUP 'S' STO SIZE 1 SWAP FOR x 'S' x GET 'Z' STO 1 324 FOR I 'ELM' I 1 + GET IF Z == THEN 'ELM' I 2 + GET 'Y' STO 324 'I' STO END 3 STEP 'S' x 1 + GET Y * 'T' STO+ 2 STEP T ; ; FIND + "" + A + 1 324 FOR x 'ELM' x 1 + GET IF A == THEN x 'X' STO SHW END 3 STEP ; ; SHW + 'ELM' X GET DUP "ATOMIC#" TAG SWAP 'NAM' SWAP GET "NAME" TAG 'ELM' X 1 + GET "SYMBOL" TAG 'ELM' X 2 + GET "ATWT" TAG 'X' PURGE KILL ; NAM { "Hydrogen" "Helium" "Lithium" "Beryllium" "Boron" "Carbon" "Nitrogen" "Oxygen" "Flourine" "Neon" "Sodium" "Magnesium" "Aluminum" "Silicon" "Phosphorous" "Sulfur" "Chlorine" "Argon" "Potassium" "Calcium" "Scandium" "Titanium" "Vanadium" "Cromium" "Manganese" "Iron" "Cobalt" "Nickel" "Copper" "Zinc" "Gallium" "Germanium" "Arsenic" "Selenium" "Bromine" "Krypton" "Rubidium" "Strontium" "Yttrium" "Zirconium" "Niobium" "Molybdenum" "Technetium" "Ruthenium" "Rhodium" "Palladium" "Silver" "Cadmium" "Indium" "Tin" "Antimony" "Tellurium" "Iodine" "Xenon" "Cesium" "Barium" "Lanthanum" "Cerium" "Praseodymeum" "Neodymium" "Promethium" "Samarium" "Europium" "Gadolinium" "Terbium" "Dyprosium" "Holmium" "Erbium" "Thulium" "Ytterbium" "Lutetium" "Hafneum" "Tantalum" "Tungsten" "Rhenium" "Osmium" "Iridium" "Platinum" "Gold" "Mercury" "Thallium" "Lead" "Bismuth" "Polonium" "Astatine" "Radon" "Francium" "Radium" "Actinium" "Thorium" "Protactinium" "Uranium" "Neptunium" "Plutonium" "Americium" "Curium" "Berkelium" "Californium" "Einsteinium" "Fermium" "Mendelevium" "Nobilium" "Lawrencium" "Unknown" "Unknown" "Unknown" "Unknown" "" "Unknown" } ELM { 1 "H" 1.0079 2 "He" 4.0026 3 "Li" 6.941 4 "Be" 9.0122 5 "B" 10.81 6 "C" 12.011 7 "N" 14.007 8 "O" 15.999 9 "F" 18.998 10 "Ne" 20.179 11 "Na" 22.99 12 "Mg" 24.305 13 "Al" 26.982 14 "Si" 28.086 15 "P" 30.974 16 "S" 32.06 17 "Cl" 35.453 18 "Ar" 39.948 19 "K" 39.098 20 "Ca" 40.08 21 "Sc" 44.956 22 "Ti" 47.9 23 "V" 50.941 24 "Cr" 51.996 25 "Mn" 54.938 26 "Fe" 55.847 27 "Co" 58.933 28 "Ni" 58.71 29 "Cu" 63.546 30 "Zn" 65.38 31 "Ga" 69.72 32 "Ge" 72.59 33 "As" 74.922 34 "Se" 78.96 35 "Br" 79.904 36 "Kr" 83.8 37 "Rb" 85.468 38 "Sr" 87.62 39 "Y" 88.906 40 "Zr" 91.22 41 "Nb" 92.906 42 "Mo" 95.94 43 "Tc" 97 44 "Ru" 101.07 45 "Rh" 102.91 46 "Pd" 106.4 47 "Ag" 107.87 48 "Cd" 112.41 49 "In" 114.82 50 "Sn" 118.69 51 "Sb" 121.75 52 "Te" 127.6 53 "I" 126.9 54 "Xe" 131.3 55 "Cs" 132.91 56 "Ba" 137.33 57 "La" 138.91 58 "Ce" 140.12 59 "Pr" 140.91 60 "Nd" 144.24 61 "Pm" 145 62 "Sm" 150.4 63 "Eu" 151.96 64 "Gd" 157.25 96 "Tb" 158.93 66 "Dy" 162.5 67 "Ho" 164.93 68 "Er" 167.26 69 "Tm" 168.93 70 "Yb" 173.04 71 "Lu" 174.97 72 "Hf" 178.49 73 "Ta" 180.95 74 "W" 183.85 75 "Re" 186.21 76 "Os" 190.2 77 "Ir" 192.22 78 "Pt" 195.09 79 "Au" 196.97 80 "Hg" 200.59 81 "Tl" 204.37 82 "Pb" 207.2 83 "Bi" 208.98 84 "Po" 209 85 "At" 210 86 "Rn" 222 87 "Fr" 223 88 "Ra" 226.03 89 "Ac" 227 90 "Th" 232.04 91 "Pa" 231.04 92 "U" 238.03 93 "Np" 237.05 94 "Pu" 244 95 "Am" 243 96 "Cm" 247 97 "Bk" 247 98 "Cf" 251 99 "Es" 254 100 "Fm" 257 101 "Md" 258 102 "No" 259 103 "Lr" 260 104 "Unk" 261 105 "Unk" 262 106 "Unk" 263 107 "Unk" 264 109 "Unk" 266 } END