flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
YONG
Try this:
Code: sub sp, 2 mov bp, sp mov [bp], ax Your error was not related to ss. It was about [sp] which is illegal. Listed below are the legal 16-bit Memory Addressing Modes: - Displacement - bx or bp - si or di - Any combinations of the above three YONG |
|||
![]() |
|
mike.dld
In 16-bit code there is no SP-relative addressing (only BP,BX,SI,DI can be used). But you can probably write
Code: sub sp, 2 mov [esp], ax |
|||
![]() |
|
YONG
One more point.
Even though the [bp] addressing mode uses ss by default, you may code [ss:bp] to make it clear and unambiguous. YONG |
|||
![]() |
|
MazeGen
mike.dld wrote: In 16-bit code there is no SP-relative addressing (only BP,BX,SI,DI can be used). But you can probably write You can never be sure that high word of ESP is zero, so MOVZX ESP,SP should be used before such code. |
|||
![]() |
|
dieboy
Ok. Thank you very much!
![]() _________________ ... |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.