News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Error Hello World

Started by x64Core, June 01, 2012, 06:25:56 AM

Previous topic - Next topic

x64Core

Hello guys, well, I'm reading about DOS applications... and I can not assemble this hello world... lol

        assume  cs:cseg, ds:dseg, ss:sseg
cseg    segment
start:
    mov ax,dseg
    mov ds,ax   
    lea dx,message
    mov ah,09h
    int 21h

    mov ax,4c00h
    int 21h

cseg    ends

dseg    segment byte
    message db  "Hello, World!$"
dseg    ends

sseg    segment stack
        db      100h    dup(?)
sseg    ends
end start


after, I tried with a bat file:

@echo off

"\Masm32\Bin\doslnk.exe /NOLOGO,3" "DOSMyHello.obj"

pause


why lol

qWord

Shouldn't you select a .model and an instruction set? Also, do you call an assembler before linking?

MREAL macros - when you need floating point arithmetic while assembling!

MichaelW

It works for me, assembling with ML 6.15 and linking with Linker Version 5.60.339.

ml /W3 /Fl /Sa /c rhl.asm
link16 /MAP rhl;

These are my normal command lines, but you can eliminate all of the switches except /c.
Well Microsoft, here's another nice mess you've gotten us into.

x64Core

oh... Now I'm looking the doc lnk.exe program in my folder.... and I did not find it...
perhaps radAsm is evil and must be link16? ... I will download the latest version of Masm... thanks guys  :biggrin: