Jump to Absolute Address

Last reviewed: January 6, 1995
Article ID: Q24965
The information in this article applies to:
  • Microsoft Macro Assembler for MS-DOS, versions 1.25, 1.27, 3.0x, 4.0, 5.0, 5.1, 5.1a, 6.0, 6.0a, and 6.0b

SUMMARY

There are two methods of coding a jump to an absolute address. These methods are as follows:

  1. Use AT to create a segment template beginning at an absolute address. Then, using ORG, a label can be assigned at a specific offset.

    -or-

  2. Initialize a double word variable to the specific address.

MORE INFORMATION

The following code demonstrates both methods:

; Assembly options needed: none

ASEG SEGMENT BYTE AT 0000H

           ORG 100
far_label LABEL FAR

ASEG       ENDS


DATA SEGMENT WORD 'DATA'

FAR_VAR DW   100,0

DATA         ENDS



CODE SEGMENT BYTE 'CODE'
       ASSUME CS:CODE, DS:DATA

start: mov ax, data
       mov ds, ax

       JMP far_label          ;This is the first type of jump.

       JMP DWORD PTR far_var  ;This is the second type of jump.
CODE ENDS

END start


Additional reference words: 1.25 1.27 3.0x 4.00 5.00 5.10 5.10a 6.00
6.00a 6.00b
KBCategory: kbprg
KBSubCategory: MASMLngIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 6, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.