Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!nic.MR.NET!umn-cs!bungia!orbit!pnet51!shawn From: shawn@pnet51.cts.com (Shawn Stanley) Newsgroups: comp.sys.apple Subject: Re: JMP/JML differences Message-ID: <1125@orbit.UUCP> Date: 10 May 89 21:25:18 GMT Sender: root@orbit.UUCP Organization: People-Net [pnet51], Minneapolis, MN. Lines: 34 JWANKERL@UTCVM.BITNET ("Josef W. Wankerl") writes: >I've just been wondering what the advantages vs. disadvantages of >using a JML instead of a JMP would be. I guess an advantage of the JML >would be that it wouldn't need space in a loader relocation dictionary. >Is there any other difference?? The space taken in a loader relocation dictionary isn't directly minimized by the use of a JML statement, mainly because the addresses have to come from *somewhere*. The savings comes when you use the jump table more than once. One of the forms of the JMP instruction is the absolute indirect. The JML instruction has *only* the absolute indirect. For example: JMP (address) JML (address) The address must be 16 bits. However, the JMP instruction assumes bank zero for the destination address. In both cases, the address specified is taken from the current PBR, not the DBR. Here are some examples, using $AAAA within the current program bank as a load address: $551010 JMP ($AAAA) This will take a 16-bit address from locations $55AAAA-55AAAB and prefix it with a PBR of $00, thus transferring control to an address within bank zero. On the other hand: $551010 JML ($AAAA) This will take a 24-bit address from locations $55AAAA-55AAAC and transfer control to that address. UUCP: {uunet!rosevax, amdahl!bungia, chinet, killer}!orbit!pnet51!shawn INET: shawn@pnet51.cts.com