Home
AMOS AlphaFIX
Contents
1. TRMDEF EA 50 DDB 0 1 2 LABELS e ee00606222094009022402909 a4090 420909252e022 429 3 5 13 1 The RPN stack 5 13 2 RPN operators K a a Change Base 7 5 13 2 1 5 13 2 2 5 13 2 6 5 13 2 7 5 13 2 8 5 13 2 9 5 13 2 10 5 13 2 11 5 13 2 12 5 13 2415 5 13 2 14 Clear Stack A Quit ESC or Q Add Subtract Multiply ecneoetuwoectenaeacct e Divide 2 Modulo N And 8 or b Exclusive Or Shift Left lt gt Shift Right gt Negate Page iv 4 1 4 2 4 2 4 3 4 4 4 4 4 4 4 4 4 5 4 6 4 6 4 6 4 7 4 7 4 7 4 8 4 8 4 8 uuu vn iq Uq 1 Vn UL AA VA Y org I anu NNN 5 9 5 10 5 10 5 10 5 10 5 11 5 11 5 11 5 11 5 12 5 12 ALPHA FIX USER S MANUAL Page v 5 13 2 15 Swap Stack 7 5 12 5 13 2 16 Roll Stack Elements
2. 2 COMMANDS eenccnecenuecsectecstunanuenennececcctcene S earch ump Quit F inished Register Modification Set Address Base Mode Spec Command Go Command Proceed ececnweaenecnccenccatsconanacoctncoct Attach eee92040n2 0 4024400 09 09 09 4 224249 09n92 Set 4 2 12 1 Pass Points Clear INI List Overlays FIX OVERLAY COMMANDS VA UI UI DIR Ut VA VA ur vi VI e e a a2 2 O 00 0 vn 4 Q RPN INTRODUCTION HELP aa a NEW 4 44 4 JCB
3. 2 3 Pass 1 4 7 Proceed Command 4 6 Proceed from Subroutine a 2 5 Proceed to Breakpoint s a a 2 4 Proceed to Cursor a a a lt 2 5 Quit Command 1 Register Modification n 4 4 RPN ach wow Qi we DE a we 5 9 And wo omo ox wow 9911 Change Base s lt lt 5 9 Clear Stack 5 9 Divide asss saa a e a a 5 10 Exclusive Or aas as s s lt lt 3 11 Modulo 5 10 Multiply 6870 Negate 5 12 OperatorS 5 8 D 1 Pop Stack 5 13 Prompt 5 7 Quit 4 o 9 ooo 559 Roll Stack Elements Left 5 13 Rott Stack Elements Right 5 12 Shift Left uu ovS SET Shift Right as 5 12 Swap Stack s s 5 12 Stack S S S s s s a a 0 4c 5 7 Subtract a s s esaa e lt 5 10 Search Command s a a s a lt 4 2 Set Command a s a 4 7 Single step n a aw s lt a a 2 4 Skip Subroutine Mode 2 5 Spec Command a s a a s az a z a 4 5 Toggle Breakpoint a s a 2 4
4. _ AiphaFIX USER S MANUAL SOFTWARE N TATNA AlphaFIX User s Manual April 1981 DWwM 00100 69 Revision 01 ALPHA FIX USER S MANUAL Page ii First Printing May 1980 Second Printing April 1981 Alpha Micro AMOS 100 ALphaBASIC ALphaPASCAL and AlphaLISP are trademarks of ALPHA MICROSYSTEMS Irvine CA 92714 1980 ALPHA MICROSYSTEMS ALPHA MICROSYSTEMS 17881 Sky Park North Irvine CA 92714 This document reflects AMOS Versions 4 5 and later C 2MD 4 81 ALPHA FIX USER S MANUAL Page iii Table of Contents CHAPTER 1 INTRODUCTION 51 FIX AND DOT m minimae n 11 2 INVOKING FIX 172 1 2 1 The FIX Initialization File 1 2 4 3 FIX MODES wae 173 1 1 CHAPTER 2 DISASSEMBLY MODE 1 DISASSEMBLER NOTES 272 2 CURSOR COMMANDS 4 2 3 Cursor Down Control J 2 3 Cursor Up Control K 273 Page Down Control T 2 3 Initial Page Control R 2 3 Home Control 2 3 TION COMMANDS O74 Toggle Breakpoint Control P 274 Proceed to Breakpoint Control X 2 4 Single step RETURN 2 4 Proceed from Subroutine Control E 2 5 Pr
5. If a breakpoint is set in INPUT SBR FIX gains control when BASIC calls INPUT SBR allowing INPUT SBR to be debugged under FIX 4 2 9 Proceed This command starts program execution at the current user PC location It is equivalent to entering Disassembly Mode and pressing Control X When a breakpoint is encountered you are left in Disassembly Mode with the cursor at the new PC Location 4 2 10 Attach This command allows the user to use separate terminals for FIX and user program 1 0 The terminal specified is used for all program output Example attach term2 If the program leaves FIX via an EXIT supervisor call instead of via Quit or Finish the second terminal will now be attached to your job This feature is useful when debugging programs that do screen formatting If another terminal is attached FIX and the user program do not interfere with each other s screen display CUmMAND MODE Page 4 7 4 2 11 Set This command sets the radix used by FIX for display and input Note that a Mode always uses hex The Set command is followed by the desired radix Example gt set octal FIX always starts up in the radix the user s job is set for 4 2 12 Break This command sets a breakpoint It accepts a single argument either a symbol or a hex value A breakpoint is set at the specified value Example gt break cml2 This example sets a breakpoint at the Label CML2 if it exists The colon is optional 4 2 12 1 Pa
6. This operator ANDs the top two elements on the stack OPERATION RESULT 228 Gg gt gt 36 12 FIX OVERLAY COMMANDS Page 5 10 5 13 2 10 Or This operator ORs the top two elements on the stack OPERATION RESULT 2i A 36 12 40 5 13 2 11 Exclusive Or 5 This operator Exclusive ORs the top two elements on the stack OPERATION RESULT 2 LN gt 36 12 40 5 13 2 12 Shift Left lt This operator shifts the top of the stack Left one bit OPERATION RESULT D lt GD 2 gt 36 72 5 13 2 13 Shift Right gt This operator shifts the top of the stack right one bit OPERATION RESULT gt RET 36 18 5 13 2 14 Negate This operator negates the top of the stack OPERATION RESULT RET DPI acd gt 36 65500 FIX OVERLAY COMMANDS Page 5 11 5 13 2 15 Swap Stack 7 This operator swaps the top two elements of the stack with each other OPERATION RESULT 22769 gt 1 7 18 21 7 1 15 21 5 15 2 16 Roll Stack Elements Right R This operator rolls the stack elements right one position OPERATION RESULT R gt 1 3 5 1 3 5 5 13 2 17 Roll Stack Elements Left L This operator rolls the stack elements Left one position OPERATION RESULT DL GED 22 gt 2 4 6 8 5 6 8 2 5 15 2 18 Pop Stack P This operator pops the top element of the stack and throws it awa
7. 5 13 1 The RPN stack RPN processes numbers a 10 Level arithmetic stack Before a number can be processed it must be pushed onto the stack ALL operators manipulate values on the stack usually the top two levels RPN displays the contents of the stack below the prompt Line The RETURN key corresponds to the ENTER key on a calculator It pushes the values on the current prompt Line Cif any onto the stack FIX OVERLAY COMMANDS Page 5 7 OPERATION 2 2 Stack Empty 4 RET 2 229 8 7 GZ 4 2 RESULT 777 2 gt gt oe 7 8 9 4 2 5 13 2 RPN operators There are 18 operators available in RPN They are m e l H V A RQ9 ff i vr chanqe base clear stack return to FIX Command Mode add subtract multiply divide modulo and or exclusive or shift stack Left one bit shift stack right one bit negate top of stack swap top two stack elements roll stack elements right roll stack elements Left pop top of stack These operators may either be used alone or following a string of numbers If the operator follows a string of numbers the numbers are pushed onto the Stack before the operation is performed FIX OVERLAY COMMANDS Page 5 8 5 13 2 1 Change Base This operator changes the current base It must be preceded by a valid decimal number from 2 to 16 This number becomes the new
8. Right R 9 12 5 13 2 17 Roll Stack Elements Left L 5 13 5 13 2 18 Pop Stack 5 13 INDEX ALPHA FIX USER S MANUAL QUICK REFERENCE GUIDE Page vi DISPLAY MODE Disassembly Mode Control J UPecacceccccceses CCOntrolL K down page ControLl T initial page Control R home to PC aeeee Control toggle breakpnt Control P proceed ees Control 7X single Step eea RETURN exit subroutine Control E proceed to here Control G no Subr mode Control V Hex ASCII Mode right esses e CControl L Left T T ControL H cececnccoceese Control K a Control J home 7 dOWNa s es aa control T page Upes aese e CCONtrol E indirection seas TAB COMMAND MODE S earch symbol search for symbol Dump address Q uit F inish R n value Rel mode Spec string Go string Proceed Attach terminalY Set radix Break symbol Clear symbol Ini filename dump memory Leave FIX Leave FIX without deleting module modify register set address base mode set up command string execute AMOS comma
9. SCA relative to AMOS System Communication Area FIX keeps separate modes and cursors for Disassembly and Dump Modes The address mode is set for the Display Mode used most recently The address mode can also be modified by the Dump command see above Example gt r5 Set address base mode to RS 8 2 7 Spec Command This command stores a Line of text and Leaves the user s R2 indexing the stored Line It is used to Simulate the set up of command Lines by AMOS on entry to a user program Example gt spec 7dsk0 0C20 41fix prg fix The example sets up a command Line for testing a wildcard program If no argument is specified SPEC Lists the Last Line SPEC d Example gt spec 0SKO C20 41FIX PRG FIX A 82CIK PRG FIX COMMAND MODE Page 4 6 4 2 8 Command This command is used to fetch and execute another AMOS program 1 is used to debug drivers or BASIC assembly Language subroutines The subroutine or driver is Loaded and breakpoints set The GO command is then used to start a program that calls the driver or subroutine When a breakpoint is encountered control returns to FIX and the user may debug the subroutine or driver Example AlphaFix 1 0 Status Disassembly PRG 021136 octal Debugging INPUT SBR 290 run menu execute basic interpreter In the example shown the user is debugging INPUT SBR an XCALL subroutine for BASIC applications The BASIC program MENU RUN contains an XCALL INPUT
10. if you single step through a JLOCK NOTE FIX will not Lock the processor when single stepping through a LOCK IDS instruction 2 3 4 Proceed from Subroutine ControlL E This command sets a temporary breakpoint at the value on the top of the stack and proceeds to it proceed until PC SP Any other breakpoint encountered is ignored In a normal subroutine this command has the effect of executing the rest of the subroutine returning control to the user just after the original CALL instruction However if the subroutine plays games with the stack this command will have undefined results 2 3 5 Proceed to Cursor Control G This command sets a temporary breakpoint at the current cursor location and proceeds to it ALL other breakpoints are ignored The terminal bell rings to indicate the operation is successful since the cursor does not move 2 3 6 Toggle Skip Subroutine Mode Control This command turns Skip Subroutine Mode on off When this mode is on an uppercase S is displayed in the upper right hand corner of the screen When Skip Subroutine Mode is on the single step command treats a CALL as a single instruction In other words execution of code in subroutines proceeds at full speed until the return instruction Warning Skip Subroutine Mode assumes that no data follows a CALL instruction i e the return address of a subroutine is the instruction following the subroutine If a subroutine modifies the return addres
11. OFFSET Lists following TJMP and TCALL instructions One branch is assumed after a TCALL The list is terminated by the first Label after the TJMP or TCALL This feature is disabled if there is no symbol table or if you are currently disassembling outside of the program being tested Example 0000 PRG TCALL aRO 0002 PRG BR CMDRET 0004 PRG OFFSET 5081 0006 PRG OFFSET 5082 0008 PRG OFFSET 5083 OOOACPRG CMDRET MOV RO LST If a instruction appears in a data area 1 1 disassembled in Low intensity If FIX does not recognize an instruction it is displayed as a WORD opcode followed by the value of the word in the current radix DISASSEMBLY MODE Page 2 3 2 2 CURSOR COMMANDS These commands are used to move the Cursor through the program being debugged Currently it not possible to modify the program while in Disassembly Mode 2 2 1 Cursor Down Control J This command moves the cursor down instruction If the cursor was already at the bottom of the screen the screen is scrolled up one Line and the next Line js disassembled 2 2 2 Cursor Up Control K This command moves the cursor up one instruction If the cursor yas already at the top of the Screen this command is ignored since the disassembler has no way of determining how far to back up to the Last instruction 2 2 3 Page Down Control T This command moves the cursor down one page 24 instructions 2 2 6 Initial Page Control R
12. command looks up a symbol and if the symbol is found displays the page following the symbol in Disassembly Mode If the symbol does not exist or if no symbol file exists the mesage What is displayed This command leaves the user in Disassembly Mode Example gt s loop This example searches for the symbol LOOP The colon is optional Note that this command is not a text search command as VUE Searches may only be made for symbols A value may be specified instead of the symbol This moves the cursor to the specified relative address COMMAND MODE Page 4 3 Example gt s 332 If no argument follows the Search command FIX returns to Disassembly Mode at the last location examined The Search command always makes Disassembly Mode the active Display Mode 4 2 2 D ump This command causes FIX to enter Dump Mode There are several formats which may be used D address This sets the cursor to the relative address specified The current relative base is not affected Example gt 20 RET D mode This sets the cursor to relative zero and changes the current base mode to the mode specified Usually this is an 100 register Example gt r5 D address mode This sets the cursor to the address specified and changes the current base mode to the mode specified Example gt 84 sp This returns you to Dump Mode without changing the cursor or base mode The Dump command always mak
13. odd CHAPTER 4 COMMAND MODE 4 1 INTRODUCTION This chapter describes the Command Mode of FIX Command Mode is entered when FIX initially starts running and may be entered by pressing ESC while in Display Mode Command Mode is used to set up the debugging environment The Command Mode screen displays the current status of FIX and the program under test The first Line of the screen displays the current FIX status Status displayed includes current Display Mode disassembly dump current base address and mode current radix attached terminal if any The name of the program being debugged is displayed on Line 3 The prompt appears on Line 5 The current AM 100 user program registers are displayed on Lines 9 and 10 If any breakpoints are set they are displayed beginning on line 14 COMMAND MODE Page 4 2 Examole AlphaFix 1 0 Status Disassembly PRG 021360 octal 0 2021560 octal Debugging USER PRG 2 Registers RO 000000 81 000000 R2 020678 R3 000000 N Z VC R R5 0 S 02136 1 1 _ _ e 0215600 FLAGS 10071 Breakpoints 000026 LooP UBR 000060 LOOP3 The user may leave Command Mode and return to Display Mode by pressing the ESC key 4 2 COMMANDS The basic format of FIX commands is the command name followed by a parameter List Where the command name is Listed with a parenthesis the command can be abbreviated with a single letter 4 2 1 85 This
14. END OF LINE CONTROL N This command moves the cursor to the Last byte in the current Line 3 8 CURSOR DOWN CONTROL J This command moves the cursor down one Line 16 bytes If the cursor was already at the bottom of the screen the display is scrolled up by one Line 3 9 CURSOR UP CONTROL K This command moves the cursor up one Line 16 bytes If the cursor was already at the top of the screen the display is scrolled down by 1 2 pace 3 10 RETURN This command moves the cursor to the beginning of the next Line If the cursor was already at the bottom of the screen the display is scrolled up by one Line 3 11 CURSOR HOME CONTROL This command moves the cursor to address zero relative to the current base and redisplays the screen 3 12 PAGE DOWN CONTROL T This command moves the cursor down one page 24 Lines 384 bytes and redisplays the screen 3 13 PAGE UP CONTROL R This command moves the cursor up one page 24 Lines 384 bytes and redisplays the screen DUMP MODE Page 3 4 3 14 CURSOR INDIRECTION TAB This command does indirection The value of the word pointed to by the cursor is made the new cursor Location The new screen is displayed with the cursor pointing to the address found at the old cursor In other words CURSOR aCURSOR If the cursor is originally pointing to an odd Location this command is ignored This command will appear to fail on even addresses if the current base value is
15. Location this command clears the breakpoint and redisplays the screen in full intensity 2 5 2 Proceed to Breakpoint Control x This command starts the user program at the current cursor Location The program executes until a breakpoint 15 encountered or until an EXIT supervisor call is encountered When a breakpoint is encountered the cursor is Left at the breakpoint Location in Disassembly Mode 2 3 3 Single step RETURN This command executes the instruction at the current cursor Location The cursor is updated to point to the new PC it may be on a new page if the instruction a transfer instruction FIX single steps properly through any instruction including AMOS monitor calls FIX prints the destination operand in the data field if it is applicable As you single step the cursor walks through the program just as you would if you were walking through a Listing 000000 PRG MOVI 1 81 000002 PRG LOOP DCVT 0 2 000006 PRG CRLF 000010 PRG ASL R1 00001 2 PRG BNE LOOP 000014 PRG EXIT DISASSEMBLY MODE Page 2 5 The example shown above is a sample FIX session The cursor appears to loop on the screen until the conditional branch fails It then falls through to the EXIT statement If you Single step through the EXIT you will end up im AMOS command Level rg Hints Not all code can be single stepped properly due to timing or other considerations For instance other users on your system could get annoyed
16. This command moves the cursor to its initial position upon entry to Disassembly Mode For instance if the command gt s abcd was used to get into Disassembly Mode pressing Control R moves the cursor to the symbol ABCD and redisplays the page following it 2 2 5 Home Control This command moves the cursor to the current PC This command is useful when you have executed Part of a program then move the cursor to at something and then wish to restart the program DISASSEMBLY MODE Page 2 4 2 5 EXECUTION COMMANDS These commands are used to test the execution of the program being debugged They perform single stepping and breakpoint control If a second terminal is attached for debugging using the ATTACH command See Chapter 4 COMMAND MODE it is used for I 0 during single stepping and while proceeding If a buss error occurs while single stepping or proceeding the message BUSS ERROR is displayed After a short delay FIX returns to Disassembly Mode with the cursor just after the instruction that caused the buss error 2 3 1 Toggle Breakpoint Control P This command toggles a breakpoint at the current cursor Location If no breakpoint is set at the current Location a breakpoint is added at this Location The Line the cursor is on is redisplayed in reduced intensity Up to 16 breakpoints may be set at one time If 16 breakpoints are already set this command is ignored If there is already a breakpoint at this
17. atus Line while in Command Mode To change the active Display Mode use the Search and Dump commands The Search command makes Disassembly Mode the currently active Display Mode while the Dump command makes Dump Mode the active Display Mode FIX keeps a separate cursor and parameters for the Disassembly and Dump Modes Therefore you can change the addressing mode or move the cursor in one Display submode without affecting operation when you return to the other submode CHAPTER 2 DISASSEMBLY MODE In the Disassembly mode FIX displays memory as disassembled AM 100 op codes This mode is a submode of Display Mode The format is as follows 0000 PRG LABEL MOV SR4 VAR CRS 0035 data field operand field opcode field symbol field address base address The first field is the address The address is displayed in the current radix 4 digits if hex 6 digits if octal and is an offset from the current address base In the example Line above this base is PRG the base of the program being debugged Legal address bases are RO R7 relative to 100 register PRG relative to program base CABS absolute JCB relative to user s job control block SCA relative to system communication area The next field is the symbol field If the address being displayed corresponds to a symbol that symbol is displayed followed by a colon The next two fiel
18. base If the number is preceded with an N numbers are interpreted as 2 s complement and numbers greater than 32768 are displayed as negative OPERATION RESULT 2216 em gt gt 27 65534 1B FFFE n10 22 Ll 1B FFFE 27 2 5 13 2 2 Clear Stack 9 This operator clears the entire arithmetic stack Leaving it empty OPERATION RESULT da gt 3 5 7 11 Stack Empty 5 13 2 3 Quit ESC or Q This operator Leaves RPN and returns you to FIX Command Mode If Q is used it must be the first character on the Line 5 13 2 4 Add This operator adds the top two elements on the stack Leaving the result on the top of the stack OPERATION RESULT De gt 3 5 8 5 13 2 5 Subtract This operator subtracts the top of stack from the next to top of stack Leaving the result on the top of the stack FIX OVERLAY COMMANDS Page 5 9 OPERATION RESULT 22 3 5 2 5 13 2 6 Multiply This operator multiplies the top two elements on the stack OPERATION RESULT gt 2008 216 5 13 2 7 Divide This operator divides the next to top of stack by the top of the stack OPERATION RESULT 226 3 2 gt Stack Empty 2 5 13 2 8 Modulo X This operator divides the next to top of stack by the top of the stack and leaves the remainder on the top of the stack OPERATION RESULT N GD gt 3 11 2 5 13 2 9 amp
19. cessed just as with CMD and 00 files Any line beginning with a semicolon is ignored INTRODUCTION Page 1 3 A typical INI FIX file might Look something like this set hex attach term2 break cmloop break getesc break finish break xeq break value set up some standard breakpoints enable echoing choose your favorite radix attach debugging terminal For details on the command format see Chapter 4 COMMAND MODE 1 3 FIX MODES FIX operates in two basic modes called Display Mode and Command Mode You toggle between the two modes by pressing the ESC key When in Command Mode FIX displays the current status of FIX and your program and allows you to modify the debugging environment For instance you can set register values or delete memory modules Display Mode is further subdivided into two submodes Disassembly Mode and Dump Mode In Disassembly Mode FIX displays a screenful of disassembled code You may move the cursor through memory to examine it or you may single step and proceed through your program In Dump Mode FIX displays a screenful of memory in hex and ASCII formats You may move the cursor through memory and you may modify patch the contents of memory in either hex or ASCII One of these two submodes Disassembly or Dump is the active Display Mode Pressing ESC toggles you between Command Mode and the currently active Display Mode The active Display Mode is indicated on the FIX st
20. ds contain the disassembly of the instruction in standard AM 100 MACRO format FIX properly disassembles supervisor calls as well as Standard machine codes Like all disassemblers FIX can get out of sync when displaying unusual code such as imbedded data tables The final field 15 the data field This field is used when single stepping to display the result of an instruction Lines at which breakpoints are set are displayed in reduced intensity as they are disassembled DISASSEMBLY MODE Page 2 2 2 1 DISASSEMBLER NOTES This section describes some of the features quirks of the FIX disassembler The disassembler disassembles all AM 100 opcodes and AMOS supervisor calls as of AMOS release 4 4 If a symbol file SYM is present for the program being debugged it loads it and attempts to use symbolic values wherever possible FIX only uses Labels equated symbols are ignored If symbol is defined twice for instance in two different modules only the first definition is used If an instruction uses absolute addressing Label FIX checks for system variables as defined in SYS MAC Example MOV 8A TIME R1 FIX also checks for valid JCB symbols in job index supervisor calls Example JOBIDX 8RO0 JOBTRM Currently conditional jumps are disassembled as a branch followed by a jump Therefore 0000 JEQ TARGET 0006 NOP is disassembled as 0000 PRG BNE 6 0002 PRG JMP TARGET 0006 PRG NOP FIX attempts to disassemble
21. ead is under 50 instructions pass point Putting a Pass Point on a supervisor call increases the overhead significantly 4 2 13 Clear This command clears a breakpoint It accepts a single argument either a symbol or a hex value Ifa breakpoint is set at the specified location it is cleared otherwise this command is ignored If a is specified all breakpoints are cleared Examples gt clear cml2 clear breakpoint if any set at cml2 gt clear clear all breakpoints 4 2 14 INI This command processes a file which contains FIX commands Any FIX command except INI may be used the command file The default extension is Example gt ini breaks process command file BREAKS INI 4 2 15 List Overlays This command Lists the Overlay Commands available For more information on Overlay Commands see the next chapter COMMAND MODE Page 4 9 Example gt fxo Fix Overlay Files ay 1 DDB DIR EA HELP JCB LABELS MAP NEW RAD RPN TRMDEF TYPE CHAPTER 5 FIX OVERLAY COMMANDS 5 1 INTRODUCTION In addition to the commands described in the Last chapter a number of additional commands are available in FIX Command Mode These commands however not permanently resident but are overlays If an overlay command is entered the overlay is fetched into memory from 05 0 7 01 and executed FIX overlay files have an extension of FXO get a list
22. en display concepts to give the user a two dimensional visual interaction with his her program This manual assumes that the reader is familiar with AM 100 assembly Language programming and the AMOS runtime environment Related documents are the Wb16 Microcomputer Reference Manual DWM 00100 04 the AMOS Assembly Lanauage Programmer s Manual DWM 00100 43 and the AMOS Monitor Calls Manual DWM 00100 42 1 1 FIX AND DDT FIX is designed to be an alternative to the debugger called DDT FIX provides most of the DDT functions often expanding those functions while adding a number of unique features DDT users will note that FIX 1 Disassembles and single steps through AMOS supervisor calls 2 Allows the program under test to use a separate terminal for 1 0 This is especially useful when debugging programs that are themselves screen oriented since the debugger does not interfere with the screen display and vice versa 3 Allows BASIC assembly Language subroutines and AMOS drivers to tested 4 Allows formatted display of AMOS data structures such as DDBs JCBs files and directories One important restriction of FIX 15 that the current version does not support program patching assembly language This will be added in a future release INTRODUCTION 1 2 INVOKING FIX Page 1 2 FIX is invoked from AMOS command Level by entering FIX followed by the name of the program to be debugged Any extension may be
23. es Dump Mode the currently active Display Mode METIS MUGG Page 4 4 4 2 3 Quit This command is the normal method of Leaving FIX ALL modules in memory are deleted and the user returns to AMOS 4 2 4 Finished This 15 an alternate method of Leaving FIX It is identical to Quit except that the memory module being debugged is not deleted After returning to AMOS the user may SAVE the module 4 2 5 Register Modification These eight commands allow the user to modify the AM 100 registers The register name is followed by the new value of the register Example gt RO 2356 set RO to 2356 The user should be careful when modifying SP Any data below SP is invalid since the first thing FIX does upon acquiring control from the user program is to save the PS and PC on the stack In other words it is OK to increase the SP but not to decrease it The program counter can also be modified by moving the cursor in Disassembly Mode and either single stepping or proceeding 4 2 6 Set Address Base Mode This command sets the current Base Mode The form of this command is gt rel address mode COMMAND MODE Page 4 5 The Legal modes are RO relative to RO R1 relative to R1 R2 relative to R2 R3 relative to R3 R4 relative to R4 R5 relative to R5 R relative to R6 SP relative to R6 R7 relative to R PC relative to R7 PRG relative to base of program ABS absolute mode JCB relative to user s JCB
24. ete the module IOBUF FIX Since this module is used by FIX for disk I 0 this module should not normally be deleted gt new This command has no effect since no modules have been allocated during the session FIX OVERLAY COMMANDS Page 5 3 5 5 JCB This command displays the current status of a job If no argument is specified your job status is displayed If a job name is specified that job s status is displayed gt jcb system Job Name SYSTEM Logged on DSKO 21 1 Job Priority 9 Egger on DsSKU Le1 1 X Job Priority 0 Job Status RN Job Type J SR J T J GRD ES Memory 2 JOBTRM z 030000 WIZARD The JCB command may also be used to display a summary of the system status similar to the AMOS command SYSTAT To display the system status enter JCB with an argument of x 2jcb BET BILL TERMI 05 0 1 4 C MEMORY SYSTEM WIZARD DSK p RN FIX BCKGN1 1 SPOOL SPL1 DSK0 1 21 EW LPTSPL S r _ ee Gor 5 6 TRMDEF This command displays the current status of a terminal If no argument is specified your terminal s status is displayed If you are running with a terminal attached for debugging the attached terminal s status 15 displayed If name follows the TRMDEF that terminal s status is displayed gt trmdef wizard Terminal WIZARD Terminal Status 000363 Interface Driver 025546 AM300 IL EE EI ISO 0 H H Terminal Driver 30106 SOROC Inp ar Count Echo Char Cou
25. nd proceed to breakpoint attach debugging terminal set radix hex octalU set breakpoint clear breakpoint process FIX command file List overlay commands ALPHA FIX USER S MANUAL Page vil OVERLAY COMMANDS HELP List FIX commands List memory modules NEW delete memory modules JCB jobname display JCB status TRMDEF termname display terminal status EA effective addr display effective address RADSO effective addr display RAD50 format 008 effective addr display DDB contents DIR Filespec display directory TYPE CFilespec display ASCII file LABELS List labels in symbol table RPN 4 hex octal calculator m e gt a e V A go i vor RPN Operators change base clear stack f return to FIX command mode add subract multiply divide modulo exclusive or shift top of stack Left one bit shift top of stack right one bit negate top of stack swap top two stack elements roll stack elements Left roll stack elements right pop stack CHAPTER 1 INTRODUCTION AlphaFIX is an interactive screen oriented debugging program It allows the user to examine and run AM 100 machine Language programs Users of the VUE screen editor will find operation of FIX familiar FIX uses many of the same scre
26. nning of Line 3 3 Cursor Advance lt lt 3 2 Cursor Backspace 3 2 Cursor Down a 3 3 Cursor Home s lt s s 3 3 Cursor Indirection a e e e a 3 4 Cursor Up s s lt s a s 3 3 End of Line s sss lt s s a 3 3 Hex 3 2 Hex ASCII Mode 3 1 Last Byte a a aas s asa lt 3 2 Next Byte 3 2 Page DOWN s x ux s lt a lt s es 3 3 Page UD 1 ww xo 3 3 RETURN ce eR S lt lt mea lt lt s 3 3 Finish Command 4 4 Fix Modes a s asosa anae o 1 3 Disassembly Mode 2 1 4 2 Dump Mode a s lt 4 3 FXO command a e es ese saaa 4 8 Go Command 4 6 Help w 43x 60 3 3 x51 Hex Entry lt s w 3x9 3 2 Histogram i c w 5 42 20 4 7 Home 2 s e 22 32 12 3 INI Command s lt lt a 4 8 Initial Page a e o o 2 3 Invoking FIX 1 2 List Overlay Commands MAP a NEW LI s a s 4 8 5 1 5 2 Overlay Commands 5 1 5 5 DIR G a 18 6 jJ WP 5 4 Help 4452 2 22 5 1 5 3 LABELS snar ES ALPHAFIX USER S MANUAL INDEX Page Index 3 050 5 5 RPN wow o a S cow we Df TRMDEF 2 5 3 sds x 5 6 Page Down
27. nt 000000 Brk Char Count 000000 Input Buf Link 030760 Input Buf Size 000144 Output Buf Link 031124 utput Buf Size Output Buf Index 4 Beg Position 000130 Current Position 000022 Last Char Input 000015 FIX OVERLAY COMMANDS Page 5 4 The TRMDEF command can also be used to display a summary of all terminals similar to the AMOS TRMDEF command by using an argument of gt trmdef TERMI BILL 025440 AM300 000001 100 100 100 WIZARD SYSTEM 030000 000002 SOROC 100 100 100 P 000004 SOROC pep PTY1 BCKGN1 3160 PSEUDO 0 PSEUDO 100 100 5 1 SPO PSEUD 0000 NULL 5 EA This command computes Effective Address It accepts one standard argument gt ar2 Effective Address 020000 gt 4 r2 Effective Address 020004 gt ea symbol prg Effective Address 161552 gt ea symbol Effective Address 161552 5 8 RAD50 This command dumps 2 words memory RADSO format 1 accepts one standard argument Example gt 50 DATLSZ 5 9 DDB This command displays the contents of DDB The address of the 008 is specified by a standard argument FIX OVERLAY COMMANDS Page 5 5 gt ddb infile r5 File Name SEQIO MAC ags 000 inited Error 000000 Buffer Link 102742 Record Size utfer Index 001000 103742 ABS Record Number 01 4 Queue Link 166 JCB Addres
28. oceed to Cursor Controi G 275 Toggle Skip Subroutine Mode 2 4 4 275 2 2 vn U IJ C lt Q4 r 2 3 Ss 5 5 UN L4 UI 4 LJ a IN PJ PJ NJ NJ 3 DUMP MODE UJ TOGGLE HEX ASCII MODE RUBOUT 3 1 3 1 1 Hex Entry ceaacccsvaccccecassvacenacessae 372 3 1 2 ASCII Entry 372 CURSOR ADVANCE CONTROL L 3 2 CURSOR BACKSPACE CONTROL H 372 NEXT BYTE CONTROL W 3 2 LAST BYTE CONTROL 4 3 2 BEGINNING OF LINE CONTROL U 3 3 END OF LINE CONTROL N 3 3 CURSOR DOWN CONTROL J 2 3 3 3 3 3 4 O Ut UN 222 PWN oO CURSOR UP CONTROL K RETURN aa a CURSOR HOME CONTROL 3 3 PAGE DOWN CONTROL T 3 3 PAGE UP CONTROL R 3 3 CURSOR INDIRECTION TAB 37 b UN LN IN N LN N N N N ALPHA FIX USER S MANUAL CHAPTER 4 CHAPTER 5 COMMAND MODE 4 4 O v 4 gt c 0 9 4 1 INTRODUCTION
29. of the overlay commands type FXO followed by RETURN FIX Lists the overlay commands available 5 2 HELP This command displays a menu of FIX commands 5 3 This command displays the current memory map of your partition The name Cif any size and address of each module are Listed along with the free space If a module is permanently Loaded it is displayed in reduced intensity FIX OVERLAY COMMANDS Page 5 2 AlphaFix 1 0 Status Disassembly PRG 101406 octal Debugging LOOP PRG with SYM gt map GET User Memory Map Module Size Address FIX PRG 16078 1 IMPURE FIX 1070 077330 LOOP PRG 284 101406 LOOP SYM 6 10204 IOBUF FIX 5 102156 The example above is a typical memory map The modules shown are FIX PRG debugger IMPURE FIX scratch space used by FIX LOOP PRG program being debugged LOOP SYM symbol table of program being debugged IOBUF FIX FIX disk I 0 buffer FREE non allocated memory space If the program being tested allocates any memory modules they appear after IOBUF FIX Usually they do not have any names common module is a 522 byte disk 1 0 buffer allocated by an INIT call 5 4 NEW This command deletes memory modules If no argument 15 specified the highest memory module 15 deleted If a is specified all memory modules allocated during the debugging session are deleted The following examples refer to the memory map in the Last example gt RET This command would del
30. s 000000 Open Code 000001 sequential input _ input File Size 000011 Active Bytes 000227 First Record 010575 5 10 DIR This command displays directories Wildcards are allowed in the filename and extension but not in the drive name or PPN The default Filespec is dir prg FIX PRG KBD PRG OUT PRG LOOP PRG OE ae RS gt dir xeq 21 11 XEQ XEQ OBJ XEQ PRG 5 11 TYPE This command displays a file on the terminal gt type L cmd ST LINK MAIN SUB1 SUB2 UTIL Enter CR to return to Command Mode ATL C ORM ANG mode gt FIX OVERLAY COMMANDS Page 5 6 5 12 LABELS This command displays the symbol table of the program being debugged 5 13 RPN This overlay 15 an RPN calculator useful for scratchpad computations It operates in any base from 2 to 16 and can be used for base conversion Its operation is similar to calculators using Reverse Polish Notation When you enter RPN the initial display appears as follows 1 0 Status Dump R4 08A3 hex Debugging USER PRG gt AlphaFIX RPN calculator Current Base is 10 Stack Empty The double parenthesis is the RPN prompt symbol You may now enter a Line of text The standard form of an RPN command 15 a series of Q to 9 numbers optionally followed by an operator 2 number number number Coperator Any operator terminates input immediately and causes RPN to process the Line
31. s this mode may crash FIX 3 DUMP MODE In the Dump mode FIX displays memory in hex and ASCII This mode is a submode of Display Mode The other submode is Disassembly Mode described in the last chapter Each screen consists of 24 Lines displaying 384 bytes The format of each Line is as follows 0000 R2 79 68 69 76 75 6D 70 20 6D 64 this is dump mod ASCII field hex field address base address first two fields are identical to the corresponding fields in Disassembly Mode See Chapter 2 DISASSEMBLY MODE The hex field contains the hex representation of the following 16 bytes of memory The ASCII field contains the same 16 bytes displayed as text If a byte does not contain legal printing character it is displayed as a dot in the ASCII field While in Dump Mode the user may move the cursor through memory to examine data or memory may be modified in either hex or ASCII 3 1 TOGGLE HEX ASCII MODE RUBOUT When in Dump Mode the cursor normally points to a hex number within the hex field However the cursor can be moved to the ASCII field by pressing RUBOUT The cursor can be returned to the hex field by pressing the RUBOUT key again Page 3 2 3 1 7 Hex Entry When in Hex Mode the user can modify the contents of memory by entering hex digits If a valid hex digit is entered 0 9 A F the memory corresponding to the current cursor posi
32. specified The default is PRG FIX attempts to locate the desired file and if found FETCHes it FIX does not delete the module if it already exists before doing the FETCH FIX then attempts to locate a corresponding SYM file If found it is loaded in and the user may reference locations by their symbolic names as well as by numeric value Example fix user AlphaFix Version 1 0 FIX then enters Command Mode See Chapter 4 COMMAND MODE and the user may commence debugging 1 2 1 The FIX Initialization File When FIX is invoked it Looks for an initialization file It first Looks for a file FILENAME FIX where FILENAME is the name of the file being debugged 14 it does not find this file it looks for a file named INI FIX If found this file is read in and processed The file commands identical to the commands the user consists of a series of Ld enter in Command Mode See Chapter 4 COMMAND MODE These commands can be used to initialize FIX with commonly used commands FIX searches for the initialization file in three accounts Assuming the user is currently Logged LP PNJ the search order is 1 FILENAME FIX special INI file for this program 2 INI FIXCP PNI user s account 3 02 project Library account 4 DSKO INI FIXC7 03 system Library 1f desired a T may be placed into the INI FIX file This causes all following Lines to be echoed to the console as they are pro
33. ss Points In addition to simple breakpoints you may also set Pass Points in your program Pass Points are a special form of breakpoint When the program reaches a Pass Point it increments a counter the pass counter associated with that point If the pass counter has reached a certain predefined value the pass count a breakpoint is executed and you regain control in Disassembly Mode Otherwise the program continues normal operation Pass Points are set using the Breakpoint Command with an additional argument specifying the pass count While in Command Mode the breakpoint is now displayed with two additional values The first displayed in normal intensity is the current pass counter The second value displayed in reduced intensity is the pass count Example gt break loop 4 The example sets a Pass Point at LOOP with a Pass count of 4 Note that the pass count is expressed in the current radix This means the program will not break until it reaches LOOP for the fourth time A secondary use of Pass Points is a simple histogram generator If the pass count is set to OFFFF 177777 octal the pass counter will always contain the number of times that point has been reached during execution setting pass points at crucial subroutines it is possible to determine how many times they are called during a program run COMMAND MODE Page 4 8 Pass Points do impose a Speed overhead on the program being debugged Normally this overh
34. tion is modified to hold that data Both the hex 70 ids fields of the display are updated and the cursor advances one nibble 3 1 2 ASCII Entry When in ASCII Mode the user can modify memory by entering ASCII characters If a valid ASCII printing character is entered the current memory location is modified and the display is updated The cursor is advanced by one byte 3 2 CURSOR ADVANCE CONTROL L This command moves the cursor forward by one nibble 4 bits if in Hex Mode or one byte if in ASCII Mode If the cursor reaches the end of a Line it wraps around to the next Line If it reaches the end of the screen the screen is scrolled up by one Line 3 3 CURSOR BACKSPACE CONTROL H This command moves the cursor backward by one nibble 4 bits if in Hex Mode one byte if in ASCII Mode If the cursor reaches the beginning of a line it wraps around to the end of the preceding Line If it reaches the beginning of the screen the screen is scrolled down by 1 2 page and the cursor is wrapped around 3 4 NEXT BYTE CONTROL W This command moves the cursor foward to the next byte If the cursor reaches the end of a Line it wraps around 3 5 LAST BYTE CONTROL A This command moves the curSor backwards to the preceding byte If the cursor reaches the beginning of the Line it wraps around DUMP MODE Page 3 3 3 6 BEGINNING OF LINE CONTROL U This command moves the cursor to the first byte in the current Line 3 7
35. y OPERATION RESULT P GED 7 gt 1 5 9 16 4 9 16 ALPHAFIX USER S MANUAL INDEX Address base ASCII Entry Attach Command Break Command Clear Command Command Format Command Mode Attach aa Break Clear Command format Dump Finish aasa DO ow lw vos INI Command List Overlay Commands Pass Points Proceed QUIE S a Register Modification Search Set 5 e 2 a Set Address Base Mode Spec Cursor Commands Cursor Down a Cursor Up Cursor Down Cursor Up 5 as ae 2 Disassembly Mode Cursor Commands Cursor Down Cursor Up Execution Commands Home Initial Page Page Down Pass Points Proceed from Subroutine Proceed to Cursor a a 5 a a e s e Index 4 8 4 2 1 3 4 6 4 7 4 8 4 2 4 3 4 4 4 6 4 8 4 8 4 7 4 6 4 4 TOY PL a dr T Ul Ui CI Q Q OL Page Index 1 ALPHAFIX USER S MANUAL INDEX Page Index 2 Single step lt o 2 4 Skip Subroutine Mode 2 5 Toggle Breakpoint 2 4 Display Mode 1 3 Disassembly Mode 2 1 Dump Mode lt s lt 3 1 Proceed to Breakpoint a 2 4 Dump Command 4 3 Dump Mode 1 3 3 1 6 3 ASCII Entry ess lt lt s lt lt a 3 2 Begi
Download Pdf Manuals
Related Search
Related Contents
Fitting instructions Make: Permanently linked to quality T ype: 3905 JVC TK-T8101WPRU User's Manual 3 Across Alley Roller Manual Bedienungsanleitung Operating Instructions Instructions de service 第4章 TPD カーブの解析方法 DSW-3519 / DSW-3522 /DSC-3219 こちら - 地域生活研究所 HP Pavilion 15-n027se DESCRIÇÃO RESUMIDA DE OPERAÇÃO DO PROTÓTIPO DO N320 Manual de usuario Instalación y configuración del cliente VPN Copyright © All rights reserved.
Failed to retrieve file