home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / DVD!OMA2.DMS / in.adf / Examples / Library / Misc / Misc.asm < prev   
Encoding:
Assembly Source File  |  1994-10-13  |  2.8 KB  |  211 lines

  1.  
  2. ; Verschiedene Interfaces
  3.  
  4.     INCLUDE    "lvo/misc.i"
  5.  
  6.     XREF    _PotgoBase
  7.     XREF    _TimerBase
  8.     XREF    _TranslatorBase
  9.     XREF    _ConsoleDevice
  10.     XREF    _DiskfontBase
  11.     XREF    _RomBootBase
  12.  
  13.  
  14.  
  15.  
  16.  
  17. CREATE MACRO Basis,Name,Registermaske,Registeranzahl,Satz1,Anzahl1,Satz2,Anzahl2...
  18.  
  19.     IFD    \2
  20.     XDEF    _\2
  21.  
  22. _\2
  23.     IFEQ     \4-1
  24.     move.l    \3,-(SP)
  25.     ELSE
  26.     movem.l    \3,-(SP)
  27.     ENDC
  28.  
  29. TIEFE    SET    4+4*\4
  30.     IFNC     '\5',''
  31.     SATZ    \5,\6,\7,\8,\9,\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k
  32.     ENDC
  33.  
  34.     move.l    \1,a6
  35.     jsr        _LVO\2(a6)
  36.     IFEQ     \4-1
  37.     move.l    (SP)+,\3
  38.     ELSE
  39.     movem.l    (SP)+,\3
  40.     ENDC
  41.     rts
  42.  
  43.     ENDC
  44.  
  45.     ENDM
  46.  
  47.  
  48.  
  49.  
  50.  
  51. SATZ    MACRO    Satz1,Anzahl1,Satz2,Anzahl2...
  52.     IFEQ     \2-1             ;    ein Register ?
  53.     move.l    TIEFE(SP),\1
  54.     ELSE
  55.     movem.l    TIEFE(SP),\1
  56.     ENDC
  57. TIEFE    SET    TIEFE+4*\2
  58.     IFNC     '\3',''
  59.     SATZ    \3,\4,\5,\6,\7,\8,\9,\a,\b,\c,\d,\e,\f,\g,\h,\i
  60.     ENDC
  61.     ENDM
  62.  
  63.  
  64.  
  65.  
  66.  
  67. ; Potgo
  68.  
  69. ; AllocPotBits(bits)(D0)
  70.     CREATE    _PotgoBase,AllocPotBits,a6,1,d0,1
  71.  
  72. ; FreePotBits(bits)(D0)
  73.     CREATE    _PotgoBase,FreePotBits,a6,1,d0,1
  74.  
  75. ; WritePotgo(word,mask)(D0,D1)
  76.     CREATE    _PotgoBase,WritePotgo,a6,1,d0-d1,2
  77.  
  78. ; Offsets
  79.  
  80.     IFD    PotgoOFFSETS
  81.  
  82.     XDEF    _LVOAllocPotBits
  83.     XDEF    _LVOFreePotBits
  84.     XDEF    _LVOWritePotgo
  85.  
  86.     ENDC
  87.  
  88.  
  89.  
  90.  
  91.  
  92. ; Timer
  93.  
  94. ; AddTime(dest,src)(A0/A1)
  95.     CREATE    _TimerBase,AddTime,a6,1,a0-a1,2
  96.  
  97. ; SubTime(dest,src)(A0/A1)
  98.     CREATE    _TimerBase,SubTime,a6,1,a0-a1,2
  99.  
  100. ; CmpTime(dest,src)(A0/A1)
  101.     CREATE    _TimerBase,CmpTime,a6,1,a0-a1,2
  102.  
  103. ; Offsets
  104.  
  105.     IFD    TimerOFFSETS
  106.  
  107.     XDEF    _LVOAddTime
  108.     XDEF    _LVOSubTime
  109.     XDEF    _LVOCmpTime
  110.  
  111.     ENDC
  112.  
  113.  
  114.  
  115.  
  116.  
  117. ; Translator
  118.  
  119. ; Translate(inputString,inputLength,outputBuffer,bufferSize)(A0,D0/A1,D1)
  120.     CREATE    _TranslatorBase,Translate,a6,1,a0,1,d0/a1,2,d1,1
  121.  
  122. ; Offsets
  123.  
  124.     IFD    TranslatorOFFSETS
  125.  
  126.     XDEF    _LVOTranslate
  127.  
  128.     ENDC
  129.  
  130.  
  131.  
  132.  
  133.  
  134. ; Console
  135.  
  136. ; CDInputHandler(events,device)(A0/A1)
  137.     CREATE    _ConsoleDevice,CDInputHandler,a6,1,a0-a1,2
  138.  
  139. ; RawKeyConvert(events,buffer,length,keyMap)(A0/A1,D1/A2)
  140.     CREATE    _ConsoleDevice,RawKeyConvert,a2/a6,2,a0-a1,2,d1/a2,2
  141.  
  142. ; AskDefaultKeyMap(keyMap)(A0)
  143.     CREATE    _ConsoleDevice,AskDefaultKeyMap,a6,1,a0,1
  144.  
  145. ; SetDefaultKeyMap(keyMap)(A0)
  146.     CREATE    _ConsoleDevice,SetDefaultKeyMap,a6,1,a0,1
  147.  
  148. ; Offsets
  149.  
  150.     IFD    ConsoleOFFSETS
  151.  
  152.     XDEF    _LVOCDInputHandler
  153.     XDEF    _LVORawKeyConvert
  154.     XDEF    _LVOAskDefaultKeyMap
  155.     XDEF    _LVOSetDefaultKeyMap
  156.  
  157.     ENDC
  158.  
  159.  
  160.  
  161.  
  162.  
  163. ; Diskfont
  164.  
  165. ; OpenDiskFont(textAttr)(A0)
  166.     CREATE    _DiskfontBase,OpenDiskFont,a6,1,a0,1
  167.  
  168. ; AvailFonts(buffer,bufBytes,flags)(A0,D0/D1)
  169.     CREATE    _DiskfontBase,AvailFonts,a6,1,a0,1,d0-d1,2
  170.  
  171. ; NewFontContents(fontsLock,fontName)(A0/A1)
  172.     CREATE    _DiskfontBase,NewFontContents,a6,1,a0-a1,2
  173.  
  174. ; DisposeFontContents(fontContentsHeader)(A1)
  175.     CREATE    _DiskfontBase,DisposeFontContents,a6,1,a1,1
  176.  
  177. ; Offsets
  178.  
  179.     IFD    DiskfontOFFSETS
  180.  
  181.     XDEF    _LVOOpenDiskFont
  182.     XDEF    _LVOAvailFonts
  183.     XDEF    _LVONewFontContents
  184.     XDEF    _LVODisposeFontContents
  185.  
  186.     ENDC
  187.  
  188.  
  189.  
  190.  
  191.  
  192. ; RomBoot
  193.  
  194. ; RomBoot()
  195.     CREATE    _RomBootBase,RomBoot,a6,1
  196.  
  197. ; Offsets
  198.  
  199.     IFD    RomBootOFFSETS
  200.  
  201.     XDEF    _LVORomBoot
  202.  
  203.     ENDC
  204.  
  205.  
  206.  
  207.  
  208.  
  209.     END
  210.  
  211.