Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Problems with XCMDs in MPW Object Pascal 3.0 Keywords: Object Pascal, XCMDs Message-ID: <26942@apple.Apple.COM> Date: 8 Mar 89 02:57:27 GMT References: <4321@sdcc3.ucsd.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 35 In article <4321@sdcc3.ucsd.EDU> am151fap@sdcc3.ucsd.EDU (Eric Krugler) writes: > >I'm trying to create an XCMD using MPW Pascal 3.0. The problem is that if >I use the Object extensions provided by MPW Pascal the linker runs into >problems. The -rt link option is used to create the XCMD resource >and it causes A5 addressing modes to be converted to PC relative >addressing modes, but only for JSR, JMP, LEA, or PEA instructions. >The error that the linker produces (#41) states that a different >instruction specifying A5 relative addressing has been found. > >The real question is can an XCMD, DRVR, or DA be created using the >Object extensions of MPW Pascal and if so, how do I work around the >problem with the linker. > I don't think that you will ever be able to get this to work. I've only looked into the inner workings of method dispatching briefly, and they seem to depend on several things: 1) a jump table (and No, you can't use HyperCard's). 2) selection procedures (SelProcs) in a separate segment 3) method tables (MethTables) in a separate segment. All three of these violate the conditions for standalone code resources, which is what an XCMD is. However, I may be wrong on some of these points. For instance, I wasn't aware that the -rt option caused the A5 relative addressing to become PC relative. But I still don't think that it will also change the method dispatching architecture. ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions