Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: A F P N , Amiga Forth Newsletter Message-ID: <2083.UUL1.3#5129@willett.pgh.pa.us> Date: 9 Dec 90 23:33:40 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 79 Category 14, Topic 5 Message 1 Sun Dec 09, 1990 GARY-S at 07:01 EST From jax Wed Dec 5 20:38:59 1990 Date: Wed, 5 Dec 90 20:38:55 pst From: jax (Jack J. Woehr) To: gars Subject: AFPN 90-12 _ _ _ _ _ _ ___ _ __ ____ //\\ //\\//\\ ||//___ //\\ ||_ //\\ ||\\ || ||_|| PROGRAMMERS' //==\\// \\// \\||\\_////==\\ || \\// ||\\ || || || NEWSLETTER Issue 90-12 : JForth STRIP-PATHNAME ; : A4TH1.5 D2/ ; : AFPN ; Subscribe via {hplabs,pacbell,ucb}!well!jax jax@well.sf.ca.us with a Subject: header of AFPN SUBSCRIBE. : AFPN ; The Amiga Forth Programmers' Newsletter is back on line! Rich Thompson has passed us the subscription list, so it is time to send in any Forth code or tips for the Amiga which you have been accumulating, waiting for an opportunity to pass them on. Mail them to jax@well with a Subject: header of AFPN SUBMIT. Your submissions are necessary to keep the Amiga Forth Programmers' Newsletter coming. We are going to try to keep the newsletter short (99 lines or less), and post pointers to binaries rather than mailing them around. There are more and more sites which offer large collections of Forth files, especially in the world of small local BBSes (such as my own, the RealTime Control & Forth Board (303) 278-0364 3/12/24 24 hours). We will try to keep you posted on developments in that quarter. On with the show! Here are some bug fixes you may or may not have seen: : JForth STRIP-PATHNAME ; \ JU:STRIP-PATHNAME in JForth Professional 2.0 and 2.01 has bug, backs \ over filename which possess no path component. Replace definition \ with the following and recompile with JF:BUILDSYS. Approved by Delta. \ strip any additional 'pathname' : STRIP-PATHNAME \ addr cnt -- addr' cnt' 2dup 2dup + ( -- adr cnt adr cnt one-past-LastAdr ) swap 0 DO 1- \ back up one byte dup c@ \ get char at that address dup ascii / = swap ascii : = or ( is it a path character?) ( -- adr cnt adr LastAdr flag ) ?LEAVE \ yes, leave the loop with the current address LOOP ( -- adr cnt adr FinalAdr ) 2dup - \ are the addresses different? IF swap - 1+ >r \ calculate difference in length and save on rstack r@ - \ subtract from original count swap r> + \ add difference to address swap ( -- addr ct) ELSE 2drop \ otherwise, leave orig. string if it contained no path elements THEN ; : A4TH1.5 D2/ ; There is a previously-unreported (to my knowledge) bug in Peter Appelman's fine PD Forth for the Amiga, A4TH1.5. The definition of D2/ on screen 37 of AKernel.blk is wrong. The correct code is as follows: code d2/ (s d -- d/2 ) sp )+ d1 move sp ) d0 move 1 # d1 asr 1 # d0 roxr d0 sp ) move d1 sp -) move next end-code Change the code, open meta.blk and type ok then follow instructions to save the metacompiled image as your new A4TH1.5 image. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp