X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Joel Saunders" Newsgroups: comp.os.msdos.djgpp Subject: Inline assembly. Date: Mon, 28 Jan 2002 15:27:19 +0000 (UTC) Organization: Mailgate.ORG Server - http://www.Mailgate.ORG Lines: 33 Message-ID: NNTP-Posting-Host: spider-te074.proxy.aol.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.mailgate.org 1012231185 3635 152.163.195.209 (Mon Jan 28 16:27:19 2002) X-Complaints-To: abuse AT mailgate DOT org NNTP-Posting-Date: Mon, 28 Jan 2002 15:27:19 +0000 (UTC) Injector-Info: news.mailgate.org; posting-host=spider-te074.proxy.aol.com; posting-account=62691; posting-date=1012231185 User-Agent: Mailgate Web Server X-URL: http://mygate.mailgate.org/mynews/comp/comp.os.msdos.djgpp/fa9bfb1b9e164c8e7b3ecc848e67eadc.62691%40mygate.mailgate.org To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I don't have any experiance usign inline assembly in DJGPP because for one thing, I've only used Intel syntax, not AT&T, and secondly, I've never done PMode programming, only real mode. But I'm trying to learn this so I thought I'd try a simple string moving routine. I get two errors when I try using this. I'll show my routine, and below it, the errors. #include #include int _crt0_startup_flags = _CRT0_FLAG_NEARPTR; char *Screen_PTR = (char *)(0xB8000 + __djgpp_conventional_base); char My_Name[8] = {"J O E L"}; main(void) { __asm__(" movw My_Name, %si movw Screen_PTR, %di movw $7, %ecx movsb "); return 0; } -[_]--------------------------- Message Window -------------------- Creating: nptest.exe Error: nptest.o: In function `main': nptest.cpp(6) Error: undefined reference to `My_Name' Error: nptest.cpp(.text+0xd): undefined reference to `Screen_PTR' There were some errors What did I do wrong? -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG