flat assembler
Message board for the users of flat assembler.
Index
> DOS > Problem with int 21 (write string) |
Author |
|
Tomasz Grysztar 13 Aug 2006, 02:18
You set up the DX correctly (though more usual syntax is "lea dx,[msg]"), but you have not set the DS. In this case you don't define a dedicated segment for data, so DS should be the same as CS - try putting this immediately after "main" label:
Code: push cs pop ds It will set up DS=CS. |
|||
13 Aug 2006, 02:18 |
|
fafastrungen 13 Aug 2006, 02:58
Thank you very much Tomasz and yes, you right, DS=CS.
I've tried to dedicate a data segment using .DATA but I got an error, how can I do it ? |
|||
13 Aug 2006, 02:58 |
|
Tomasz Grysztar 13 Aug 2006, 08:36
See the MULTISEG example in the DOS package.
|
|||
13 Aug 2006, 08:36 |
|
fafastrungen 13 Aug 2006, 13:42
Tomasz Grysztar wrote: See the MULTISEG example in the DOS package. Thanks again man. |
|||
13 Aug 2006, 13:42 |
|
2 12 Oct 2006, 07:50
I don't really know much about this?
Why not do this? Code: use16 org 256 mov ah, 09h mov dx,msg int 21h int 20h msg: db 'Hello World!$' Is there some strange reason for adding format MZ? I think you're trying to make an EXE. When I assembled that original code,it gave me problems. It seems making DOS COM files is easier and they are smaller. |
|||
12 Oct 2006, 07:50 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.