News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

need help running my 16-bit code on masm32

Started by crazyhorse, December 12, 2011, 06:19:49 AM

Previous topic - Next topic

crazyhorse

Hello everyone. I have a 16-bit code I want to run on masm32. For the life of me, I cannot get it to an .exe or .com file to work

basically I

1.open masm32.
2. type in my code which is about 300 lines
3. save the file in the masm32 folder as dracula.asm
4. click on the command prompt icon on masm32

3. type \masm32\bin\ml /c dracula.asm                       <<< dracula is the name of my file
4. type \masm32\bin\link16 dracula.obj

but then i get

5. Run File [ dracula.asm] :   .....     I don't konw what to type here...
6. List FIle [nul.map]:      I don't know what to type here either
7. Libraries [.lib]:   
8. Definitions File [ nul.def]:

basically i don't know what to input into 5-8 steps above.

I tried to just press ENTER for lines 5-8 without typing anything but then i get "THERE WAS AN ERROR IN CREATING" when i run dracula.exe file

Any help would be greatly appreciated

hutch--

The problem is no-one can help you unless you show them what the code is you are trying to build.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

bomz

http://www2.hawaii.edu/~pager/312/masm%20615%20downloading.htm
Quote@ECHO OFF
COLOR 9F
C:\MASM615\BIN\ML.EXE NONAME.asm /AT /Bl C:\MASM615\BIN\LINK.EXE
pause
Quote@ECHO OFF
COLOR 9F
C:\MASM611\BIN\ML.EXE NONAME.asm /AT
C:\MASM611\BINR\LINK.EXE NONAME.obj /t
pause
I prefer TASM 4.0
compile in masm615 now
QuoteCSEG segment
assume cs:CSEG
org 100h
Begin:
mov ax,12h
INT 10h
mov dx,3c8h
mov al,0
out dx,al
mov dx,3c9h
mov al,0
out dx,al
mov al,0
out dx,al
mov al,63
out dx,al
xor ax,ax
int 33h
mov ax,1h
int 33h
above:
mov ah, 1h
int 16h
jne exit
mov ax,3h
int 33h
and bx, 01h
cmp bx, 00h
je above
mov ax,2h
int 33h
mov ah, 0ch
mov al, 15
int 10h
mov ax,1h
int 33h
jmp above
exit:
ret
CSEG ends
end Begin

bomz

Quote5. Run File [ dracula.asm] :   .....     I don't konw what to type here...
6. List FIle [nul.map]:      I don't know what to type here either
7. Libraries [.lib]:   
8. Definitions File [ nul.def]:
anything - press enter
masm32
QuoteMicrosoft (R) Macro Assembler Version 8.00.50727.104
Copyright (C) Microsoft Corporation.  All rights reserved.

        ML [ /options ] filelist [ /link linkoptions ]

/AT Enable tiny model (.COM file)         /omf generate OMF format object file
/Bl<linker> Use alternate linker          /Sa Maximize source listing
/c Assemble without linking               /safeseh Assert all exception
/Cp Preserve case of user identifiers              handlers are declared
/Cu Map all identifiers to upper case     /Sf Generate first pass listing
/Cx Preserve case in publics, externs     /Sl<width> Set line width
/coff generate COFF format object file    /Sn Suppress symbol-table listing
/D<name>[=text] Define text macro         /Sp<length> Set page length
/EP Output preprocessed listing to stdout /Ss<string> Set subtitle
/F <hex> Set stack size (bytes)           /St<string> Set title
/Fe<file> Name executable                 /Sx List false conditionals
/Fl[file] Generate listing                /Ta<file> Assemble non-.ASM file
/Fm[file] Generate map                    /w Same as /W0 /WX
/Fo<file> Name object file                /WX Treat warnings as errors
/FPi Generate 80x87 emulator encoding     /W<number> Set warning level
/Fr[file] Generate limited browser info   /X Ignore INCLUDE environment path
/FR[file] Generate full browser info      /Zd Add line number debug info
/G<c|d|z> Use Pascal, C, or Stdcall calls /Zf Make all symbols public
/H<number> Set max external name length   /Zi Add symbolic debug info
/I<name> Add include path                 /Zm Enable MASM 5.10 compatibility
/link <linker options and libraries>      /Zp[n] Set structure alignment
/nologo Suppress copyright message        /Zs Perform syntax check only
/errorReport:<option> Report internal assembler errors to Microsoft
    none - do not send report
    prompt - prompt to immediately send report
    queue - at next admin logon, prompt to send report
    send - send report automatically
.
QuoteLINK @<response file>
LINK <objs>,<exefile>,<mapfile>,<libs>,<deffile>

Valid options are:
  /?                             /ALIGNMENT
  /BATCH                         /CODEVIEW
  /CPARMAXALLOC                  /DOSSEG
  /DSALLOCATE                    /DYNAMIC
  /EXEPACK                       /FARCALLTRANSLATION
  /HELP                          /HIGH
  /INFORMATION                   /LINENUMBERS
  /MAP                           /NODEFAULTLIBRARYSEARCH
  /NOEXTDICTIONARY               /NOFARCALLTRANSLATION
  /NOGROUPASSOCIATION            /NOIGNORECASE
  /NOLOGO                        /NONULLSDOSSEG
  /NOPACKCODE                    /NOPACKFUNCTIONS
  /NOFREEMEM                     /OLDOVERLAY
  /ONERROR                       /OVERLAYINTERRUPT
  /PACKCODE                      /PACKDATA
  /PACKFUNCTIONS                 /PAUSE
  /PCODE                         /PMTYPE
  /QUICKLIBRARY                  /SEGMENTS
  /STACK                         /TINY
  /WARNFIXUP

sinsi

The old 16-bit linker needed 4 parameters, you can supply them all seperated by a comma or just use defaults.
link16 dracula,,,,
or
link16 dracula;
Light travels faster than sound, that's why some people seem bright until you hear them.

bomz

Quote@ECHO OFF
COLOR 9F
C:\masm32\bin\ml.exe /AT NONAME.asm
rem C:\masm32\bin\LINK16.EXE
C:\masm32\bin\LINK16.EXE /T NONAME.obj
rem C:\masm32\bin\LINK16.EXE /?
pause

bomz

Now I make OBJECT without errors, but can't LINK it.
C:\masm32\bin\ml.exe /AT /c NONAME.asm
The reason was:
QuoteCSEG segment
assume cs:CSEG
org 100h
_Begin:

ret
CSEG ends
end _Begin
in uderline sign before Begin

bomz

Quote@ECHO OFF
COLOR 9F
C:\masm32\bin\ml.exe /omf NONAME.asm
C:\masm32\bin\LINK16.EXE /TINY NONAME.obj,,nul,,,
REM del NONAME.obj
pause

http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/0c70e901-d2be-43c3-8005-b892fa76040b


QuoteCSEG segment
assume cs:CSEG
org 100h
Begin:

ret
CSEG ends
end Begin

Quote@ECHO OFF
COLOR 9F
C:\masm32\bin\ml.exe /AT /omf NONAME.asm
C:\masm32\bin\LINK16.EXE /TINY NONAME.obj,NONAME.com,nul,,,
pause

DRUG&DROP
Quote@ECHO OFF
COLOR 9F
cd /d %~dp1
C:\masm32\bin\ml.exe /AT /omf %~s1
C:\masm32\bin\LINK16.EXE /TINY %~sn1.obj,%~sn1.com,nul,,,
del %~sn1.obj
pause