Article View: comp.os.linux.development.apps
Article #13Assembler Statement in C program
From: Meir Dukhan
Date: Sun, 21 Apr 1996 11:50
Date: Sun, 21 Apr 1996 11:50
38 lines
1181 bytes
1181 bytes
Hi,
I'm trying to port some piece of C code to linux/unix.
This code contains statement in assembler.
1. How can I compile it under linux with gcc or gas ?
2. Will this be portable ?
example:
static void clear_screen(void)
{
_asm
{
mov ax,40h
mov es,ax
mov ax,0600h
mov bx,0700h
mov cx,0
mov dl, es:byte ptr[4ah]
dec dl
mov dh, es:byte ptr[84h]
or dh,dh
jnz k1
mov dh,24
k1:
int 10h
mov dx,0
mov ax,0200h
mov bx,0
int 10h
}
}
--
Meir
Technical Details
Message-ID:
<317A2105.77EF485@bis.co.il>Path:
arc1-ca.pugleaf.net!sarah.netmedia.co.il!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sarah.netmedia.co.il!usenet From: Meir Dukhan <meir@bis.co.il> Newsgroups: comp.os.linux.development.apps,comp.unix.programmer,comp.lang.c Subject: Assembler Statement in C program Date: Sun, 21 Apr 1996 13:50:29 +0200 Organization: BIS Software Ltd Message-ID: <317A2105.77EF485@bis.co.il> NNTP-Posting-Host: 192.115.155.42 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.3 i486) CC: meir@bis.co.il