flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound
lds (les, lgs lfs) second argument must be a dword where far pointer of the data is stored. In your case you must write something like:
Code: org 100 mov dx,something ; in com files ds=cs=es if you don't change it. mov ax,0900h int 21h ret ; And don't put data before the code. ; The processor does not understand what is data and what is code. |
|||
![]() |
|
HarryTuttle
THX John but what argument should I write to LDS to get no error message?
I tried almost everything:( _________________ Microsoft: brings power of yesterday to computers of today. |
|||
![]() |
|
scientica
Don't know if this is the right syntax, but it compiles with out error:
Code: org 100 lds dx, dword [something] mov ax,0900h int 21h something db 'whoops$' (can't test it in Linux) _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
![]() |
|
Tomasz Grysztar
It should be something like:
Code: something dd 1234h:5678h where 1234h is the segment number and 5678h the offset. Then the instruction: Code: lds dx,[something] loads 1234h into DS and 5678h into DX. And if you want to just some offset into DX, use the MOV or LEA instruction. |
|||
![]() |
|
HarryTuttle
??? like ???
mov ax,[something] mov dx,[something +2] mov ds,ax _________________ Microsoft: brings power of yesterday to computers of today. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.