steve@wlbreng1.UUCP (Steve_Childress) (06/30/86)
I'm plodding my way through writing a hard disk driver for the Amiga. From an AMICUS disk, I got a copy of a skeletal driver which is an enhanced version of the one printed in the ROM Kernel Manual. Trouble is, the code I have references a file named messages.i which I presume contains the code for a macro named PUTMSG. This macro is apparently a simple version of printf(), but for Assembly language folks. The AMICUS disk did contain asmsupp.i; these are other misc macros. 1 -- I'd sure appreciate access to messages.i. 2 -- I'd *love* to converse with someone who has traveled this road before me. (western digital WD1001 controller -- I've got the interface working -- now struggling with the incomplete driver writing documentation aspects. Regards, Steve Childress (818) 706-5247 {trwrb, scgvaxd, ihnp4, voder, vortex} !wlbr!wlbreng1!steve
carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (07/03/86)
In article <124@wlbreng1.UUCP> steve@wlbreng1.UUCP (Steve_Childress) writes: >I'm plodding my way through writing a hard disk driver for the Amiga. >From an AMICUS disk, I got a copy of a skeletal driver which is an >enhanced version of the one printed in the ROM Kernel Manual. Trouble is, >the code I have references a file named messages.i which I presume contains >the code for a macro named PUTMSG. This macro is apparently a simple version >of printf(), but for Assembly language folks. > Here's a modified PUTMSG that will work with the sample device Note that this is for sending debugging information out the serial port and is not intended for inclusion in a finished driver. --------------------------------------------------------------- ************************************************************************* * * * Copyright (C) 1985, Commodore Amiga Inc. All rights reserved. * * * ************************************************************************* XREF KPutFmt PUTMSG: MACRO * level,msg IFGE INFOLEVEL-\1 PEA myName(PC) MOVEM.L A0/A1/D0/D1,-(SP) LEA msg\@,A0 LEA 4*4(SP),A1 JSR KPutFmt MOVEM.L (SP)+,D0/D1/A0/A1 ADDQ.L #4,SP BRA.S end\@ msg\@ STRINGR <\2> DS.W 0 end\@ ENDC ENDM andy -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
steve@wlbreng1.UUCP (07/08/86)
--- Thanks to the four people who took the time to send me a copy of the source to PUTMSG, a macro calling KPutFmt. The Amigans here are an exceptional group of very considerate folks. Ah, but I do have 'yet another rub'.... PUTMSG calls a macro 'STRINGR' which is undefined. I substituted DC.B for STRINGR and all seemed OK. Secondly, the RKM description of KPutFmt does not explain the syntax of the format string --- it is said that is is similar to K&R's printf(). By experiment, I know that \n doesn't work. If you look at KPutFmt in the RKM, you'll see that someone forgot a paragraph explaining this. Regards, Steve Childress (818) 706-5247 (days) {trwrb, scgvaxd, ihnp4, voder, vortex} !wlbr!wlbreng1!steve