Announcement

Collapse
No announcement yet.

Assembler syntax error: ! inc LongVariable

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

  • Assembler syntax error: ! inc LongVariable

    'testinc.bas for PBDOS
    Code:
    $COMPILE EXE
     
    DIM CurPos AS LONG
    CurPos = 1
    ! inc CurPos
    PBDOS Compiler result:
    D:\PBDOS\TESTINC.BAS(5): Error 497: Assembler syntax error
    ! inc CurPos

    What am I doing wrong? that works in PBDLL and PBCC
    "INCR CurPos" compiles fine so it's not stopping me from doing anything, I just thought it was strange


    [This message has been edited by Wayne Diamond (edited September 16, 2001).]
    -

  • #2
    You're not doing anything wrong, Wayne. PowerBASIC/Dos is a 16-bit compiler, which supports CPU's as far back as the 8088. INC "long int" is a 32-bit opcode, supported only on later CPU's. PB/Dos only supports 16-bit assembler opcodes, unless you manually add the size override opcodes.

    Regards,

    Bob Zale
    PowerBASIC Inc.


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

    Comment


    • #3
      sorry Bob I often forget thinking back to 16-bit world *duh* -- I changed LONG to INTEGER and it compiled beautifully
      Thanks!


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

      Comment

      Working...
      X