Announcement

Collapse
No announcement yet.

JMP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMP

    Hi!

    I understand that the instruction JMP is disabled in the inline
    assembler function in PowerBASIC, right?!

    I need to directly jump (JMP) to an address in the ROM, how can I
    do that, is there any workaround for this? If not, how do I
    'jump' from standard PowerBASIC (by using a BASIC command)?


    Thanks for reading!

    /Bruce

    ------------------

  • #2
    Not tested but...it sure looks like
    Code:
    GOTO DWORD addressvar
    .. is an unconditional jump.

    MCM
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      While GOTO DWORD is fine, !JMP is certainly not disabled or disallowed. It is perfectly acceptable to the compiler.
      Code:
      !jmp abc
      end
      abc:
      print "hello!"

      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment


      • #4
        I think the problem here is that, if it's possible to JMP FAR to a numeric address
        in PowerBASIC, the syntax is not obvious. It's conceivable that the assembler does
        not support this directly. I know MASM doesn't.

        As Michael points out, GOTO DWORD should get you there. If you really want it in
        asm, code it directly:

        !db &HEA
        !dw offset
        !dw segment


        ------------------
        Tom Hanlin
        PowerBASIC Staff

        Comment

        Working...
        X