Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!uflorida!reef.cis.ufl.edu!jdb From: jdb@reef.cis.ufl.edu (Brian K. W. Hook) Newsgroups: comp.os.msdos.programmer Subject: C and ASM mixed source Message-ID: <26590@uflorida.cis.ufl.EDU> Date: 30 Jan 91 19:39:29 GMT Sender: news@uflorida.cis.ufl.EDU Distribution: comp Organization: UF CIS Dept. Lines: 28 To everyone who replied, thank you. Next question: Since most of the replies stated that inline asm was the fastest, but that compiled .OBJ files was the most reusable, couldn't the two be mixed without any real speed reductions? For example, instead of setCursorSize written in ASM couldn't I do it like this without a significant amount of speed or code enlargement? SETCURSOR.C void setCursorSize ( unsigned char start, unsigned char end ) { asm { mov ah,1; /* Subfunction 0x01 -- set size */ mov ch,start; mov cl,end; int 10; } } I'm not sure if the syntax is exact (do I use semi-colons at the end of inline asm statements?)....but you get the gist. Wouldn't the C compiler automatically do all the stack clean up for me, adjust for variable offsets for each memory model, etc. etc. but I still retain most of the advantages of assembly? Brian