[41] | 1 | ; File name : Menu.asm
|
---|
| 2 | ; Project name : Assembly Library
|
---|
| 3 | ; Created date : 3.8.2010
|
---|
[54] | 4 | ; Last update : 23.10.2010
|
---|
[41] | 5 | ; Author : Tomi Tilli
|
---|
| 6 | ; Description : Menu Library functions for CALL_MENU_LIBRARY macro
|
---|
| 7 | ; that users should use to make library call.
|
---|
| 8 |
|
---|
| 9 | ; Section containing code
|
---|
| 10 | SECTION .text
|
---|
| 11 |
|
---|
| 12 | ;--------------------------------------------------------------------
|
---|
| 13 | ; MenuFunctionFromDI
|
---|
| 14 | ; Parameters:
|
---|
| 15 | ; DI: Function to call (MENU_LIB.functionName)
|
---|
| 16 | ; BP: Menu handle
|
---|
| 17 | ; Others: Depends on function to call
|
---|
| 18 | ; Returns:
|
---|
| 19 | ; Depends on function to call
|
---|
| 20 | ; Corrupts registers:
|
---|
| 21 | ; AX (unless used as a return register), DI
|
---|
| 22 | ;--------------------------------------------------------------------
|
---|
| 23 | ALIGN JUMP_ALIGN
|
---|
| 24 | Menu_FunctionFromDI:
|
---|
| 25 | push si
|
---|
| 26 | push dx
|
---|
| 27 | push cx
|
---|
| 28 | push bx
|
---|
| 29 | call [cs:di+.rgfnMenuLibraryFunctions]
|
---|
| 30 | pop bx
|
---|
| 31 | pop cx
|
---|
| 32 | pop dx
|
---|
| 33 | pop si
|
---|
| 34 | ret
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | ALIGN WORD_ALIGN
|
---|
| 38 | .rgfnMenuLibraryFunctions:
|
---|
| 39 | istruc MENU_LIB
|
---|
| 40 | at MENU_LIB.DisplayWithHandlerInBXandUserDataInDXAX, dw MenuInit_DisplayMenuWithHandlerInBXandUserDataInDXAX
|
---|
| 41 | ;at MENU_LIB.Close, dw MenuInit_CloseMenuWindow ; Special case in CALL_MENU_LIBRARY
|
---|
| 42 | at MENU_LIB.RefreshWindow, dw MenuInit_RefreshMenuWindow
|
---|
| 43 |
|
---|
| 44 | ;at MENU_LIB.SetUserDataFromDSSI, dw MenuInit_SetUserDataFromDSSI ; Special case in CALL_MENU_LIBRARY
|
---|
| 45 | ;at MENU_LIB.GetUserDataToDSSI, dw MenuInit_GetUserDataToDSSI ; Special case in CALL_MENU_LIBRARY
|
---|
| 46 |
|
---|
| 47 | ;at MENU_LIB.SetTitleHeightFromAL, dw MenuInit_SetTitleHeightFromAL ; Special case in CALL_MENU_LIBRARY
|
---|
[48] | 48 | at MENU_LIB.ClearTitleArea, dw MenuText_ClearTitleArea
|
---|
[41] | 49 | at MENU_LIB.RefreshTitle, dw MenuText_RefreshTitle
|
---|
| 50 |
|
---|
| 51 | at MENU_LIB.HighlightItemFromAX, dw MenuInit_HighlightItemFromAX
|
---|
| 52 | ;at MENU_LIB.SetTotalItemsFromAX, dw MenuInit_SetTotalItemsFromAX ; Special case in CALL_MENU_LIBRARY
|
---|
| 53 | at MENU_LIB.RefreshItemFromAX, dw MenuText_RefreshItemFromAX
|
---|
| 54 |
|
---|
| 55 | ;at MENU_LIB.SetInformationHeightFromAL, dw MenuInit_SetInformationHeightFromAL ; Special case in CALL_MENU_LIBRARY
|
---|
[48] | 56 | at MENU_LIB.ClearInformationArea, dw MenuText_ClearInformationArea
|
---|
[41] | 57 | at MENU_LIB.RefreshInformation, dw MenuText_RefreshInformation
|
---|
| 58 |
|
---|
| 59 | at MENU_LIB.RestartTimeout, dw MenuTime_RestartSelectionTimeout
|
---|
| 60 | ;at MENU_LIB.SetTimeoutValueFromAX, dw MenuTime_SetSelectionTimeoutValueFromAX ; Special case in CALL_MENU_LIBRARY
|
---|
| 61 |
|
---|
| 62 | %ifdef INCLUDE_MENU_DIALOGS
|
---|
| 63 | at MENU_LIB.StartProgressTaskWithIoInDSSIandParamInDXAX, dw DialogProgress_StartProgressTaskWithIoInDSSIandParamInDXAX
|
---|
| 64 | at MENU_LIB.SetProgressValueFromAX, dw DialogProgress_SetProgressValueFromAX
|
---|
| 65 |
|
---|
| 66 | at MENU_LIB.DisplayMessageWithInputInDSSI, dw DialogMessage_DisplayMessageWithInputInDSSI
|
---|
| 67 | at MENU_LIB.GetSelectionToAXwithInputInDSSI, dw DialogSelection_GetSelectionToAXwithInputInDSSI
|
---|
| 68 | at MENU_LIB.GetWordWithIoInDSSI, dw DialogWord_GetWordWithIoInDSSI
|
---|
| 69 | at MENU_LIB.GetStringWithIoInDSSI, dw DialogString_GetStringWithIoInDSSI
|
---|
| 70 | at MENU_LIB.GetFileNameWithIoInDSSI, dw DialogFile_GetFileNameWithIoInDSSI
|
---|
[54] | 71 | at MENU_LIB.GetDriveWithIoInDSSI, dw DialogDrive_GetDriveWithIoInDSSI
|
---|
[41] | 72 | %endif
|
---|
| 73 | iend
|
---|