; Assembler header file for PDumper
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:44:04 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.

        [       :LNOT: :DEF: PDumper_Hdr
        GBLS    PDumper_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
Error_PDumperUndeclared         *       &5D7
Error_PDumperTooOld             *       &5D8
Error_PDumperDuplicateModule    *       &5D9
Error_PDumperBadCall            *       &5DA
Error_PDumperBadStrip           *       &5DB
Error_PDumperBadPalette         *       &5DC
Error_PDumperNotLinked          *       &5DD
Error_PDumperReserved           *       &5DE
Error_PDumperBadOutputType      *       &5DF
Error_PDumperBlockNotFound      *       &5E0
Error_PDumperInUse              *       &5E1
PDumper_DeviceSpriteDevice      *       &0
PDumper_DeviceGenericDotMatrix  *       &1
PDumper_DeviceLaserjet          *       &2
PDumper_DeviceImagewriter       *       &3
PDumper_Device24Pin             *       &4
PDumper_DeviceDeskjet           *       &5
PDumper_StripMonochrome         *       &0
PDumper_StripGreyScale          *       &1
PDumper_Strip8Bit               *       &2
PDumper_Strip24BitMultiple      *       &3
PDumper_Strip16Bit              *       &4
PDumper_Strip24Bit              *       &5
PDumper_PassNumber              *       &7FFFFF
PDumper_FeatureHalftoneGrey     *       &1
PDumper_FeatureDiffusedGrey     *       &2
PDumper_FeatureHalftoneColour   *       &4
PDumper_FeatureDiffusedColour   *       &8
PDumper_FormatHalftoneGrey      *       &0
PDumper_FormatDiffusedGrey      *       &1
PDumper_FormatHalftoneColour    *       &2
PDumper_FormatDiffusedColour    *       &3
PDumper_FormatHalftoneMultipassColour *       &4
PDumper_FormatDiffusedMultipassColour *       &5
PDumper_FormatHalftone16BppColour *       &6
PDumper_FormatDiffused16BppColour *       &7
PDumper_FormatHalftone32BppColour *       &8
PDumper_FormatDiffused32BppColour *       &9
PDumper_HalftoneXResolution     *       &FF
PDumper_HalftoneXResolutionShift *       0
PDumper_HalftoneYResolution     *       &FF00
PDumper_HalftoneYResolutionShift *       8

;Symbols for structure offsets and sizes
        ^       0
        #       Bits
PDumper_JobFlags                *       @

        ^       0
        #       Int
PDumper_Device                  *       @

        ^       0
        #       Int
PDumper_StripType               *       @

        ^       0
        #       Bits
PDumper_Features                *       @

        ^       0
        #       Int
PDumper_Format                  *       @

        ^       0
        #       Bits
PDumper_HalftoneFlags           *       @


;Symbols for SWI's and SWI reason codes
XPDumper_Info                   *       &61B00
PDumper_Info                    *       &41B00
   ;Exit
   ;  R0 = version (Int)
   ;  R1 = features (PDumper_Features)

XPDumper_Claim                  *       &61B01
PDumper_Claim                   *       &41B01
   ;Entry
   ;  R0 = anchor (pointer to Int)
   ;  R3 = size (Int)
   ;  R4 = tag (Bits)
   ;Exit
   ;  R2 = blk (pointer to Void)

XPDumper_Free                   *       &61B02
PDumper_Free                    *       &41B02
   ;Entry
   ;  R0 = anchor (pointer to Int)
   ;  R2 = blk (pointer to Void)

XPDumper_Find                   *       &61B03
PDumper_Find                    *       &41B03
   ;Entry
   ;  R0 = anchor (pointer to Int)
   ;  R2 = tag (Bits)
   ;Exit
   ;  R2 = blk (pointer to Void)

XPDumper_StartJob               *       &61B04
PDumper_StartJob                *       &41B04
   ;Entry
   ;  R0 = anchor (pointer to Int)
   ;  R1 = flags (PDumper_JobFlags)
   ;  R2 -> palette_file_name (String)

XPDumper_TidyJob                *       &61B05
PDumper_TidyJob                 *       &41B05
   ;Entry
   ;  R0 = anchor (pointer to Int)
   ;  R1 -> tags (Int)
   ;  R2 = end_of_document (Bool)

XPDumper_SetColour              *       &61B06
PDumper_SetColour               *       &41B06
   ;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)

XPDumper_PrepareStrip           *       &61B07
PDumper_PrepareStrip            *       &41B07
   ;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)

XPDumper_LookupError            *       &61B08
PDumper_LookupError             *       &41B08
   ;Entry
   ;  R0 -> error (OS_Error)
   ;  R1 -> arg0 (String)

XPDumper_CopyFilename           *       &61B09
PDumper_CopyFilename            *       &41B09
   ;Entry
   ;  R0 = buffer (pointer to String)
   ;  R1 = size (Int)
   ;  R2 -> file_name (String)

Service_PDumperStarting         *       &66
   ;Entry
   ;  R1 = &66

Service_PDumperDying            *       &67
   ;Entry
   ;  R1 = &67

        ]
        END
