.TITLE DUMP$FAO_LINE, format one line .IDENT 'V04-000' ;--- ; ;**************************************************************************** ;* * ;* COPYRIGHT (c) 1978, 1980, 1982, 1984 BY * ;* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * ;* ALL RIGHTS RESERVED. * ;* * ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ;* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ;* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ;* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ;* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * ;* TRANSFERRED. * ;* * ;* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * ;* CORPORATION. * ;* * ;* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * ;* * ;* * ;**************************************************************************** ;++ ; FACILITY: ; File dump utility. ; ; ABSTRACT: ; This module contains the routine to format one line. ; ; ENVIRONMENT: ; VAX native, user mode. ; ; AUTHOR: Benn Schreiber, Stephen Zalewski CREATION DATE: 22-Jun-1981 ; ; MODIFIED BY: ; ; V02-001 MLJ0033 Martin L. Jack, 23-Aug-1981 9:48 ; Minor cleanup to finish implementation. ; ;** .PSECT $CODE$,EXE,NOWRT .SBTTL DUMP$FAO_LINE, format one line ; ; Format one line of dump listing ; ; Inputs: ; ; 04(ap) = pointer to data to be dumped ; 08(ap) = number of entries per line ; 12(ap) = size of one entry ; 16(ap) = byte-offset value for side of line ; 20(ap) = number of entries in buffer ; 24(ap) = 0: longword, 1: word, 2: byte ; 28(ap) = address of descriptor for FAO control string ; 32(ap) = address of descriptor for output buffer ; .entry dump$fao_line,^M movq 8(ap),r3 ; R3 = entries per line, R4 = size of entry mull2 r3,r4 ; compute number of bytes this line pushl 16(ap) ; push index to print on right hand side pushl 4(ap) ; push buffer address pushl r4 ; push number of bytes movl 20(ap),r2 ; get number of entries in line cmpl r2,8(ap) ; see if more than one line's worth bleq 10$ ; if leq no movl 8(ap),r2 ; yes, use max for one line 10$: movl 4(ap),r1 ; copy input data pointer movl 24(ap),r0 ; get/test field width beql 40$ ; if eql then longwords blbs r0,30$ ; branch if words ; ; push bytes onto stack ; 20$: movzbl (r1)+,-(sp) ; push one byte sobgtr r2,20$ ; do them all brb 50$ ; go call fao ; ; push words onto stack ; 30$: movzwl (r1)+,-(sp) ; push one word sobgtr r2,30$ ; do them all brb 50$ ; go call fao ; ; push longwords onto stack ; 40$: pushl (r1)+ ; push one longword sobgtr r2,40$ ; do them all ; ; call $FAO ; 50$: pushab (sp) ; push address of arg list pushl 32(ap) ; push output buffer descr. addr pushl (sp) ; also for output width pushl 28(ap) ; push fao control string addr calls #4,g^sys$faol ; call sys$faol to format string ret .end