@ GNU AS assembler header file for PDumper
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:48:23 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 19 May 1995

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef PDumper_Hdr
#  define PDumper_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

@Symbols for constants
#  define Error_PDumperUndeclared 0x5d7
#  define Error_PDumperTooOld 0x5d8
#  define Error_PDumperDuplicateModule 0x5d9
#  define Error_PDumperBadCall 0x5da
#  define Error_PDumperBadStrip 0x5db
#  define Error_PDumperBadPalette 0x5dc
#  define Error_PDumperNotLinked 0x5dd
#  define Error_PDumperReserved 0x5de
#  define Error_PDumperBadOutputType 0x5df
#  define Error_PDumperBlockNotFound 0x5e0
#  define Error_PDumperInUse 0x5e1
#  define PDumper_DeviceSpriteDevice 0x0
#  define PDumper_DeviceGenericDotMatrix 0x1
#  define PDumper_DeviceLaserjet 0x2
#  define PDumper_DeviceImagewriter 0x3
#  define PDumper_Device24Pin 0x4
#  define PDumper_DeviceDeskjet 0x5
#  define PDumper_StripMonochrome 0x0
#  define PDumper_StripGreyScale 0x1
#  define PDumper_Strip8Bit 0x2
#  define PDumper_Strip24BitMultiple 0x3
#  define PDumper_Strip16Bit 0x4
#  define PDumper_Strip24Bit 0x5
#  define PDumper_PassNumber 0x7fffff
#  define PDumper_FeatureHalftoneGrey 0x1
#  define PDumper_FeatureDiffusedGrey 0x2
#  define PDumper_FeatureHalftoneColour 0x4
#  define PDumper_FeatureDiffusedColour 0x8
#  define PDumper_FormatHalftoneGrey 0x0
#  define PDumper_FormatDiffusedGrey 0x1
#  define PDumper_FormatHalftoneColour 0x2
#  define PDumper_FormatDiffusedColour 0x3
#  define PDumper_FormatHalftoneMultipassColour 0x4
#  define PDumper_FormatDiffusedMultipassColour 0x5
#  define PDumper_FormatHalftone16BppColour 0x6
#  define PDumper_FormatDiffused16BppColour 0x7
#  define PDumper_FormatHalftone32BppColour 0x8
#  define PDumper_FormatDiffused32BppColour 0x9
#  define PDumper_HalftoneXResolution 0xff
#  define PDumper_HalftoneXResolutionShift 0x0
#  define PDumper_HalftoneYResolution 0xff00
#  define PDumper_HalftoneYResolutionShift 0x8

@Symbols for structure offsets and sizes
        .struct 0
        .skip   Bits
PDumper_JobFlags               : 

        .struct 0
        .skip   Int
PDumper_Device                 : 

        .struct 0
        .skip   Int
PDumper_StripType              : 

        .struct 0
        .skip   Bits
PDumper_Features               : 

        .struct 0
        .skip   Int
PDumper_Format                 : 

        .struct 0
        .skip   Bits
PDumper_HalftoneFlags          : 


@Symbols for SWI's and SWI reason codes
.set XPDumper_Info,0x61b00
.set PDumper_Info,0x41b00
   @Exit
   @  R0 = version (Int)
   @  R1 = features (PDumper_Features)

.set XPDumper_Claim,0x61b01
.set PDumper_Claim,0x41b01
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R3 = size (Int)
   @  R4 = tag (Bits)
   @Exit
   @  R2 = blk (pointer to Void)

.set XPDumper_Free,0x61b02
.set PDumper_Free,0x41b02
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R2 = blk (pointer to Void)

.set XPDumper_Find,0x61b03
.set PDumper_Find,0x41b03
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R2 = tag (Bits)
   @Exit
   @  R2 = blk (pointer to Void)

.set XPDumper_StartJob,0x61b04
.set PDumper_StartJob,0x41b04
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R1 = flags (PDumper_JobFlags)
   @  R2 -> palette_file_name (String)

.set XPDumper_TidyJob,0x61b05
.set PDumper_TidyJob,0x41b05
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R1 -> tags (Int)
   @  R2 = end_of_document (Bool)

.set XPDumper_SetColour,0x61b06
.set PDumper_SetColour,0x41b06
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R1 = colour (OS_Colour)
   @  R2 = strip_type_and_pass_no (PDumper_StripType)
   @  R4 = halftone_info (PDumper_HalftoneFlags)
   @Exit
   @  R3 = col (Int)

.set XPDumper_PrepareStrip,0x61b07
.set PDumper_PrepareStrip,0x41b07
   @Entry
   @  R0 = anchor (pointer to Int)
   @  R1 -> image (data)
   @  R2 = format (PDumper_Format)
   @  R3 = width (Int)
   @  R4 = height (Int)
   @  R5 = stride (Int)
   @  R6 = halftone_info (PDumper_HalftoneFlags)

.set XPDumper_LookupError,0x61b08
.set PDumper_LookupError,0x41b08
   @Entry
   @  R0 -> error (OS_Error)
   @  R1 -> arg0 (String)

.set XPDumper_CopyFilename,0x61b09
.set PDumper_CopyFilename,0x41b09
   @Entry
   @  R0 = buffer (pointer to String)
   @  R1 = size (Int)
   @  R2 -> file_name (String)

#  define Service_PDumperStarting 0x66
   @Entry
   @  R1 = &66

#  define Service_PDumperDying 0x67
   @Entry
   @  R1 = &67

#endif
