@ GNU AS assembler header file for Font
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:50:43 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 29 June 1996

@ 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 Font_Hdr
#  define Font_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 Font_OSUnit 0x190
#  define Font_Inch 0x11940
#  define Font_Point 0x3e8
#  define Font_CommandNull 0x0
#  define Font_CommandXMove 0x9
#  define Font_CommandLinefeed 0xa
#  define Font_CommandYMove 0xb
#  define Font_CommandReturn 0xd
#  define Font_CommandGCol 0x11
#  define Font_CommandColours 0x12
#  define Font_CommandTrueColours 0x13
#  define Font_CommandComment 0x15
#  define Font_CommandUnderline 0x19
#  define Font_CommandFont 0x1a
#  define Font_CommandHomTrfm 0x1b
#  define Font_CommandTrfm 0x1c
#  define Font_Justify 0x1
#  define Font_Rubout 0x2
#  define Font_OSUnits 0x10
#  define Font_GivenBlock 0x20
#  define Font_GivenTrfm 0x40
#  define Font_GivenLength 0x80
#  define Font_GivenFont 0x100
#  define Font_Kern 0x200
#  define Font_RightToLeft 0x400
#  define Font_BlendFont 0x800
#  define Font_Given16Bit 0x1000
#  define Font_Given32Bit 0x2000
#  define Font_ReturnCaretPos 0x20000
#  define Font_ReturnBBox 0x40000
#  define Font_ReturnMatrix 0x80000
#  define Font_ReturnSplitCount 0x100000
#  define Font_NoOutput 0x1
#  define Font_AddHints 0x2
#  define Font_OutputSkeleton 0x4
#  define Font_ConvertBitmap 0x8
#  define Font_ErrorIfBitmap 0x10
#  define Error_FontNoRoom 0x200
#  define Error_FontCacheFull 0x201
#  define Error_FontNoCache 0x202
#  define Error_FontTooLong 0x203
#  define Error_Font64K 0x204
#  define Error_FontPalTooBig 0x205
#  define Error_FontBadTranBits 0x206
#  define Error_FontNotEnoughBits 0x207
#  define Error_FontNoFont 0x208
#  define Error_FontNoPixels 0x209
#  define Error_FontBadFontNumber 0x20a
#  define Error_FontNotFound 0x20b
#  define Error_FontBadFontFile 0x20c
#  define Error_FontNoHandles 0x20d
#  define Error_FontBadCounter 0x20e
#  define Error_FontBadCtrlChar 0x20f
#  define Error_FontsInUse 0x210
#  define Error_FontBadSegment 0x211
#  define Error_FontBadPrefix 0x212
#  define Error_FontReserved 0x213
#  define Error_FontBadCharCode 0x214
#  define Error_FontNoBitmaps 0x215
#  define Error_FontNoBitmaps2 0x216
#  define Error_FontBadFontCacheFile 0x217
#  define Error_FontFieldNotFound 0x218
#  define Error_FontBadMatrix 0x219
#  define Error_FontOverflow 0x21a
#  define Error_FontDivby0 0x21b
#  define Error_FontBadReadMetrics 0x21c
#  define Error_FontBadRGB 0x21d
#  define Error_FontEncodingNotFound 0x21e
#  define Error_FontMustHaveSlash 0x21f
#  define Error_FontBadEncodingSize 0x220
#  define Error_FontTooManyIDs 0x221
#  define Error_FontTooFewIDs 0x222
#  define Error_FontNoBaseEncoding 0x223
#  define Error_FontIdentifierNotFound 0x224
#  define Error_FontTooManyChunks 0x225
#  define Error_FontBadFontFile2 0x226
#  define Error_FontDataNotFound 0x20b
#  define Error_FontDataNotFound2 0x20b
#  define Font_NameLimit 0x28
#  define Font_System 0x0
#  define Font_Current 0x0
#  define Font_BitmapDeep 0x1
#  define Font_BitmapHorizontalSubPixel 0x2
#  define Font_BitmapVerticalSubPixel 0x4
#  define Font_BitmapDelete 0x8
#  define Font_CharacteristicOldFormat 0x1
#  define Font_CharacteristicROM 0x2
#  define Font_CharacteristicMonochrome 0x4
#  define Font_CharacteristicFillRuleNonZero 0x8
#  define Font_ReturnFontName 0x10000
#  define Font_ReturnLocalFontName 0x20000
#  define Font_UseLinefeed 0x40000
#  define Font_ReturnFontMenu 0x80000
#  define Font_AllowSystemFont 0x100000
#  define Font_GivenTick 0x200000
#  define Font_ReturnEncodingMenu 0x480000
#  define Font_TickNone 0x0
#  define Font_TickSystemFont 0x1
#  define Font_KernNoBBoxes 0x1
#  define Font_KernNoXOffsets 0x2
#  define Font_KernNoYOffsets 0x4
#  define Font_KernShortPairs 0x80000000
#  define Font_MetricsKernYOnly 0x2
#  define Font_MetricsKernXOnly 0x4
#  define Font_MetricsManyKernPairs 0x8
#  define Font_GivenEncodingMenu 0x1

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

        .struct 0
        .skip   Bits
