www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/08/03:32:06

From: John Hosick <phosick AT atikokan DOT lakeheadu DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Extended Inline Assembly Help
Date: Fri, 07 Aug 1998 20:41:03 -0700
Organization: Lakehead Universtiy
Lines: 24
Message-ID: <35CBC8CE.4BB4@atikokan.lakeheadu.ca>
NNTP-Posting-Host: atik2-23.lakeheadu.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Someone please help me. I bought a book that uses Intel assembly and but
I'm using DJGPP so I have to use AT&T assembly syntax. To switch to mode
3h I use the following procedure:

void set_video_mode (int vid_mode)
{
   asm ("movb $0, %%ah\n\t"
        "movb $vid_mode, %%al\n\t"
        "int $0x10\n\t"
        : /* no output registers */
        : "al" (vid_mode)
        : "ah", "al");
}

When I compile the program it says:

Error: graph.o: In function `set_video_mode':
graph.c(20) Error: undefined reference to `vid_mode'

What does this mean? And how do I fix this?
Also is there a book out there which teaches AT&T assembly language
syntax?

John Hosick

- Raw text -


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