This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: assembler


Not a very GNU-Win32 question, more of a gcc question, I only CC the list to
let people know I've tried to answer it.

Alex <alexl@i-france.com> wrote:

>can someone tell me how to make assembler in a C prog!!!!
>
>i thought it was
>asm{
>mov ax, 13h;
>int 10h;
>}
>but i got errors when i compiled that with gcc


gcc does not use Intel assembler syntax, it uses AT&T-like assembler syntax.
Also, the inline asm statement in gcc is somewhat difficult to use (to say
the least). There is some documentation of the syntax in the gcc
documentation (see Extended Asm under C Extensions) as well as the
documentation for as itself. You might want to search the net for a document
called "Interfacing DJGPP with Assembly-Language Procedures" written by
Matthew Mastracci. I think I found it in connection with nasm (which you
will probably want to look at as well, see
http://www.web-sites.co.uk/nasm/).

As for changing the video mode the Windows-correct answer is "don't do
that". There are other programs running using the same screen and changing
the video mode under them is inpolite. Next thing you'll start assuming you
can just write anywhere you want on the screen with impunity... :-) The real
answer is that I don't know how to do it exactly, though I know it is
possible using DirectX at least.

Colin.

- Colin Peters - colin at fu.is.saga-u.ac.jp
- http://www.geocities.com/Tokyo/Towers/6162/index.html
- Go not to usenet for counsel, for it will say both
- 'yes' and 'no' and 'try another newsgroup'.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]