Font_OutputFlags               : 

        .struct 0
        .skip   Byte
Font_F                         : 

        .struct 0
Font_PaintBlock_space          : .skip   OS_Coord
Font_PaintBlock_letter         : .skip   OS_Coord
Font_PaintBlock_rubout         : .skip   OS_Box
Font_PaintBlock                : 

        .struct 0
Font_ScanBlock_space           : .skip   OS_Coord
Font_ScanBlock_letter          : .skip   OS_Coord
Font_ScanBlock_split_char      : .skip   Int
Font_ScanBlock_bbox            : .skip   OS_Box
Font_ScanBlock                 : 

        .struct 0
Font_Thresholds_t              : .skip   Byte
Font_Thresholds                : 

        .struct 0
Font_ColourTable_c             : .skip   Byte
Font_ColourTable               : 

        .struct 0
        .skip   Bits
Font_BitmapType                : 

        .struct 0
        .skip   Bits
Font_CharacteristicFlags       : 

        .struct 0
        .skip   Int
Font_ListContext               : 

        .struct 0
        .skip   Bits
Font_KernFlags                 : 

        .struct 0
        .skip   Bits
Font_MetricFlags               : 

        .struct 0
Font_BBoxInfo_bboxes           : .skip   OS_Box
Font_BBoxInfo                  : 

        .struct 0
Font_WidthInfo_widths          : .skip   256*Int
Font_WidthInfo                 : 

        .struct 0
Font_MiscInfo_x0               : .skip   Short
Font_MiscInfo_y0               : .skip   Short
Font_MiscInfo_x1               : .skip   Short
Font_MiscInfo_y1               : .skip   Short
Font_MiscInfo_xkern            : .skip   Short
Font_MiscInfo_ykern            : .skip   Short
Font_MiscInfo_italic_correction: .skip   Short
Font_MiscInfo_underline_position: .skip   Byte
Font_MiscInfo_underline_thickness: .skip   Byte
Font_MiscInfo_cap_height       : .skip   Short
Font_MiscInfo_xheight          : .skip   Short
Font_MiscInfo_descender        : .skip   Short
Font_MiscInfo_ascender         : .skip   Short
Font_MiscInfo_reserved         : .skip   Int
Font_MiscInfo                  : 

        .struct 0
Font_MetricsMiscInfo_x0        : .skip   Int
Font_MetricsMiscInfo_y0        : .skip   Int
Font_MetricsMiscInfo_x1        : .skip   Int
Font_MetricsMiscInfo_y1        : .skip   Int
Font_MetricsMiscInfo_xkern     : .skip   Int
Font_MetricsMiscInfo_ykern     : .skip   Int
Font_MetricsMiscInfo_italic_correction: .skip   Int
Font_MetricsMiscInfo_underline_position: .skip   Byte
Font_MetricsMiscInfo_underline_thickness: .skip   Byte
Font_MetricsMiscInfo_reserved_0: .skip   Byte
Font_MetricsMiscInfo_reserved_1: .skip   Byte
Font_MetricsMiscInfo_cap_height: .skip   Int
Font_MetricsMiscInfo_xheight   : .skip   Int
Font_MetricsMiscInfo_descender : .skip   Int
Font_MetricsMiscInfo_ascender  : .skip   Int
Font_MetricsMiscInfo_reserved  : .skip   Int
Font_MetricsMiscInfo           : 

        .struct 0
        .skip   Bits
Font_ShortKernPair             : 

        .struct 0
Font_LongKernPair_c            : .skip   Int
Font_LongKernPair_xkern        : .skip   Int
Font_LongKernPair_ykern        : .skip   Int
Font_LongKernPair              : 

        .struct 0
