Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!purdue!decwrl!labrea!Portia!Jessica!rick
From: rick@Jessica.stanford.edu (Rick Wong)
Newsgroups: comp.sys.mac
Subject: Re: MDS -> MPW asm code conversion question
Message-ID: <4245@Portia.Stanford.EDU>
Date: 29 Nov 88 19:01:07 GMT
References: <17413@vax5.CIT.CORNELL.EDU> <10330088@accuvax.nwu.edu>
Sender: news@Portia.Stanford.EDU
Reply-To: rick@Jessica.stanford.edu (Rick Wong)
Organization: Stanford University
Lines: 30
In article <10330088@accuvax.nwu.edu> bob@accuvax.nwu.edu (Bob Hablutzel) writes:
>I also converted from MDS to MPW recently, and had a lot of the same problems.
>The TAB problem I can't comment on - I haven't tried to work around this. I
>think the problem is that labels _must_ start in the first column, and EQU
>symbols are considered labels.
>
After running your MDS source through MDSCvt, you can use MPW's "replace"
command to take out the leading whitespace in EQU declarations. The fol-
lowing commands will do the trick:
target mysrc.a ; set up find/replace target
set space "t " ; the blank is important
find <8> ; make sure selection is at beginning of file
replace -c <5> /<8>[{space}]+([{space}]equ[{space}])1/ "1"
Notation: characters in angle-brackets are option-characters (e.g.,
<5> is option-5 (the infinity character)).
The regular expression in the above replace command looks for lines that
start with whitespace and that contain an "equ" token. The stuff follow-
ing the leading whitespace is tagged (1), and the entire line is
replaced with the tagged portion, effectively deleting the leading white-
space.
Nifty, eh?
Rick Wong
Courseware Authoring Tools Project, Stanford University
rick@jessica.stanford.edu