Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!indri!nic.MR.NET!shamash!nis!sialis!orbit!pnet51!shawn From: shawn@pnet51.cts.com (Shawn Stanley) Newsgroups: comp.sys.apple Subject: Re: JMP/JML revisited... Message-ID: <1187@orbit.UUCP> Date: 17 May 89 03:26:07 GMT Sender: root@orbit.UUCP Organization: People-Net [pnet51], Minneapolis, MN. Lines: 38 mattd@Apple.COM (Matt Deatherage) writes: >In article <1135@orbit.UUCP> shawn@pnet51.cts.com (Shawn Stanley) writes: >>Someone mentioned that a good assembler would change JMP to BRL during the >>assembly. (Actually, he said it would change JMP to JML, but we know what he >>meant. :-) > >No, I think he actually meant what he said. The point was that any assembler >worth it's salt is not so picky as to refuse to generate a long jump instruction >(usually abbreviated JML) if you force long addressing on a JMP. In other >words, a good assembler should generate the same code for JMP >LongOffset as it >would for JML LongOffset. > >(Now don't confuse my use of "offset" up there with thinking I really mean >"branch". I mean "jump". I'm just testing y'all.) Matt, the JML instruction is absolute indirect. You may only: JML (16-bit_address) It then takes the three-byte address from the 16-bit address in the current program bank. There is a form of the JMP instruction that is absolute long. Here's an outline of some JMP forms and why they can't be changed to JML by the assembler: absolute JMP addr16 JML is only absolute indirect absolute long JMP addr24 JML is only absolute indirect absolute indirect JMP (addr16) JML requires a 3rd byte at addr16+2 for the new program bank Also, there is no absolute indexed indirect version of JML, which is one reason why JMP (addr16,X) can't be changed. The other reason is that as in the case of absolute indirect, JML requires a 3rd byte at addr16+2 for the new program bank. UUCP: {uunet!rosevax, amdahl!bungia, chinet, killer}!orbit!pnet51!shawn INET: shawn@pnet51.cts.com