Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxl!houxm!ihnp4!fortune!crane From: crane@fortune.UUCP Newsgroups: net.micro.pc Subject: CI-86 C compiler calling DOS Message-ID: <1895@fortune.UUCP> Date: Tue, 6-Dec-83 13:06:25 EST Article-I.D.: fortune.1895 Posted: Tue Dec 6 13:06:25 1983 Date-Received: Fri, 9-Dec-83 02:45:27 EST Organization: Fortune Systems, Redwood City, CA Lines: 46 It's been awhile since I've worked on the PC, but I remember that the IBM technical reference manual has some assembly language listing in the back that do all kinds of I/O-type stuff provided you load the registers right and send the routine the right interrupt code. Anyway, I wrote a program to test these capabilities and decided to keep the listing, part of which I'm going to include here. I'm just going to show one routine -- cursor positioning-- but you should get the idea of how the rest might work. See the tech ref manual for details on how to call the other functions. /* define register structures as full registers and half registers */ struct regval{int ax,bx,cx,dx,si,di,ds,es;}; struct regvalb{char al,ah,bl,bh,cl,ch,dl,dh,sl,sh,dl,dh,dsl,dsh,esl,esh;}; main() { ... } /* ** routine to position the cursor at row/column (0,0) = home */ poscur(page,row,col) int page,row,col; { struct regval srv,rrv; /* sending/receiving reg values */ srv.ah = 2; /* position cursor */ srv.bh = page; /* page number */ srv.dh = --row; /* row rumber */ srv.dl = --col; /* column number */ sysint(0x10,&srv,&rrv); /* call interrupt 0x10 */ } It is not necessary to use receiving registers. You could use the sending ones. This should give a person enough to go on. If not, ask again, I'll give some more examples. John Crane Fortune Systems Redwood City, CA