Font_KernInfo_long_info_table  : .skip   256*Int
Font_KernInfo_long_info_size   : .skip   Int
Font_KernInfo_long_info_flags  : .skip   Font_KernFlags
Font_KernInfo_long_info_pairs  : .skip   Font_LongKernPair
        .struct 0
Font_KernInfo_short_info_table : .skip   256*Int
Font_KernInfo_short_info_size  : .skip   Int
Font_KernInfo_short_info_flags : .skip   Font_KernFlags
Font_KernInfo_short_info_pairs : .skip   Font_ShortKernPair
Font_KernInfo                  : 

        .struct 0
Font_ShortKernPairUCS_c1       : .skip   Char
Font_ShortKernPairUCS_c2       : .skip   Char
Font_ShortKernPairUCS_kern     : .skip   Short
Font_ShortKernPairUCS          : 

        .struct 0
Font_LongKernPairUCS_c1        : .skip   Short
Font_LongKernPairUCS_c2        : .skip   Short
Font_LongKernPairUCS_xkern     : .skip   Short
Font_LongKernPairUCS_ykern     : .skip   Short
Font_LongKernPairUCS           : 

        .struct 0
Font_KernInfoUCS_long_info_table: .skip   256*Int
Font_KernInfoUCS_long_info_size: .skip   Int
Font_KernInfoUCS_long_info_flags: .skip   Font_KernFlags
Font_KernInfoUCS_long_info_pairs: .skip   Font_LongKernPairUCS
        .struct 0
Font_KernInfoUCS_short_info_table: .skip   256*Int
Font_KernInfoUCS_short_info_size: .skip   Int
Font_KernInfoUCS_short_info_flags: .skip   Font_KernFlags
Font_KernInfoUCS_short_info_pairs: .skip   Font_ShortKernPairUCS
Font_KernInfoUCS               : 

        .struct 0
        .skip   Bits
Font_DecodeFlags               : 


@Symbols for SWI's and SWI reason codes
.set XFont_CacheAddr,0x60080
.set Font_CacheAddr,0x40080
   @Exit
   @  R0 = version (Int)
   @  R2 = cache_size (Int)
   @  R3 = cache_used (Int)

.set XFont_FindFont,0x60081
.set Font_FindFont,0x40081
   @Entry
   @  R1 -> font_name (String)
   @  R2 = xsize (Int)
   @  R3 = ysize (Int)
   @  R4 = xres (Int)
   @  R5 = yres (Int)
   @Exit
   @  R0 = font (Font_F)
   @  R4 = xres_out (Int)
   @  R5 = yres_out (Int)

.set XFont_LoseFont,0x60082
.set Font_LoseFont,0x40082
   @Entry
   @  R0 = font (Font_F)

.set XFont_ReadDefn,0x60083
.set Font_ReadDefn,0x40083
   @Entry
   @  R0 = font (Font_F)
   @  R1 = font_id (pointer to data)
   @  R3 = &0
   @Exit
   @  R2 = xsize (Int)
   @  R3 = ysize (Int)
   @  R4 = xres (Int)
   @  R5 = yres (Int)
   @  R6 = age (Int)
   @  R7 = usage_count (Int)

.set XFont_ReadFullDefn,0x60083
.set Font_ReadFullDefn,0x40083
   @Entry
   @  R0 = font (Font_F)
   @  R1 = font_id (pointer to data)
   @  R3 = &4C4C5546
   @Exit
   @  R2 = xsize (Int)
   @  R3 = ysize (Int)
   @  R4 = xres (Int)
   @  R5 = yres (Int)
   @  R6 = age (Int)
   @  R7 = usage_count (Int)

.set XFont_ReadIdentifier,0x60083
.set Font_ReadIdentifier,0x40083
   @Entry
   @  R0 = font (Font_F)
   @  R1 = buffer (pointer to data)
   @  R3 = &4C4C5546
   @Exit
   @  R2 = used (Int)
   @  R3 corrupted
   @  R4 corrupted
   @  R5 corrupted
   @  R6 corrupted
   @  R7 corrupted

.set XFont_ReadInfo,0x60084
.set Font_ReadInfo,0x40084
   @Entry
   @  R0 = font (Font_F)
   @Exit
   @  R1 = x0 (Int)
   @  R2 = y0 (Int)
   @  R3 = x1 (Int)
   @  R4 = y1 (Int)

