flat assembler
Message board for the users of flat assembler.
Index
> Main > New to FASM. Which IDE? MZ EXE Hello World issues |
Author |
|
Picnic 02 Mar 2013, 08:13
|
|||
02 Mar 2013, 08:13 |
|
jayanthd 02 Mar 2013, 09:49
Hi Picnic
I don't understand this code Code: ; fasm example of writing simple EXE program format MZ push cs pop ds mov ah,9 mov dx,hello int 21h mov ax,4C00h int 21h hello db 'Hello world!',24h In first line Code: format MZ Why push cs and then pop ds? Why mov, dx, hello and not mov dx, offset hello? _________________ Thanks and Regards Jayanth D |
|||
02 Mar 2013, 09:49 |
|
Picnic 02 Mar 2013, 10:26
Right.
The specific example uses the same segment for both data and code. In MZ format you have to proper initialize DS. It's the same. Fasm doesn't use the "offset" "ptr" directives. Fasm documentation: http://flatassembler.net/docs.php Last edited by Picnic on 02 Mar 2013, 11:00; edited 1 time in total |
|||
02 Mar 2013, 10:26 |
|
jayanthd 02 Mar 2013, 10:59
Picnic wrote: Right. @Picnic So, ds is used as the segment here. Right? Can I use Code: mov ax, cs mov ds, ax Code: push cs pop ds _________________ Thanks and Regards Jayanth D |
|||
02 Mar 2013, 10:59 |
|
Picnic 02 Mar 2013, 11:09
Sure you can. You can't however, as you see, move CS directly to DS.
|
|||
02 Mar 2013, 11:09 |
|
AsmGuru62 02 Mar 2013, 12:53
jayanthd:
You can try this IDE (I wrote it for myself): http://board.flatassembler.net/topic.php?t=13080 Also, check out the whole "IDE Development" sub-section of this forum. There are a lot of IDEs being discussed there. |
|||
02 Mar 2013, 12:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.