@ GNU AS assembler header file for MessageTrans
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:45:17 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.

#ifndef MessageTrans_Hdr
#  define MessageTrans_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 MessageTrans_DirectAccess 0x1
#  define Error_MessageTransSyntax 0xac0
#  define Error_MessageTransFileOpen 0xac1
#  define Error_MessageTransTokenNotFound 0xac2
#  define Error_MessageTransRecurse 0xac3

@Symbols for structure offsets and sizes
        .struct 0
MessageTrans_ControlBlock_cb   : .skip   4*Int
MessageTrans_ControlBlock      : 

        .struct 0
        .skip   Bits
MessageTrans_FileFlags         : 


@Symbols for SWI's and SWI reason codes
.set XMessageTrans_FileInfo,0x61500
.set MessageTrans_FileInfo,0x41500
   @Entry
   @  R1 -> file_name (String)
   @Exit
   @  R0 = flags (MessageTrans_FileFlags)
   @  R2 = size (Int)

.set XMessageTrans_OpenFile,0x61501
.set MessageTrans_OpenFile,0x41501
   @Entry
   @  R0 = cb (pointer to MessageTrans_ControlBlock)
   @  R1 -> file_name (String)
   @  R2 = buffer (pointer to String)

.set XMessageTrans_Lookup,0x61502
.set MessageTrans_Lookup,0x41502
   @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)

.set XMessageTrans_MakeMenus,0x61503
.set MessageTrans_MakeMenus,0x41503
   @Entry
   @  R0 -> cb (MessageTrans_ControlBlock)
   @  R1 -> menus (data)
   @  R2 = buffer (pointer to String)
   @  R3 = size (Int)
   @Exit
   @  R3 = used (Int)

.set XMessageTrans_CloseFile,0x61504
.set MessageTrans_CloseFile,0x41504
   @Entry
   @  R0 -> cb (MessageTrans_ControlBlock)

.set XMessageTrans_EnumerateTokens,0x61505
.set MessageTrans_EnumerateTokens,0x41505
   @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)

.set XMessageTrans_ErrorLookup,0x61506
.set MessageTrans_ErrorLookup,0x41506
   @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)

.set XMessageTrans_GSLookup,0x61507
.set MessageTrans_GSLookup,0x41507
   @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)

.set XMessageTrans_CopyError,0x61508
.set MessageTrans_CopyError,0x41508
   @Entry
   @  R0 -> error (OS_Error)
   @Exit
   @  R0 -> copy (OS_Error)

.set XMessageTrans_Dictionary,0x61509
.set MessageTrans_Dictionary,0x41509
   @Exit
   @  R0 -> dictionary (data)

#  define Service_MessageFileClosed 0x5e
   @Entry
   @  R0 -> cb (MessageTrans_ControlBlock)
   @  R1 = &5E

#endif