.set XFont_StringWidth,0x60085
.set Font_StringWidth,0x40085
   @Entry
   @  R1 -> s (String)
   @  R2 = xmax (Int)
   @  R3 = ymax (Int)
   @  R4 = split (Int)
   @  R5 = length (Int)
   @Exit
   @  R1 -> split_point (Char)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @  R4 = length_out (Int)
   @  R5 = index_out (Int)

.set XFont_Paint,0x60086
.set Font_Paint,0x40086
   @Entry
   @  R0 = font (Font_F)
   @  R1 -> string (String)
   @  R2 = flags (Font_StringFlags)
   @  R3 = xpos (Int)
   @  R4 = ypos (Int)
   @  R5 -> block (Font_PaintBlock)
   @  R6 -> trfm (OS_Trfm)
   @  R7 = length (Int)

.set XFont_Caret,0x60087
.set Font_Caret,0x40087
   @Entry
   @  R0 = colour_number (OS_ColourNumber)
   @  R1 = height (Int)
   @  R2 = unit_flags (Font_StringFlags)
   @  R3 = x (Int)
   @  R4 = y (Int)

.set XFont_ConverttoOS,0x60088
.set Font_ConverttoOS,0x40088
   @Entry
   @  R1 = x (Int)
   @  R2 = y (Int)
   @Exit
   @  R1 = x_out (Int)
   @  R2 = y_out (Int)

.set XFont_Converttopoints,0x60089
.set Font_Converttopoints,0x40089
   @Entry
   @  R1 = x (Int)
   @  R2 = y (Int)
   @Exit
   @  R0 corrupted
   @  R1 = x_out (Int)
   @  R2 = y_out (Int)

.set XFont_SetFont,0x6008a
.set Font_SetFont,0x4008a
   @Entry
   @  R0 = font (Font_F)

.set XFont_CurrentFont,0x6008b
.set Font_CurrentFont,0x4008b
   @Exit
   @  R0 = font (Font_F)
   @  R1 = bg_hint (OS_GCOL)
   @  R2 = fill (OS_GCOL)
   @  R3 = offset (Int)

.set XFont_FutureFont,0x6008c
.set Font_FutureFont,0x4008c
   @Exit
   @  R0 = font (Font_F)
   @  R1 = bg_hint (OS_GCOL)
   @  R2 = fill (OS_GCOL)
   @  R3 = offset (Int)

.set XFont_FindCaret,0x6008d
.set Font_FindCaret,0x4008d
   @Entry
   @  R1 -> s (String)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @Exit
   @  R1 -> split_point (Char)
   @  R2 = x_out (Int)
   @  R3 = y_out (Int)
   @  R4 = length_out (Int)
   @  R5 = index_out (Int)

.set XFont_CharBBox,0x6008e
.set Font_CharBBox,0x4008e
   @Entry
   @  R0 = font (Font_F)
   @  R1 = c (Char)
   @  R2 = unit_flags (Font_StringFlags)
   @Exit
   @  R1 = x0 (Int)
   @  R2 = y0 (Int)
   @  R3 = x1 (Int)
   @  R4 = y1 (Int)

.set XFont_ReadScaleFactor,0x6008f
.set Font_ReadScaleFactor,0x4008f
   @Exit
   @  R1 = xfactor (Int)
   @  R2 = yfactor (Int)

.set XFont_SetScaleFactor,0x60090
.set Font_SetScaleFactor,0x40090
   @Entry
   @  R1 = xfactor (Int)
   @  R2 = yfactor (Int)

.set XFont_ListFonts,0x60091
.set Font_ListFonts,0x40091
   @Entry
   @  R1 = buffer1 (pointer to data)
   @  R2 = context (Font_ListContext)
   @  R3 = size1 (Int)
   @  R4 = buffer2 (pointer to data)
   @  R5 = size2 (Int)
   @  R6 -> tick_font (String)
   @Exit
   @  R2 = context_out (Font_ListContext)
   @  R3 = used1 (Int)
   @  R5 = used2 (Int)

.set XFont_SetFontColours,0x60092
.set Font_SetFontColours,0x40092
   @Entry
   @  R0 = font (Font_F)
   @  R1 = bg_hint (OS_GCOL)
   @  R2 = fill (OS_GCOL)
   @  R3 = offset (Int)

.set XFont_SetPalette,0x60093
.set Font_SetPalette,0x40093
   @Entry
   @  R1 = bg_hint (OS_GCOL)
   @  R2 = fill (OS_GCOL)
   @  R3 = offset (Int)
   @  R4 = bg_hint_out (OS_Colour)
   @  R5 = fill_out (OS_Colour)
   @  R6 = &0

