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
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) 1 [2]   ( Go to first unread post )

help with hello world - dos style interrupt 21 9, question about winasm dos project using interrupt 21 dos function 9

SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


Hmm...

Last I knew "Console Apps" are Win32 Only! blink.gif
PM
Top
tonyatl
Quote Post


New Member
*

Group: Members
Posts: 7
Member No.: 32379
Joined: 26-February 10


yes all console apps are win32 but the ntvdm emulates dos...chasm knows the right compile/link options because the program runs successfully in the ntvdm (console window)....

i believe that i am getting closer to a solution....i believe that i need /omf switch on linker and need 16 bit linker which i just downloaded....not sure where to tell winasm or vs2008 use link.exe instead of the default which i guess is ml.exe

when the program is set as .80386 i believe the program is trying to run in the privilege 386 space but the os prevents access to dos interrupts...but i am now attempting to define as .8086 which i believe will cause it to run in a protected space from which it is allowed to issue dos interrupts....

chasm can do it so i know there is a way....
PMEmail Poster
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


If your Studio is setup correctly...

For new projects...

Simply choose Standard .exe for GUI app or Console App for Win32.

or

Choose DOS project for Dos16 .exe's

Then the studio knows what type of project you are doing. wink.gif
PM
Top
tonyatl
Quote Post


New Member
*

Group: Members
Posts: 7
Member No.: 32379
Joined: 26-February 10


problem is now solved.

for folks who may find themselves in a similar situation i refer them to http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_02.htm

i thought i had followed all of these steps before posting but apparently not.

i did select dos project and this code structure
i also omitted a dos 20h call as i believe the .exit code is handling that....

i did not need the 16 bit linker or the /omf switch....the settings in winasm worked as is...

so now the program builds with both chasm and masm but the two code sets are
not the same.....it's an interesting problem - very arcane which no one doing real work should encounter....

one last note - the code did not compile in vs2008 - gave error
1>.\addexamp.asm(35) : error A2006:undefined symbol : DGROUP

obviously there is a need to reconcile environments but i have no idea where dgroup is defined such that winasm compiles but vs does not....

CODE

; This is the structure of a main module
; using simplified segment directives

       .MODEL small, c; This statement is required before you
                     ;   can use other simplified segment directives

       .STACK        ; Use default 1-kilobyte stack

       .DATA          ; Begin data segment

                     ; Place data declarations here

       .CODE          ; Begin code segment
       .STARTUP      ; Generate start-up code

                     ; Place instructions here

       .EXIT          ; Generate exit code
       END
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) 1 [2]  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