home *** CD-ROM | disk | FTP | other *** search
- TCP-Group Digest Sat, 1 Sep 90 Volume 90 : Issue 126
-
- Today's Topics:
- 'minor' problems with TC 2.0 and TC C++
- holidays
- SLIP help needed for NOS
- Some FORTH comments
-
- Send Replies or notes for publication to: <TCP-Group@UCSD.Edu>
- Send requests of an administrative nature (addition to, deletion from the
- distribution list, et al) to: <ListServ@UCSD.Edu>
-
- Archives of past issues of the TCP-Group Digest are available
- (by FTP only) from UCSD.Edu in directory "mailarchives".
- ----------------------------------------------------------------------
-
- Date: Fri, 31 Aug 90 14:12:13 PDT
- From: Ron Henderson <crh@hpcvmcrh.cv.hp.com>
- Subject: 'minor' problems with TC 2.0 and TC C++
- To: tcp-group@ucsd.edu
-
- I've run across another potential problem when using TC C++. The
- following code compiled and ran ok with TC 2.0, but it fails with TC
- C++.
-
- #include <stdio.h>
- #include <dos.h>
- main()
- {
- int a, b, c;
-
- a=5555;
- b=(a >> 8);
- _AH=0x2c;
- geninterrupt(0x21);
- c=(a >> 8);
- printf("b: %d, c: %d\n",b,c);
- }
-
- will print : b: 21, c: 5
- rather than: b: 21, c: 21
-
- The problem comes about because the geninterrupt call isn't, strictly
- speaking, a function call, it's a macro. TC C++ knows that certain
- registers can be corrupted by function calls, and assumes their values
- might have changed. The statement b=(a >> 8); loads the cl register
- with 8 which is used in the shift. Since no 'true' function call exists
- between the b= and c= statements, the compiler obviously thinks cl is
- still valid, when in fact it is changed by the interrupt call to get
- current time.
-
- Of course, TC 2.0 also has it's problems with the cx register. The
- following code segment would fail:
-
- ...
- int a, b, c;
- ...
-
- a = _CX; /* line 1 */
- c = (a >> 8); /* line 2 */
- d = a & 0xff; /* line 3 */
-
- because the compiler, in line 3, thinks the cx register still holds the
- value of a (as it did in line 1). Actually, the cl register was used in
- line 2 to perform the shift. Here is the applicable portion of the .asm
- file.
-
- ; -- a=_CX; /* line 1 */
- mov word ptr DGROUP:_a,cx
- ; -- b=(a >> 8); /* line 2 */
- mov ax,cx
- mov cl,8
- sar ax,cl
- mov word ptr DGROUP:_b,ax
- ; -- c=a & 0x00ff; /* line 3 */
- mov ax,cx <---- OOPS, used the cx register which isn't valid now
- and ax,255
- mov word ptr DGROUP:_c,ax
-
- This problem can be solved by changing the value of the cx register
- after storing it away, i.e.
-
- a = _CX; _CX=0;
-
- will result in correct code. TC C++ doesn't have this particular
- problem.
-
-
- --
- Ron Henderson WA7TAS
- crh@cv.hp.com (crh@hp-pcd.hp.com)
-
- ------------------------------
-
- Date: Fri, 31 Aug 90 17:02:10 MDT
- From: Rob Janssen (PE1CHL) <cmgit!rob@relay.EU.net>
- Subject: holidays
- To: hp4nl!tcp-group@relay.EU.net (TCP/IP interest group)
-
- I will be on holidays from next week tuesday. I will not be reading
- my mail at rob@cmgit.uucp until October 1st.
- See you all at the CNC!
-
- Rob PE1CHL
-
- ------------------------------
-
- Date: Fri, 31 Aug 90 18:33 EDT
- From: leon@ankh.ftl.fl.us (Leon Zetekoff)
- Subject: SLIP help needed for NOS
- To: tcp-group@ucsd.edu
-
- I am desparately trying to get NOS to work on a slip bound landline link with
- netrom on top of it. My friend has no tnc and will use me to gateway out to
- the RF world. Everytime i try and boot I get garbage on the screen and NOS
- locks up tighter than a drum.
- I am using 900714 NOS and would apprecaite an assist ASAP
- 73 es tnx Leon wa4zlw
-
- ------------------------------
-
- Date: Fri, 31 Aug 90 16:08:09 UTC
- From: clark@tomcat.gsfc.nasa.gov (Tom Clark -- W3IWI)
- Subject: Some FORTH comments
- To: tcp-group@ucsd.edu
-
- In a recent note, Jonathan Vail (N1DXG) stated:
-
- > I agree that the disadvantages of using FORTH for NOS far outweigh the
- > advantages. The times I have seen FORTH used in real projects they
- > never lived to see the light of day, were nightmares to maintain and
- > in one case ended in disaster and 200 people getting layed off.
-
- I'll take exception to this statement with a few specific examples:
-
- a. Chuck Moore originally "invented" FORTH when he was at the National Radio
- Astronomy Observatory and it has done yeoman service as a controller for a
- number of telescopes (radio and optical) since the early '70s. This was
- especially true in the bygone days of yore when machines with 16kbytes of
- core (yes, core!) were all that was available.
-
- b. The FORTH concept was ported to the RCA 1802 (and a number of other
- environments including the ATARI 400/800) by Dr. Karl Meinzer, DJ4ZC (Karl
- called his FORTH dialect IPS - Interpreter for Process Structures) as a high-
- level language to control complex instrument systems. Karl used IPS running
- on the 1802 as the native language for the AMSAT Phase-3A satellite (which
- was lost when the launcher blew up in 1980) and AMSAT-OSCAR-10 and -13. In
- these cases the entire spacecraft CPU had 16k or RAM (and no ROM) and the
- IPS software controls all the spacecraft functions including formatting and
- sending telemetry, processing commands, processing the position data from the
- Sun and Earth sensors, activating the spacecraft's magnet-torqurers to change
- the spacecraft's attitude, the firing of the kick motors, scheduling the
- transponder/antenna resources, etc. Except for the fact that AO-10's 16k
- dynamic RAM went brain-dead after several years exposure to radiation, this
- software has operated faultlessly for many years.
-
- IPS was also developed for the telecommand stations using the ATARI computers
- (by DJ4ZC) and for Z80's (by W0PN, W1HDX, VE1SAT, ZL1AOX & W3IWI).
-
- Karl also used the IPS/1802 combination in several University projects,
- including one which automatically controlled a train.
-
- My experience using both FORTH (in the astronomical community) and IPS is
- the threaded interpreters are very powerful and very efficient of RAM. It
- is easy to write applications. But their are two weaknesses: (1) the code
- is slower at execution time, and (2) although code is easy to WRITE, it is
- very difficult to READ (by the writer several months later or by someone
- else). Any FORTH application MUST be extensively documented!
-
- I think Anders' inclusion of FORTH in NOS is one of the cleverest ideas
- since sliced bread! Once a library of support utilities is available it will
- prove to be most valuable for all those "Gee I wish I could ... " extensions
- to NOS (I have a long list here just like that).
-
- 73, Tom
-
- ------------------------------
-
- End of TCP-Group Digest
- ******************************