flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 17 Oct 2003, 10:23
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 17 Oct 2003, 16:36
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 17 Oct 2003, 17:36
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 17 Oct 2003, 17:48
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 20 Oct 2003, 12:34
??? 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.