Article View: comp.sys.mac
Article #34917Re: MDS -> MPW asm code conversion question
From: Rick Wong
Date: Tue, 29 Nov 1988 19:01
Date: Tue, 29 Nov 1988 19:01
30 lines
1783 bytes
1783 bytes
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 "<d>t " ; the blank is important
find <8> ; make sure selection is at beginning of file
replace -c <5> /<8>[{space}]+(<x>[{space}]equ[{space}]<x>)<r>1/ "<r>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 (<r>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
Technical Details
Message-ID:
<4245@Portia.Stanford.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!purdue!decwrl!labrea!Portia!Jessica!rickReferences:
<17413@vax5.CIT.CORNELL.EDU> <10330088@accuvax.nwu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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