home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / dev / flexcat / sasasm_a.sd < prev    next >
Encoding:
Text File  |  1994-05-30  |  2.2 KB  |  113 lines

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