flat assembler
Message board for the users of flat assembler.
Index
> Windows > Running programs |
Author |
|
polygon7 22 Aug 2005, 20:10
Hi,
add "format MZ" at begin of your source file: Code: format MZ MOV AH,02 MOV DL,"!" INT 21h MOV AH,04Ch MOV AL,00 INT 21h _________________ best regards p7 |
|||
22 Aug 2005, 20:10 |
|
vid 22 Aug 2005, 20:47
click start->run and type "command" (or "cmd" under XP). It opens DOS console, let me know with further problems.
btw: "format MZ" means you want to produce .EXE file, you can also use "org 100h" to produce .COM which is more natural solution in this case |
|||
22 Aug 2005, 20:47 |
|
kazsemisonic 23 Aug 2005, 01:21
Thanks, I stuck the "org 100h" in there and it made the .com. Just wondering, when I run it my screen blinks and the program is up, why does it do that? Thanks again.
- Kaz |
|||
23 Aug 2005, 01:21 |
|
vid 23 Aug 2005, 10:36
hmm, what do you mean by "program is up?" are you running it under windoze's console or how?
|
|||
23 Aug 2005, 10:36 |
|
Madis731 23 Aug 2005, 10:39
Because when it finishes - it has nothing to do and exits. You have to either put "pause" in the end or infinite loop. Alternatively you can use the command/cmd suggestion made few posts before.
I usually make some a.bat file that has "cmd" ("command" on Win9x) written in it. When opening it in the same directory as your .com file is you can just type the file's name. You can see that it finishes immediately giving you back your blinking (or not ) cursor like this: Code: C:\WINDOWS\Desktop>command Microsoft(R) Windows 98 (C)Copyright Microsoft Corp 1981-1999. C:\WINDOWS\Desktop>hello Hello, World! C:\WINDOWS\Desktop>_ -OR- Code: C:\Documents and Settings\User\Desktop>cmd Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\Documents and Settings\User\Desktop>hello Hello, World! C:\DOCUME~1\User\Desktop>_ |
|||
23 Aug 2005, 10:39 |
|
kazsemisonic 23 Aug 2005, 15:32
I got it all figured out now. I can't remember what I did for it to act like that, but I thing I was executing the program from the directory it was in. The screen would go black and then come back up with a new ms-dos console open (not the regular one, but with the file - edit stuff at the top) and the program running in it. Thanks for the help, now it's off to learn some more assembly....
|
|||
23 Aug 2005, 15:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.