Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!uwvax!rutgers!bellcore!texbell!bigtex!mybest!moray!siswat!buck From: buck@siswat.UUCP (A. Lester Buck) Newsgroups: comp.sys.ibm.pc.rt Subject: ACG Display question & VRM sample program (long) Keywords: Advanced Color Graphics AIX VRM sample code stanzas Message-ID: <392@siswat.UUCP> Date: 26 Apr 89 03:35:12 GMT Organization: Photon Graphics, Houston Lines: 304 I need to do some VRM programming, so I was writing a VRM printf() routine that prints on the console from the bowels of VRM. As far as I can tell, the entire virtual terminal system is inaccessible from _within_ VRM (it does not support receipt of general queue elements), so I am just blasting away at the bare hardware to get my debugging information on the screen. (The VRM debugger has its uses, but I need a more dynamic tool. Another VRM programmer I talked to at IBM did his own printf() for the monochrome display - why does everyone have to reimplement this themselves?) I got a basic varargs printf() from someone on the net, found an 8x14 EGA font, and wrote a vrmputc() tty-mode routine. I have gotten this to work, but only by kludging a bit, and I was wondering if anyone, AIX or AOS, knows the tricks of the Advanced Color Graphics Display Adapter. At the end of this posting, I include a complete, but empty, piece of code that plugs into VRM. This is the smallest piece I have gotten to work so far; if you know how to make it smaller, please speak up. This should install directly into AIX, with "vrmconfig -{a,d} ydev0". At the -a call, the VRM debugger will start at the trap instruction, type "g" and AIX comes back. With a simple makefile and some shell scripts to run vrmconfig, the debug cycle time is quite short (one of the very nice points about VRM that I hope is not going away in the new version). All my information about the ACGD comes from the (rather sparse) documentation in the Hardware Technical Reference manual. My main question about the ACGD Adapter is that I can't get the auto-increment facility to write the LSB of the 16 bit transfer, at least in a running VRM program. It works just fine if I do it by hand from the debugger. I.e., if I perform the following sequence in the debugger: >sth f0000150 c030 >stc f0000154 1f