www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/15/06:00:26

From: Vic <tudor AT cam DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Assembly
Date: Fri, 14 Nov 1997 20:34:14 -0500
Organization: Communications Accessibles Montreal, Quebec Canada
Lines: 32
Message-ID: <346CFC16.5078@cam.org>
References: <64hnus$dr9 AT mtinsc02 DOT worldnet DOT att DOT net>
NNTP-Posting-Host: dynamicppp-187.hip.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Me wrote:
 
> If I try to compile this in NASM, I get errors galore.  
NASM is not TASM compatible.And that is it.
the following proggie will do what you want, but it won't compile for
DJGPP. it compiles to a COM file.
[BITS 16]
[ORG 100h]
jmp start
Message db "Hello World",13,10,0

print:
                lodsb                   ; load byte at ds:si into al
                or al,al                ; test if character is 0 (end)
                jz done
                mov ah,0eh              ; put character
                mov bx,0008             ; attribute
                int 0x10                ; call BIOS
                jmp print
              done:
                ret

start:

mov si,Message
call print
ret


-- 
--> http://www.cam.org/~tudor <--
"Sex is not the answer.  Sex is the question.  Yes is the answer."

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019