Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site astrovax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!astrovax!wls From: wls@astrovax.UUCP (William L. Sebok) Newsgroups: net.sources,net.lang.forth Subject: 2 bugs in Princeton FORTH v2.0 for VAX 44.X BSD Message-ID: <409@astrovax.UUCP> Date: Sat, 4-Aug-84 01:18:29 EDT Article-I.D.: astrovax.409 Posted: Sat Aug 4 01:18:29 1984 Date-Received: Sat, 4-Aug-84 04:06:12 EDT Organization: Princeton Univ. Astrophysics Lines: 49 I regret to announce two bugs in Princeton v2.0 Forth for 4.[12] BSD Unix running on a VAX. _F_I_X #1 In screen 14 in the default load file ./vaxforth/forth.blk the lines: CODE FROLL 1 S )+ MOVL F ) F -) 1 ] MOVL 1 1 2 # ASHL F ) F )+ 1 MOVC3 END-CODE should be replaced by: CODE FROLL 1 S )+ MOVL -4 F )) -4 F )) 1 ] MOVL 1 1 2 # ASHL F ) -4 F )) 1 MOVC3 END-CODE It was clever but wrong. The autoincrement on the MOVC3 instruction increments by 1 byte rather than the 4 that I had intended. _F_I_X #2 *** ./vaxforth/forth3.S.OLD --- ./vaxforth/forth3.S *************** *** 1239,1245 .long 0 /* () used for graphics and number output */ .long 0 /* SSBOT string stack bottom */ .long 0 /* FSBOT bottom of floating point stack */ ! .long 0 /* ERRNO unix error number */ .long 0 /* QUITADD intercept forth QUIT (like a Unix signal).*/ hinit: /* dictionary starts here */ --- 1239,1246 ----- .long 0 /* () used for graphics and number output */ .long 0 /* SSBOT string stack bottom */ .long 0 /* FSBOT bottom of floating point stack */ ! _errno: .long 0 /* ERRNO unix error number */ ! .globl _errno .long 0 /* QUITADD intercept forth QUIT (like a Unix signal).*/ hinit: /* dictionary starts here */ Unfortunately the loader allocated the variable _errno right in the middle of the code for E. , the word to print a number in exponential format. Thus any unsuccessful call to a Unix interface word would make E. abort with an "Illegal Instruction!!" message. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls