Mail Archives: djgpp/2001/03/24/15:16:45
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 -