Announcement

Collapse
No announcement yet.

ASM problem

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

  • Georg Potthast
    replied
    Hi Bob,

    thank you for your detailed answer. As I found, the last alternative can be used to implement pusha/popa as well:

    asm db &H60 ;pusha
    asm db &H61 ;popa

    Best regards

    Georg

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

    Leave a comment:


  • Bob Zale
    replied
    Hi Georg!

    SHL ah, 6 is not a valid 8086 opcode. It was introduced on a later model CPU. Since PB/DOS supports the 8086/8088, the ASM statement in PB/DOS only assembles 8086/8088 opcodes.

    You could change it to:

    MOV cl, 6
    SHL ah, cl

    ---or---

    SHL ah, 1
    SHL ah, 1
    SHL ah, 1
    SHL ah, 1
    SHL ah, 1
    SHL ah, 1

    ---or---

    ASM db &H0C0
    ASM db &H0E4
    ASM db &H006

    (which is the machine code translation)

    Best regards,

    Bob Zale
    PowerBASIC Inc.


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

    Leave a comment:


  • Georg Potthast
    started a topic ASM problem

    ASM problem

    I try to code this statement:

    asm shl ah,6

    This results in an assembler syntax error. What is the correct syntax?

    Georg

    ------------------
Working...
X