.set XFont_SetTruePalette,0x60093
.set Font_SetTruePalette,0x40093
   @Entry
   @  R1 = bg_hint (OS_GCOL)
   @  R2 = fill (OS_GCOL)
   @  R3 = offset (Int)
   @  R4 = bg_hint_out (OS_Colour)
   @  R5 = fill_out (OS_Colour)
   @  R6 = &65757254

.set XFont_ReadThresholds,0x60094
.set Font_ReadThresholds,0x40094
   @Entry
   @  R1 = buffer (pointer to Font_Thresholds)

.set XFont_SetThresholds,0x60095
.set Font_SetThresholds,0x40095
   @Entry
   @  R1 -> thresholds (Font_Thresholds)

.set XFont_FindCaretJ,0x60096
.set Font_FindCaretJ,0x40096
   @Entry
   @  R1 -> s (String)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @  R4 = xjust (Int)
   @  R5 = yjust (Int)
   @Exit
   @  R1 -> split_point (Char)
   @  R2 = x_out (Int)
   @  R3 = y_out (Int)
   @  R4 = length_out (Int)
   @  R5 = index_out (Int)

.set XFont_StringBBox,0x60097
.set Font_StringBBox,0x40097
   @Entry
   @  R1 -> s (String)
   @Exit
   @  R1 = x0 (Int)
   @  R2 = y0 (Int)
   @  R3 = x1 (Int)
   @  R4 = y1 (Int)

.set XFont_ReadColourTable,0x60098
.set Font_ReadColourTable,0x40098
   @Entry
   @  R1 -> colour_table (Font_ColourTable)

.set XFont_MakeBitmap,0x60099
.set Font_MakeBitmap,0x40099
   @Entry
   @  R1 -> font_name (String)
   @  R2 = xsize (Int)
   @  R3 = ysize (Int)
   @  R4 = xres (Int)
   @  R5 = yres (Int)
   @  R6 = flags (Font_BitmapType)

.set XFont_UnCacheFile,0x6009a
.set Font_UnCacheFile,0x4009a
   @Entry
   @  R0 -> file_name (String)
   @  R1 = recache (Bool)

.set XFont_SetFontMax,0x6009b
.set Font_SetFontMax,0x4009b
   @Entry
   @  R0 = font_max (Int)
   @  R1 = font_max1 (Int)
   @  R2 = font_max2 (Int)
   @  R3 = font_max3 (Int)
   @  R4 = font_max4 (Int)
   @  R5 = font_max5 (Int)
   @  R6 = &0
   @  R7 = &0

.set XFont_ReadFontMax,0x6009c
.set Font_ReadFontMax,0x4009c
   @Exit
   @  R0 = font_max (Int)
   @  R1 = font_max1 (Int)
   @  R2 = font_max2 (Int)
   @  R3 = font_max3 (Int)
   @  R4 = font_max4 (Int)
   @  R5 = font_max5 (Int)
   @  R6 corrupted
   @  R7 corrupted

.set XFont_ReadFontPrefix,0x6009d
.set Font_ReadFontPrefix,0x4009d
   @Entry
   @  R0 = font (Font_F)
   @  R1 = buffer (pointer to String)
   @  R2 = size (Int)
   @Exit
   @  R1 -> end (Char)
   @  R2 corrupted

.set XFont_SwitchOutputToBuffer,0x6009e
.set Font_SwitchOutputToBuffer,0x4009e
   @Entry
   @  R0 = flags (Font_OutputFlags)
   @  R1 = buffer (pointer to data)
   @Exit
   @  R1 -> end (Char)

.set XFont_SwitchOutputToBufferFlags,0x6009e
.set Font_SwitchOutputToBufferFlags,0x4009e
   @Entry
   @  R0 = &0
   @  R1 = &FFFFFFFF
   @Exit
   @  R0 = flags (Font_OutputFlags)
   @  R1 corrupted

.set XFont_ReadFontMetrics,0x6009f
.set Font_ReadFontMetrics,0x4009f
   @Entry
   @  R0 = font (Font_F)
   @  R1 = bbox_info (pointer to Font_BBoxInfo)
   @  R2 = xwidth_info (pointer to Font_WidthInfo)
   @  R3 = ywidth_info (pointer to Font_WidthInfo)
   @  R4 = misc_info (pointer to Font_MetricsMiscInfo)
   @  R5 = kern_info (pointer to Font_KernInfo)
   @  R6 = &0
   @  R7 = &0
   @Exit
   @  R0 = flags (Font_MetricFlags)
   @  R1 = bbox_info_size (Int)
   @  R2 = xwidth_info_size (Int)
   @  R3 = ywidth_info_size (Int)
   @  R4 = misc_info_size (Int)
   @  R5 = kern_info_size (Int)
   @  R6 corrupted
   @  R7 corrupted

