在MASM中使用间接远跳转

; Assemble options needed: none

          .model  large
          .data
jumptable DD      routine1
          DD      routine2

          .code
start:    MOV     ax, @data
          MOV     ds, ax
          CALL    DWORD PTR  jumptable
          JMP     DWORD PTR  jumptable+4
          RET

cseg      SEGMENT word public 'code'
routine1  PROC
          RET
routine1  ENDP

routine2  PROC
          RET
routine2  ENDP
cseg      ENDS

          END     start
posted @ 2012-10-09 10:00  特洛伊人  阅读(414)  评论(0编辑  收藏  举报