lvo v37.3 Copyright (c) 1990-1999 Amiga, Inc. All Rights Reserved Usage: lvo library [funcname | LVO=0xhhhh,-0xhhhh,-n | ROMADDRESS=0xhhhhhhhh] Options: [CONTAINS] [WEDGELINE [wedgeopts]] OR: lvo library EQUATES >library_lib.i to output _lib.i equates Needs FD: assign to where FD's are LVO is a tool used in conjunction with FD files for system or other libraries. It requires the FD files be in directory with the assignment "FD:". LVO can be used in various ways as a programming/debugging tool: --------------------------------------------------------------------------- 1. To list the LVO offset and FD comment for any library function Example: lvo exec InitResident Outputs: exec.library LVO $ff9a -102 InitResident() InitResident(resident,segList)(a1,d1) --------------------------------------------------------------------------- 2. To list all of the LVO's for one library Example: lvo intuition Outputs: intuition.library LVO $ffe2 -30 OpenIntuition() intuition.library LVO $ffdc -36 Intuition() intuition.library LVO $ffd6 -42 AddGadget() intuition.library LVO $ffd0 -48 ClearDMRequest() intuition.library LVO $ffca -54 ClearMenuStrip() intuition.library LVO $ffc4 -60 ClearPointer() intuition.library LVO $ffbe -66 CloseScreen() etc. LVO will list all of a library's LVOs if no function name is provided. With the optional CONTAINS keyword, LVO will also list the addresses each function jumps to on YOUR system (different on different systems). Note that if you have debugging tools installed which use SetFunction (for example, Mungwall, Devmon, or Scratch), LVO will not be able to determine the ROM address of the SetFunctioned library functions because the LVOs of those functions will point to the SetFunctioned RAM code. If you use the EQUATES keyword, LVO will output the LVO's for a library in assembler EQU format: _LVOOpenIntuition EQU -30 _LVOIntuition EQU -36 _LVOAddGadget EQU -42 _LVOClearDMRequest EQU -48 _LVOClearMenuStrip EQU -54 _LVOClearPointer EQU -60 _LVOCloseScreen EQU -66 etc. --------------------------------------------------------------------------- 3. To find a function name given a library name and an LVO value Example: lvo exec LVO=-102 Outputs: exec.library LVO $ff9a -102 InitResident() InitResident(resident,segList)(a1,d1) Acceptable formats for the LVO value are -decimal, negative hex word (example 0xFF9A or $FF9A), or negated positive hex word (examples -0x0066 or -0x66 or -$0066 or -$66). --------------------------------------------------------------------------- 4. To find a probable function from a library name and a ROM address This is VERY useful used in conjunction with the OWNER tool and can help you determine the probable function of a ROM address where you might be having an Enforcer hit or a crash. Use the OWNER tool tp determine the ROM module (library) which contains the address, then use LVO to guess the probable function. Example: We want to find out about address 0xF80FA0 on my machine. First we use the debugging tool OWNER to find the ROM library name: OWNER 0xF80FA0 Outputs: Address - Owner -------- ----- 00F80FA0 - in resident module: exec ^^^^ Now that we have the library name "exec", we use LVO with the same address: LVO exec ROMADDRESS=0xF80FA0 Outputs: exec.library LVO $ff9a -102 InitResident() jumps to $f80f9c on this system Note - some networking software packages may have a tool called "OWNER" - don't confuse this with the debugging tool OWNER. You may want to rename OWNER to MEMOWNER or something similar. --------------------------------------------------------------------------- 5. To generate a Wedge command line for wedging a library function Example: lvo exec InitResident WEDGELINE Outputs: (FD comment abbreviated here to fit in 80 columns) run wedge exec 0xff9a 0x8202 0x8200 opt r "c=InitResident(res,seg)(a1,d1)" Note that LVO and Wedge can only interact with actual library functions, not for their various stub interfaces which only exist in linker libraries. Actual library functions are the functions listed in the FD file for the libraries. Note also that under new versions of the OS, some older library functions become unused by the OS and newer functions are used in their place. For example, wedging intuition OpenWindow will not catch Workbench or DOS opening windows under 2.0 and higher because they are using the new OpenWindowTagList().