[comp.sys.ibm.pc] Request for help with EGA board problem

ast@botter.UUCP (06/16/87)

I have been told that it is possible to get an EGA board to act 
like a 16K CGA board by outputting two bytes:
    4 to port 3C4
    1 to port 3C5

I have tried this on the Paradise EGA board, and it doesn't seem to work.

I have some software that directly addresses the CGA card and does its own
scrolling by outputting bytes to the 6845, but with the EGA card it works
funny due to the board not wrapping around at the 16K mark as the CGA card
does.  The screen goes blank and other strange things happen.

If anyone who understands EGA cards (or even anyone who has the manual)
could help, it would be greatly appreciated.  There have been negotiations
with the local dealer for 6 months just trying to get an EGA manual, and
it looks like that will ultimately fail.   

Please reply by e-mail to ast@cs.vu.nl

Andy Tanenbaum

rosen@mtgzz.UUCP (t.rosenfeld) (06/29/87)

Subject: Re: Inline assembler in Microsoft C ????
Newsgroups: comp.sys.ibm.pc,comp.lang.c ,att.sys.pc6300
Keywords: Inline assembler code
References: <608@zen.UUCP> <2299@hoptoad.uucp> <2093@emory.UUCP>

In article <2093@emory.UUCP>, platt@emory.UUCP writes:
> In article <2299@hoptoad.uucp> pozar@hoptoad.UUCP (Tim Pozar) writes:
> >In article <608@zen.UUCP> vic@zen.UUCP (Victor Gavin) writes:
> >>
> >>Can anyone tell me if there is an "inline" assembler capability for this
> >>compiler.
> Having done a fair amount of C/Assembler interfacing (using MS C 4.0)
> I can say that it's not too much of a burden to write the code, and
> link the .obj modules in at link time.  It also gives you more control
> over how and where your data is treated and stored.
> 
> Dan

As Dan writes MS tells you how to interface to assembly routines, but you 
probably would rather have inline code than be forced to do a CALL to
an assembly routine.

As far as I know there is no #asm directive in 4.0 but I think I heard there
will be in 5.0. One way to get around this is to compile your C code and have
the compiler generate the assembly module. (I think this is the -Fs option.)
Then enter your inline assembly at the correct loaction, assemble and link.
Of course if you ever want to edit the C source again you hac=ve to do it all
over again. 

This trick is also usefull to generate the corect compiler
directives to link an assembly function to the rest of your C  program.
That is write a null C funtion (e.g. ass_fun(){}) and then compile
with -Fs and then insert your assembly into the .asm file.

WARNING: When using the MS C 3.0 version in large model mode I ran into
a bug were the .asm file prodused by the -Fs option was wrong. Sometimes
it would not link, or worse yet it would link but the segment registers would
be wrong. I think I found the file was OK except it loaded SS with _DATA
instead of DGROUP.
-- 
Tom Rosenfeld	 	@ AT&T Information Systems Labs, Middletown, NJ
			(201) 957-5867 	
			UUCP:		{harpo,ihnp4,burl,akgua}!mtgzz!rosen
Disclaimer: I don't claim anything.