.set XFont_ReadFontMetricsUCS,0x6009f
.set Font_ReadFontMetricsUCS,0x4009f
   @Entry
   @  R0 = font (Font_F)
   @  R1 = &0
   @  R2 = &0
   @  R3 = &0
   @  R4 = misc_info (pointer to Font_MetricsMiscInfo)
   @  R5 = &0
   @  R6 = kern_info (pointer to Font_KernInfoUCS)
   @  R7 = &0
   @Exit
   @  R0 = flags (Font_MetricFlags)
   @  R1 corrupted
   @  R2 corrupted
   @  R3 corrupted
   @  R4 = misc_info_size (Int)
   @  R5 corrupted
   @  R6 = kern_info_size (Int)
   @  R7 corrupted

.set XFont_DecodeMenu,0x600a0
.set Font_DecodeMenu,0x400a0
   @Entry
   @  R0 = flags (Font_DecodeFlags)
   @  R1 -> menu (data)
   @  R2 -> block (data)
   @  R3 = buffer (pointer to data)
   @  R4 = size (Int)
   @Exit
   @  R3 -> next_selection (Int)
   @  R4 = used (Int)

.set XFont_ScanString,0x600a1
.set Font_ScanString,0x400a1
   @Entry
   @  R0 = font (Font_F)
   @  R1 -> s (String)
   @  R2 = flags (Font_StringFlags)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = block (pointer to Font_ScanBlock)
   @  R6 -> trfm (OS_Trfm)
   @  R7 = length (Int)
   @Exit
   @  R1 -> split_point (Char)
   @  R3 = x_out (Int)
   @  R4 = y_out (Int)
   @  R7 = num_split_chars (Int)

.set XFont_SetColourTable,0x600a2
.set Font_SetColourTable,0x400a2

.set XFont_CurrentRGB,0x600a3
.set Font_CurrentRGB,0x400a3
   @Exit
   @  R0 = font (Font_F)
   @  R1 = bg_hint (OS_Colour)
   @  R2 = fill (OS_Colour)
   @  R3 = offset (Int)

.set XFont_FutureRGB,0x600a4
.set Font_FutureRGB,0x400a4
   @Exit
   @  R0 = font (Font_F)
   @  R1 = bg_hint (OS_Colour)
   @  R2 = fill (OS_Colour)
   @  R3 = offset (Int)

.set XFont_ReadEncodingFilename,0x600a5
.set Font_ReadEncodingFilename,0x400a5
   @Entry
   @  R0 = font (Font_F)
   @  R1 = buffer (pointer to String)
   @  R2 = size (Int)
   @Exit
   @  R0 corrupted
   @  R1 -> end (Char)
   @  R2 corrupted

.set XFont_FindField,0x600a6
.set Font_FindField,0x400a6
   @Entry
   @  R1 -> identifier (String)
   @  R2 = qualifier (Char)
   @Exit
   @  R1 -> field (String)
   @  R2 = found (Bool)

.set XFont_ApplyFields,0x600a7
.set Font_ApplyFields,0x400a7
   @Entry
   @  R0 -> identifier (String)
   @  R1 -> fields (String)
   @  R2 = buffer (pointer to String)
   @  R3 = size (Int)
   @Exit
   @  R3 = spare (Int)
   @  R5 corrupted
   @  R6 corrupted
   @  R7 corrupted

.set XFont_LookupFont,0x600a8
.set Font_LookupFont,0x400a8
   @Entry
   @  R0 = font (Font_F)
   @  R1 = &0
   @  R2 = &0
   @Exit
   @  R2 = flags (Font_CharacteristicFlags)

.set XFont_EnumerateCharacters,0x600a9
.set Font_EnumerateCharacters,0x400a9
   @Entry
   @  R0 = font (Font_F)
   @  R1 = character (Int)
   @Exit
   @  R0 corrupted
   @  R1 = next_character (Int)
   @  R2 = internal_character_code (Int)

#  define Service_FontsChanged 0x6e
   @Entry
   @  R1 = &6E

#endif
