; Assembler header file for MessageTrans
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:51 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 18 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: MessageTrans_Hdr
        GBLS    MessageTrans_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
MessageTrans_DirectAccess       *       &1
Error_MessageTransSyntax        *       &AC0
Error_MessageTransFileOpen      *       &AC1
Error_MessageTransTokenNotFound *       &AC2
Error_MessageTransRecurse       *       &AC3

;Symbols for structure offsets and sizes
        ^       0
MessageTrans_ControlBlock_cb    #       4*Int
MessageTrans_ControlBlock       *       @

        ^       0
        #       Bits
MessageTrans_FileFlags          *       @


;Symbols for SWI's and SWI reason codes
XMessageTrans_FileInfo          *       &61500
MessageTrans_FileInfo           *       &41500
   ;Entry
   ;  R1 -> file_name (String)
   ;Exit
   ;  R0 = flags (MessageTrans_FileFlags)
   ;  R2 = size (Int)

XMessageTrans_OpenFile          *       &61501
MessageTrans_OpenFile           *       &41501
   ;Entry
   ;  R0 = cb (pointer to MessageTrans_ControlBlock)
   ;  R1 -> file_name (String)
   ;  R2 = buffer (pointer to String)

XMessageTrans_Lookup            *       &61502
MessageTrans_Lookup             *       &41502
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)
   ;Exit
   ;  R2 -> result (String)
   ;  R3 = used (Int)

XMessageTrans_MakeMenus         *       &61503
MessageTrans_MakeMenus          *       &41503
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> menus (data)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;Exit
   ;  R3 = used (Int)

XMessageTrans_CloseFile         *       &61504
MessageTrans_CloseFile          *       &41504
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)

XMessageTrans_EnumerateTokens   *       &61505
MessageTrans_EnumerateTokens    *       &41505
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 = context (Int)
   ;Exit
   ;  R2 = more (Bool)
   ;  R3 = used (Int)
   ;  R4 = context_out (Int)

XMessageTrans_ErrorLookup       *       &61506
MessageTrans_ErrorLookup        *       &41506
   ;Entry
   ;  R0 -> error (OS_Error)
   ;  R1 -> cb (MessageTrans_ControlBlock)
   ;  R2 = buffer (pointer to OS_Error)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)

XMessageTrans_GSLookup          *       &61507
MessageTrans_GSLookup           *       &41507
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)
   ;Exit
   ;  R2 -> result (String)
   ;  R3 = used (Int)

XMessageTrans_CopyError         *       &61508
MessageTrans_CopyError          *       &41508
   ;Entry
   ;  R0 -> error (OS_Error)
   ;Exit
   ;  R0 -> copy (OS_Error)

XMessageTrans_Dictionary        *       &61509
MessageTrans_Dictionary         *       &41509
   ;Exit
   ;  R0 -> dictionary (data)

Service_MessageFileClosed       *       &5E
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 = &5E

        ]
        END
