WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
What is FASM G
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Looking to generate 16-bit exe from masm32, having trouble building dos-runnable 16-bit simple exe file

guyenWinasm
Quote Post


Active Member
***

Group: Members
Posts: 48
Member No.: 1386
Joined: 22-July 05


Sponsored Links
Hello, guys, been away from this wonderful forum for years and great to be back here.
It has been while since I programmed with x86 asm and moving back again!
Now having trouble building dos-runnable 16-bit simple exe file

here is the code and batch build files:
and used masm32 and link16.exe, that is how I used to build.
Some how I am havin L1101 with following error:
From output i can see obj file is generated successfully but linker is having issue with L1101 invalid object module. Any help is appreciated! THanks.,

==LINK ERROR===

Z:\sw.dev>ml /c /Fm /Fl /coff asmfile.asm
Microsoft ® Macro Assembler Version 9.00.21022.08
Copyright © Microsoft Corporation. All rights reserved.

Assembling: asmfile.asm

Z:\sw.dev>link16 asmfile.obj, asmfile.exe,,,,

Microsoft ® Segmented Executable Linker Version 5.60.339 Dec 5 1994
Copyright © Microsoft Corp 1984-1993. All rights reserved.

asmfile.obj : fatal error L1101: invalid object module
Object file offset: 1 Record type: 4c

============ASM FILE============

.386
.model flat, stdcall

sta segment stack
db 100h dup(0)
sta ends

data segment
db 100h dup(0)
data ends
code segment
assume cs:code, ds:code,ss:sta

_start:
mov ax, 200h
; mov ax, code
; mov ds, ax
; mov dx, offset boker
; mov ah, 8
; int 21h
; mov ax, 4c00h
; int 21h
; boker db 'hello world!$'

code ends
end _start

==BATCH FILE===

del *.obj
del *.exe
del *.lst

ml /c /Fm /Fl /coff asmfile.asm
link16 asmfile.obj, asmfile.exe,,,,
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google