www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/24/15:32:26

From: "Michael Duxbury" <M DOT R DOT Duxbury AT btinternet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: assembler probs
Date: Sat, 24 Mar 2001 20:18:38 -0000
Organization: BT Internet
Lines: 68
Message-ID: <99ivbn$d45$1@uranium.btinternet.com>
References: <99dc06$p3b$1 AT uranium DOT btinternet DOT com> <99g2bn$dtt$4 AT ctb-nnrp2 DOT saix DOT net> <99iuvh$cbn$1 AT uranium DOT btinternet DOT com>
NNTP-Posting-Host: host213-122-227-129.btinternet.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

It was pointed out that that syntax is wrong, and also I was asked why I
would try to write code in this way.

Like I said just trying to learn a little. I would like to know how I could
do this type of string insertion into assembly running in C, like I could in
stand alone assembly.

Ta.
"Michael Duxbury" <M DOT R DOT Duxbury AT btinternet DOT com> wrote in message
news:99iuvh$cbn$1 AT uranium DOT btinternet DOT com...
> Thanks for the replys.
>
> I am just learning a bit of assembler within C. My code may not really be
> efficient or have any practical use other that helping me learn.
>
> the problem i get flagged for is a parse error before hello. Which means
the
> syntax is wrong I think.
>
> I changed the syntax to resemble this:-
> hello:  .ascii "Hello, world!",  but still same problem.
>
> How can I just insert this string as I would in other assembly progs.
>
> Thanks.
> "Stefan Viljoen" <Stefan_Viljoen AT excite DOT com> wrote in message
> news:99g2bn$dtt$4 AT ctb-nnrp2 DOT saix DOT net...
> >
> > Michael Duxbury <M DOT R DOT Duxbury AT btinternet DOT com> wrote in message
> > news:99dc06$p3b$1 AT uranium DOT btinternet DOT com...
> > > I am trying to compile this but get a slight problem with the hello:
> db
> > > void drawline(int x1,int x2, int y, char color)
> > > {
> > >   asm (" movb %ax , 0xa000");
> > > }
> > >
> > > Anyone help me out please?
> >
> > If you want to use the above to access video RAM, it won't work (I
think!)
> > What you need is a
> > descriptor to video RAM - you cannot use segment addresses in a segment
> > register to attempt to access video RAM like you can do in real mode.
See
> > http://home.intekom.com/rylan/ for some simple assembler examples (using
> > NASM) of how to access 320x200x256 VGA at the VGA video segment under
> DJGPP
> > + NASM. (NASM is a freeware assembler that accepts intel syntax assembly
> and
> > outputs DJGPP compatible COFF format object files that DJGPP can link
and
> > use).
> >
> > Regards,
> >
> > Stefan Viljoen
> > F/EMS Dispatcher
> > Potchefstroom F/EMS
> > South Africa
> > http://home.intekom.com/rylan/
> >
> >
> >
>
>


- Raw text -


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