From: "Thiessen" Newsgroups: comp.os.msdos.djgpp Subject: Converting Intel asm to AT&T syntax Date: Mon, 26 Oct 1998 18:55:21 -0800 Organization: http://www.supernews.com, The World's Usenet: Discussions Start Here Lines: 56 Message-ID: <713cu6$msm$1@supernews.com> NNTP-Posting-Host: 204.94.54.47 X-Trace: 909457158 PA9MP0BZW362FCC5EC usenet80.supernews.com X-Complaints-To: newsabuse AT supernews DOT com X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, First of all, I hope this isn't the wrong newsgroup to post this in. I am trying to learn the AT&T syntax of inline assembly. I need to convert some inline assembly functions to the AT&T syntax because DJGPP doesn't support the way I have it below. I can't figure it out since I am unfamiliar with any kind of assembly language. The code is below. If anyone could help convert it so I would know what to do for future programs that use inline assembly,or if anyone could reccomend a link to a site that can explain what I am trying to learn I would appreciate it. **************************************************************************** ** /*This is the code for four functions: get_mode(), save_mode(unsigned char mode), pset(int x,int y,unsigned char color), and line(int x1,int y1,int x2,int y2,unsigned char color).*/ /*get_mode*/ unsigned char get_mode(void) { unsigned char mode; _asm mov ah,0fh _asm int 10h _asm mov mode,al return(mode); } /*save_mode*/ void set_mode(unsigned char mode) { _asm mov ah,00 _asm mov al,mode _asm int 10h } /*pset*/ void pset(int x,int y,unsigned char color) { _asm mov ah,0ch _asm mov al,color _asm mov cx,x _asm mov dx,y _asm int 10h } /*line*/ void line(int x1,int y1,int x2,int y2,unsigned char color) { int x,y; for(y=y1;y<=y2;y++) pset(x1,y,color); } **************************************************************************** *** Thanks