The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: hhhmasa on February 15, 2011, 10:40:40 PM

Title: OK code in emulator, not working in command prompt
Post by: hhhmasa on February 15, 2011, 10:40:40 PM
hi. I wrote code in emu8086 and it is working when it goes through emulator. But when I try to start it in command prompt it bugs. When I try parts of programm in command prompt it is OK, but whole programm is in problem. I don't know how to fix this. I tried with DOSBox but it bugs even there. I opened MASM32 but I am beginner and I can't work in that (i tried to compile my code in that and it found some error I am not capable to fix, I am not understanding what is problem). My .exe file is about 20 KB. Thank you in advance.
Title: Re: OK code in emulator, not working in command prompt
Post by: jj2007 on February 15, 2011, 10:49:41 PM
> My .exe file is about 20 KB

Do you seriously think we can help you based on this information? Post your complete code, and you may get help.
Title: Re: OK code in emulator, not working in command prompt
Post by: dedndave on February 15, 2011, 10:52:02 PM
it sounds like it is 16-bit code
in which case, the ML assembler will work, but LINK is a 32-bit linker
you need to use a 16-bit linker - LINK16

as for the bugs, we can't help you without seeing some code :red

below the reply window is an Advanced Options link that allows you to attach ZIP files

welcome to the forum   :U
Title: Re: OK code in emulator, not working in command prompt
Post by: MichaelW on February 15, 2011, 11:00:29 PM
How do you know that the code "bugs"? Are you getting any sort of error message?
Title: Re: OK code in emulator, not working in command prompt
Post by: hhhmasa on February 16, 2011, 01:21:05 AM
I added " ax = 0030h / int 10h " (set the video mode to be text 80x25) and now it works better, but this is wrong: it should write "NAME.....300" and it goes "NAME.....300000000000000000000000000" (or if it is 399, 99999999999999999). and has some more bugs

Thank you for quick help, I will post my code tomorrow or in a 2 days. Do you need comments in code (I should translate it to english then)

It is 16bit code and compiled and exe made in emu8086 which uses "fasm" - flat assembler.



Title: Re: OK code in emulator, not working in command prompt
Post by: dedndave on February 16, 2011, 01:31:42 AM
that is mode 3 - not 30h
        mov     ax,3
        int     10h