Bringing flexcat 2.15 into the main branch
[AROS.git] / tools / flexcat / src / sd / SASasm_a.sd
blob8ea5225da81215b42c378eadc68d10d8f1fefb33
1 ##rem $Id: SASasm_a.sd 253 2014-02-18 11:15:58Z damato $
2 ##stringtype assembler
3 ##shortstrings
5 *****************************************************************
7 *   This file was created automatically by `%fv'
8 *   from "%f0".
10 *   Do NOT edit by hand!
12 *****************************************************************
14 *   Includefiles
15         include "exec/types.i"
16         include "utility/tagitem.i"
17         include "libraries/locale.i"
19 *   Function declarations
20         xdef    Open%bCatalog
21         xdef    Close%bCatalog
22         xdef    Get%bString
24 *   Referenced data
25         xref    _LocaleBase
27 *   Referenced functions
28         xref    _LVOOpenCatalogA
29         xref    _LVOCloseCatalog
30         xref    _LVOGetCatalogStr
32 *   Data definitions
33         section data
34 OpenCatalogTags:
35         cnop    0,4
36         dc.l    OC_Language,0
37         dc.l    OC_BuiltInLanguage,%b_BuiltInLanguage
38         dc.l    OC_Version,%v
39         dc.l    TAG_DONE,0
41 %b_BuiltInLanguage:
42         %l,0
44 CatalogName:
45         dc.b    '%b.catalog',0
47 \tcnop\t0,4\n\txdef\t%i\n%i:\tdc.l\t%d\n\t%s,0
49         section bss
50         cnop    0,4
51 %b_Catalog:
52         ds.l    1
55 *   Code definitions
56         section code
58 Open%bCatalog:
59 *   a0 = Locale
60 *   a1 = Language
61         movem.l a2/a6,-(sp)             ;   Save Regs
63         lea     OpenCatalogTags,a2      ;   Store Language
64         move.l  a1,4(a2)
65         bne     Open%bCatalog1
66         lea     8(a2),a2
67 Open%bCatalog1:
68         move.l  _LocaleBase,a6          ;   Call locale.OpenCatalog
69         move.l  a6,d0                   ;   Locale opened?
70         beq     Open%bCatalogEnd        ;   No, skip
71         tst.l   %b_Catalog              ;   Catalog opened?
72         bne     Open%bCatalogEnd        ;   Yes, skip
73         lea     CatalogName,a1
74         jsr     _LVOOpenCatalogA(a6)
75         move.l  d0,%b_Catalog
76 Open%bCatalogEnd:
77         movem.l (sp)+,a2/a6
78         rts
81 Close%bCatalog:
82         move.l  a6,-(sp)
83         move.l  %b_Catalog,a0           ;   Close the Catalog, if needed
84         move.l  #0,%b_Catalog
85         move.l  _LocaleBase,a6
86         move.l  a6,d0                   ;   Locale.library opened?
87         beq     Close%bCatalogEnd       ;   No, skip
88         jsr     _LVOCloseCatalog(a6)
89 Close%bCatalogEnd:
90         move.l  (sp)+,a6
91         rts
94 Get%bString:
95 *   a0 = pointer to structure (ID, string)
96         move.l  a6,-(sp)                ;   Save regs
98         move.l  (a0)+,d0                ;   Get string number
99         move.l  a0,a1                   ;   Get default string
101 Get%bString3:
102         move.l  _LocaleBase,a6          ;   Locale.library present?
103         move.l  a6,d1
104         beq     Get%bStringNoLoc        ;   No, skip
105         move.l  %b_Catalog,a0           ;   Catalog opened?
106         move.l  a0,d1
107         beq     Get%bStringNoLoc        ;   No, skip
109         jsr     _LVOGetCatalogStr(a6)   ;   Call locale.library
110 Get%bStringEnd:
111         move.l  (sp)+,a6
112         rts
114 Get%bStringNoLoc:
115         move.l  a1,d0
116         bra     Get%bStringEnd
118         end