TView source to TView file translator ------------------------------------------ Version 1.5 Beggar Ware Copyright(c)1994 by Clifford Hammerschmidt chammers@Engr.UVic.ca ------------------------------------------ This is for all you people who just can't live without taking your notes into the exam with you. Of course if you don't have an HP48 your S.O.L. Oh and of course it works on both the S and the G models as well. -------------------------------------------------------------------------- This program is beggar ware. If you like it send anything, or nothing, of any value to me. eg Alcohol, Money (any amount), your Wife, etc. Comments and suggestions always welcome. Email:chammers@Engr.UVic.ca Snail-Mail: Clifford Hammerschmidt 4080 Torquay Dr. Victoria BC, Canada V8N 3K7 -------------------------------------------------------------------------- Files: tvs2tv.exe The program, IBM pc's only (MAC = doorstop) cvt.lst The conversion list (I'll explain it later) tvs2tv.doc You are reading it. tview The viewing program for your HP48. How it works: ------------- TView is a small (~600 bytes) program that takes a list from level 1 of the stack and displays it's contents on the screen. Each entry in the list is a string. Strings over 32 characters long (in general) will not be completely displayed. Don't complain, I didn't write TView, and I don't know who did or I would give them credit. Well that's just fine, But I really didn't feel like typing in my notes like { "foo" "foo" "foo" }. Plus I could never find anything in 20 pages (10 lines each) of notes. So I made tvs2tv. It builds an index and stores it in the first few pages, plus it takes a normal (almost) text file and generates a HP48 ascii files of a list. The format for the input file is REALLY simple. Any line that starts with an '[' indicates a new page. ALWAYS end these lines with a ']'. The stuff in the middle of the '[' and ']' character is the page name. After that put what ever you want on that page. example (for all you physics students): ---------------------------------------CUT [Youngs Dbl-slit exp] ˆ=r2-r1=dsin• ˆ=path difference r2=path length 2 •=angle from the normal of the slits. for constructive ˆ=dsin•=m– (m=0,±1,±2,...) for destructive ˆ=dsin•=(m+1/2)– (m=0,±1,±2,...) [Bright and Dark Spots] y(bright)=(–L/d)m y(drak)=(–L/d)(m+1/2) d=distance between slits L=distance between slits and Viewing screen m=m=0,±1,±2,... [Phase difference] E1=E0sinšt E2=E0sin(št+ø) ø=(2‡/–)ˆ=(2‡/–)dsin• [Intensity distribution] Ep=E1+E2=E0[sinšt+sin(št+ø)] Ep=2E0cos(ø/2)sin(št+ø/2) I(av)=I0cos^2(ø/2) I(av)=I0cos^2((‡dsin•)/–) I(av)=I0cos^2(((‡d)/(–L))–) ---------------------------------------CUT If you want to try it, cut it out, then type: tvs2tv !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING! ! ! Do NOT use the same file name for input and output! EVER ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Where inputfilename is the name you saved it to, and outfilename is the name to write the TView file to. Then upload TView and your converted file to your HP48. Put The converted file on the stack (should look like { "foo" "foo" "foo" ... } And then hit TView. How to use TView ---------------- The six menu buttons (from left to right) are: EXIT +/- HPCA JUMP PGUP PGDN A B C D E F EXIT: Exits TView +/- : Turns menu HPCA: Runs what ever program is stored in HPCA JUMP: Jumps to a page (that's what the index is for) PGUP: Goes up a page (Doesn't stop at top) PGDN: Goes down a page (Doesn't stop at bottom) One of the best things to store in HPCA is a program that calls halt (eg << halt >>). This puts you back in calculator mode. To get back into TView you just hit LeftShift-On. (This is great for when the prof walks by your desk as your talking the exam) Does it auto word warp? ----------------------- I decided against making tvs2tv wordwrap everything to 31 characters because (It was too much work and I'm lazy) you don't always want it too. The small font on the HP48 is PS spaced (spaces,'.','i',etc take up less space). This makes drawing ascii pictures a REAL pain, and as some lines are a lot longer than 31 characers in these pictures I didn't want to mess them up. Easiest thing to do is set your favorite editor to wrap at column 31. So what the hell is cvt.lst for?? --------------------------------- Well the folks at EduCalc were nice enough to allow us to enter character like ã as \pi if we used translation mode 3. You may have noticed I didn't use any of those above example, but I could have, It just makes it hard to count the number of characters on that line. The cvt.lst file is a file that has a listing of all those \xxx things. This allows tvs2tv to convert the characters before sending them over to the HP48. It also lets you define your own. I've added \1/2 to produce the 1/2 symbol, \Gb to produce beta (It wasn't in the list in the manual), and a few others. The format is really simple, put the string to be replaced on one line, and on the next put the ascii value to replace it with. Hey! IT DIDN'T WORK! -------------------- A: Your a Moron (j/k :) B: RTFM C: You actually hit one of those unavoidable errors. Known Problems (How much you want to bet you'll find more) ----------------------------------------------------------- 1. The HP48 doesn't like big lists, anything over ~250 entries will not upload properly. This is ~23 pages of notes (not including index). Solution: Split up you file into small files. 2. I type "tvs2tv mynote.fil" and it just displays the usage info. You didn't include the output file name when running the program. Solution: Put one in (duh!) 3. It says runtime error 2 at some address. Solution: Copy cvt.lst into the directory you are running tvs2tv from. 4. Hey, It only put 10 of my pages in the index! Solution: Hit PGDN (the F key) 5. Hey, My notes start on page 2?? (or 3, or 4) Solution: None, It's SUPPOSED to be like that, the index takes up the first few pages.