Home

AlphaFIX User`s Manual

image

Contents

1. 3 6 Debugging a program Breakpoint control 2 3 Execution of subroutine 2 5 Moving the cursor 2 2 Positioning cursor to PSE 2Fdabel Single stepping 2 4 Debugging subroutine or driv amp 7 Disassembler 2 2 Absolute addressing 2 2 Symbolic file 2 2 Disassembly 2 2 Display Mode 1 3 Cursor down 2 3 Cursor Up i e spa ack d 2 3 Down arrow 2 3 Execution commands 2 3 Home 2 3 Initial page 2 3 Page Down 2 3 Proceed from subroutine 2 4 Proceed to breakpoint 2 4 Proceed to cursor 2 5 Repaint screen 2 5 Single step 2 4 Skip subroutine mode 2 5 Toggle breakpoint 2 3 Up arrow 2 3 Up to previous label 2 5 Up to previous non local lae DSECT command 3 6 Dynamic breakpoints 3 11 GO Command 3 7 Invoking AlphaFIX 1 1 Labels 5 oer 2 1 to 2 2 Finding full label name 2 2 Symbollength 2 1 MAP command 4 2 MOVx command 3 7 Page Index 2 AlphaFIX User s Manual Rev 02 Index Overlay Commands 4 1 EA Inr edis 4 1 JOB ceu 4 1 MAP sss 4 2 PTR S Bod Rete hie 4 2 TRMDEF 4 3 PY RES 4t enti are ca 4 3 PROCEED command 3 8 PSECT command 3 8 Quit command 3 8 Register modification 3 5 Register submode
2. 000 0c cee ee 3 3 Register Expressions 2 4 ccaawse ds aos4 hae DE REGI erage RE ROUES 3 4 THE COMMANDS x exea RATE TREE CE REESE e RE P RE 3 4 An or Dn or SP Set Register n to Specified Value 3 5 BREAK Set a Breakpoint at Specified Location 3 5 CLEAR Clear Breakpoint n anaana nnana 3 6 AlphaFIX User s Manual Rev 02 DDB Display Contents of a DDB 0 0002 e eee 3 6 DSECT Declare DSECT Base Register 05 3 6 GO Execute AMOS Command 2 000 e eee eee 3 7 MOVx Move Data of Type x 0 cee es 3 7 PROCEED Proceed to Breakpoint 0 0 000 3 8 PSECT Declare PSECT Base Register 32K bias 3 8 OUIT Exit AIDBSED x ue ate sid a end doen a NUM EE eR 3 8 REL Set Address Base Mode Llslssslslssss 3 8 SEARCH Search for Program Symbol or Location 3 9 SET Set OpllOn 2 240 Lies RERUM Ck Roe hae SR 3 9 SPEC Setup Command Line 2 0 00 eee ee 3 9 VIEW Display Memory Contents From Specified Address 3 10 WATCH WATCHB WATCHW SET DYNAMIC BREAKPOINTS 3 11 CHAPTER 4 ALPHAFIX OVERLAY COMMANDS D 4 1 Sec T cc RD cc DEED er he ee ee UTE 4 1 MAP es dem dS a be due t ee Ae E PR raten Pace d ete t ori ace Ed iA 4 2 PTR aen ce Ron Ry iio ace lia o e eae deg UNDA UR A ele eR See wie ae 4 2 TRMDEF serant eaii xe ind eati ortae cae xn ded toe
3. 1 3 REL command 3 8 Search command 3 9 SET command 3 9 Single step 2 4 CALL instruction in skip suBroutine mode Split screen display mode 2 6 Skip subroutine mode 2 5 SPEC command 3 9 Split screen display mode 2 6 Subroutine Finding name of calling routibe VIEW command 3 10 View submode 1 3 WATCH command 3 11 WATCHB command 3 11 WATCHW command 3 11 AlphaFIX User s Manual Rev 02 Page Index 3
4. If you type in the FIX command and the program file name but forget to type in the optional input TEST DAT in this case AlphaFIX allows you to type in a SPEC statement after its Command Mode display See below AlphaFIX 2 1 156 Status Disassembly PRG 002559D4 hex Debugging USER LIT with SYM PSECT 8000 A3 DSECT A5 C Mode gt Registers DO 0 D1 0 D2 0 D3 0 D4 0 D5 0 D6 0 D7 0 AO 0 Al 0 A2 24E8FC A3 0 A4 0 A5 0 A6 0 SP 24E846 PC Cursor Status X N Z V C TO T1 S M Int Mask 00000000 PRG 00000012 PRG 0 00 0 0 0 0 0 0 0 Breakpoints R or T to see more 00000000 PRG PROG 00000012 PRG main If you forgot to type in the optional program input TEST DAT in our example type it in now using a SPEC instruction like this gt SPEC TEST DAT EUN See Chapter 3 for more information on Command Mode and the SPEC statement Now you can start debugging your program You can exit AlphaFIX at any time by typing Q EuN at command mode ALTERNATE TERMINAL SUPPORT AlphaFIX supports use of an alternate terminal for all of the program s keyboard input and terminal output This lets you separate the program s I O and the AlphaFIX session The alternate terminal must not be attached to a job To specify an alternate terminal follow the FIX command with the T switch and the terminal name T must come before the name of the program you want to debug For example FIX T TERM2 USER TEST DAT GEA AlphaFIX U
5. and executed For all practical purposes however you can ignore the fact these commands are overlays and treat them as regular commands AlphaFIX overlay files have an extension of FXO Because AlphaFIX must load overlay commands from disk you may notice a slight hesitation before the command executes Under normal circumstances this hesitation is barely perceptible however if you find this hesitation annoying you may preload any AlphaFIX overlays you wish into your own memory partition This substantially increases the speed with which the overlay is FETCHed EA Computes an Effective Address It accepts one standard argument For example gt EA A2 EUN Effective address 20000 JCB 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 For example gt JCB JOB1 Job Status for JOB1 JCB address 24E100 JOBSTS 0 JOBBAS 24EAC4 JOBEXI 24E846 JOBFPE 0 JOBTYP 2B1 JOBSIZ 20000 JOBERC 2522B0 JOBDSR Cy JOBPRV FFFF JOBWAT 0 JOBTRC 250DB2 JOBDSW 0 JOBCMZ 0 JOBCPU 996 JOBBPT 250FC2 JOBUSR DSK4 101 11 Registers DO 1D0A D1 3 D2 0 D3 254619 D4 1DOA D5 27080000 D6 430B D7 24E178 User SP 24E846 System SP 24E456 AlphaFIX User s Manual Rev 02 Page 4 2 AlphaFIX Overlay Commands JCB can also display a summary of the system status similar to the AMOS command SYSTAT To display the system status enter
6. JCB with an argument of For example gt JCB RETURN Job Term Prog PPN BILL TERMO 1 MULTI WIN2 77 1 TASK MANAGR LOG DSKO 1 4 NETSER NETSER NETSER DSKO 1 4 STSKAA TSKAA MAP WIN2 77 1 MAP Displays the current memory map of your partition The name if 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 For example AlphaFIX 1 0 110 Status Disassembly PRG 101406 octal Debugging LOOP LIT with SYM gt MAP RETURN Memory Map FIX LIT 16078 40012 362 226 773 443 IMPURE FIX 3344 77330 356 034 233 653 LOOP LIT 284 101406 232 123 624 71 LOOP SYM 60 102042 122 222 437 152 Free 60880 103136 The modules shown are FIX LIT AlphaFIX debugger IMPURE FIX Scratch space used by FIX LOOP LIT Program being debugged LOOP SYM Symbol table of program being debugged Free Non allocated memory space PTR Displays data through a pointer in memory Functionally PTR operates exactly the same as VIEW except the parameter given is the effective address of a longword containing the address to be displayed For example gt PTR jb A5 AlphaFIX User s Manual Rev 02 Chapter Four Memory Display from PTR iobas A5 00000042 A5 cmdlin A5 00000046 A5 TRMDEF 003 000 000 OF6 024 000 OFD OE8 000003 00F600 00002
7. both disassembly and the registers and status See the SET command in command mode for details You can use this mode for single stepping through sections of the program that are difficult to understand This display is from a C program 00000000 00000004 00000008 0000000C 0000000E 00000012 00000016 00000018 0000001C 00000020 00000022 00000026 0000002A 0000002E 00000030 vuUUU UU UU UU DU Registers PC 00000008 P RG PROG main 28 2 i 255C8E 258592 Cursor 00000008 PRG 2 EA p PUD SHS Se z pn zt CQ 0 3 di E mopgubounoouobg QUt root TS Et D1 D5 A3 ei AO 4 18 25DC8E nit 8000 A3 A1 D2 r SP typecr 8000 A3 4 jb A5 se 4 2 SP t jmp 8000 A3 r SP exit 8000 A3 sub1 8000 A3 4 AO 4 1FDF Al 24E13C A5 25 Status 8514 X N 0 0 r SP A1 D2 D2 0 D3 5A D6 2 DUS 8039 A2 256808 A3 25DC8E A6 FFFF8008 SP 268740 Z V C TO Tl S M Int Mask D Og Oe Oe B 0 0 AlphaFIX User s Manual Rev 02 CHAPTER 3 COMMAND MODE This chapter describes the AlphaFIX Command Mode which is used to set up and modify the debugging environment AlphaFIX enters Command Mode when it initially starts running and returns to Command Mode from Display Mode whenever you press or vw The Command Mode screen displays the current status of AlphaFIX and the program under test F
8. command according to display change Revision 02 AMOS Release 2 3 Released 6 96 Re ordered quick reference lists Added alternate terminal support and WATCH commands AlphaFIX User s Manual Rev 02 Index Absolute address 3 3 Address base 2 1 3 3 Address base relocation 3 3 AIphaBASIC 3 7 AlphaFIX Modes Command mode 3 1 Display mode 2 1 AlphaFIX Modes 1 3 Alternate terminal support 1 2 BREAK command 3 5 Breakpoint 2 4 3 5 At current cursor location 2 5 Attop of stack 2 4 Clearing breakpoint 3 6 setting dynamic 3 11 To execute subroutine 2 4 Breakpoints 2 3 Calling AlphaFIX 1 1 CLEAR command 3 6 Command expressions 3 2 Legal operators 3 2 Command Format 3 4 Command Mode 1 3 Break ose pAufes 3 5 ClO Al vise iting ioe ae aed 3 6 Display DDB 3 6 DSEGT ex a fe ee xen 3 6 Editing acommand line 3 4 GOP Ben ants ache 3 7 MOVX 0005 3 7 Proceed 3 8 PSEGT nerd 3 8 QUIE 6o sh extr tates 3 8 Register modification 3 5 Returning to Display Mode3 1 SOAIGCH ces tS 3 9 Sel los rr oiufo 3 9 AlphaFIX User s Manual Rev 02 Page Index 1 INDEX Index Set address base mode 3 8 SPEG bx eee 3 9 View memory 3 10 Command Mode Keystroke C8n mands Cursor commands 2 2 DDB command
9. of allowable expressions is quite broad and has been designed to be very similar to the expressions used by the macro assembler M68 An expression is a combination of terms and operators which evaluate to an unsigned 32 bit value in the decimal range O through 4 294 967 295 Negative values in the range of 2 147 483 648 through 1 are stored properly after evaluation but are treated the same as their unsigned counterparts All operators are defined as unary or binary Unary operators precede a single term and alter the evaluation of that term alone Multiple unary operators may be applied in sequence to the same term and are evaluated right to left Binary operators combine two terms to give a resultant single term value Multiple binary operators are illegal Expressions are evaluated left to right under the hierarchy of the operators used within the expression Angle brackets lt gt may be used to alter the normal process of evaluation Unary operators always take precedence over binary operators and are applied to their associated terms before any binary operators are evaluated The legal operators are Operator Description Unary plus sign default if term is not preceded by another unary operator Unary minus sign which negates two s complement the associated term value Unary ones s complement operator XOR s the term with all ones Underscore Binary shift operator given AB the binary representation of A is shifted
10. up to 32 to identify a label not just the first six Therefore when you use a search command or any command that uses a label as an operand you must include all the characters in the label or AlphaFIX will tell you the label is undefined Remember AlphaFIX is also CASE SENSITIVE with respect to symbol names That is upper and lower case characters are not considered to be the same AlphaFIX User s Manual Rev 02 Page 2 2 Display Mode If there is confusion as to the result of truncated labels in the display use the following method to get the full label name 1 Position the cursor to the Label location in display Disassembly mode 2Switch to command mode 3Press c amp C A BREAK label name gt command is placed on the command line This BREAK command contains the full label name The next two fields contain the disassembly of the instruction in standard M68 format If the instruction uses long symbols the symbols are displayed in full However if the symbols are extremely long the instruction is truncated and the last few characters are not displayed AlphaFIX disassembles supervisor calls as well as standard machine codes Like all disassemblers AlphaFIX can get out of sync when displaying unusual code such as embedded data tables Lines at which breakpoints are set are displayed in reduced intensity as they are disassembled This feature depends on your terminal having reduced intensity capability DISASSEMB
11. 4 00E8FD jb A5 0003F600 F6000024 0024E8FD E8FD0025 5 0 9NP 1 6225999077E32 6 0 7KE 2 3895228475E24 Page 4 3 Effective address 258554 Displays the current status of a terminal If no argument is specified a summary of all terminals attached to the system is displayed If a terminal name follows the TRMDEF that terminal s status is displayed For example gt TRMDEF WIZARD Terminal WIZARD Terminal Status Interface Driver Terminal Driver Inp Char Count Echo Char Count Break Char Count 163 54424 AM100L 55114 SOROC Ce The TRMDEF command can also be used to display a summary of all terminals similar to the AMOS TRMDEF command by omitting the argument gt TRMDEF TERMO1 TERMO3 MANAGR NETSER STSKAA TYPE BILL SLAVE1 TASK NETSER STSKAA 008160 008FD8 009864 0099A2 22C3BE AM100L PSEUDO PSEUDO PSEUDO PSEUDO AM62 TELTYP NULL NULL WINDOW Ooooc 100 100 100 100 100 100 50 50 50 25 25 25 100 100 100 This command displays a file on the terminal For example gt TYPE L CMD Ej T LINK MAIN Enter CR to return to Command Mode L SUB1 SUI AlphaFIX User s Manual Rev 02 B2 UTI 9600 19200 19200 19200 19200 APPENDIX A INPUT TRANSLATION Translation of input characters and multi character sequences is a feature of AlphaFIX The translation tables used are the same as th
12. ALPHAFIX User s Manual ALPHA MICROSYSTEMS RIGHT FROM THE START DSM 00017 02 1996 Alpha Microsystems REVISIONS INCORPORATED REVISION DATE 00 March 1988 01 April 1991 02 June 1996 AlphaFIX User s Guide To re order this document request part number DSO 0001 7 00 This document applies to AMOS versions 2 2C and later The information contained in this manual is believed to be accurate and reliable However no responsibility for the accuracy completeness or use of this information is assumed by Alpha Microsystems This document may contain references to products covered under U S Patent Number 4 530 048 The following are registered trademarks of Alpha Microsystems Santa Ana CA 92799 AMIGOS AMOS Alpha Micro AlphaACCOUNTING AlphaBASIC AlphaCALC AlphaCOBOL AIphaFORTRAN 77 AlphaLAN AlphaLEDGER AlphaMAIL AIphaMATE AlphaNET AlphaPASCAL AlphaRJE AlphaWRITE CASELODE OmniBASIC VER A TEL VIDEOTRAX The following are trademarks of Alpha Microsystems Santa Ana CA 92799 AlphaBASIC PLUS AlphaVUE AM PC AMTEC DART ESP MULTI inSight am inFront am All other copyrights and trademarks are the property of their respective holders ALPHA MICROSYSTEMS 2722 S Fairview Street P O Box 25059 Santa Ana CA 92799 TABLE OF CONTENTS QUICK REFERENCE TABLES CHAPTER 1 INTRODUCTION USING ALPHAFIX i 4 ria i Rbe pb ACD n PIE REDE 1 1 CALLING ABPHAEIX 5 usce toe ea sor Spes RW BET ET 1 1 ALTERNATE TERMINAL SUPP
13. B number of times If B is positive A is shifted left if B is negative A is shifted right Binary multiplication operator Binary division operator Binary addition operator Binary subtraction operator AlphaFIX User s Manual Rev 02 Chapter 3 Page 3 3 Operator Description Binary logical AND operator Binary logical inclusive OR operator Temporary radix change to decimal for the associated term Temporary radix change to binary for the associated term Temporary radix change to octal for the associated term Temporary radix change to hexadecimal for the associated term Numbers Any expression item which starts with a digit 0 9 is considered to be a number which is evaluated under the currently prevailing radix being used by AlphaFIX unless preceded by a temporary radix operator or followed by a decimal point The prevailing radix may be changed through use of the AlphaFIX SET command Any number that terminates with a decimal point is evaluated as decimal base 10 regardless of the prevailing radix Note that hexadecimal numbers must begin with a numeric digit thus the hexadecimal value D56 must be entered to AlphaFIX as 0D56 Address Base Relocation Unlike the macro assembler M68 AlphaFIX assumes all expressions are relocated according to the current address base unless explicitly overridden in the expression The current address base is set using the REL command see below Thus when using the
14. CEED SEARCH lt expr gt An lt expr gt REL lt mode gt BREAK lt expr gt Dn lt expr gt SET lt option gt SPEC lt string gt WATCHB lt arg gt WATCH lt arg gt WATCHW lt arg gt Quick Reference Guide Compute effective address of lt expr gt Display JCB status Display terminal status List memory modules Type contents ASCII file View from address in longword at lt expr gt Page 4 Overlay Commands EA lt expr gt JCB lt jobname gt TRMDEF lt term name gt MAP TYPE lt filespec gt PTR lt expr gt Command Mode Keystroke Commands Delete character Delete previous character Execute command or overlay Generate BREAK PTR command View display mode Register display mode Generate CLEAR command View display mode Register display mode Go to end of command line Go to start of command line Home View display mode Register display mode Insert blank character Move cursor left Move cursor right Next page View display mode Register display mode Previous page View display mode Register display mode Register Breakpoint Display Scroll down line View display mode Register display mode Scroll up line View display mode Register display mode Toggle insert mode D or DEL CHAR key P or Gen PTR aaaa aaaa top addr in display Gen BREAK aaaa aaaa cursor address E No action Gen CLEAR aaaa aaaa top addr in bpt disp N M or Redisplays at original V
15. IC BREAKPOINTS The three WATCH commands let you monitor memory locations and or registers while the program is running following a PROCEED command If the watched location meets the condition you specify the program stops and the last instruction traced displays in reduced intensity A watch is also called a dynamic breakpoint The WATCH command has this format WATCH register or location value The WATCHB and WATCHW commands have the same format The WATCH command watches a longword of memory WATCHB watches a byte WATCHW watches a word Setting a watch for a register always watches a longword If you include only register or location the program will stop whenever that register or memory location changes value If you also include value the program will stop only if the register or location equals the value you enter Here are some sample commands WATCH DO Breaks when DO changes value WATCH SP S4D50 Breaks when SP equals 4D50 hex WATCHB 0 ABS Breaks when the byte at 0 ABS changes WATCHW 200 PRG 1 Breaks when the word at 200 PRG equals 1 If you set a watch on an equality you probably want to clear it after it breaks Otherwise AlphaFIX will break on every instruction until the equality is no longer true If you enter a WATCH command without any argument it displays the current watches at the bottom of the screen where breakpoints are normally displayed If a watch caused a break it has an arrow to its left You
16. IEW PTR address Positions to top of breakpoint list F or INS CHAR key H or L or gt T or NEXT SCREEN key Pages data display up 16 words Pages breakpoint display up 6 R or PREV SCREEN key Pages data display down 16 words Pages breakpoint display down 6 S Sor Scrolls data display down one word Scrolls breakpoint display down one AK or T Scrolls data display up one word Scrolls breakpoint display up one Q or Key Commands during PROCEED With WATCH Enabled BREAK program execution GO full speed AB G AlphaFIX User s Manual Rev 02 CHAPTER 1 INTRODUCTION AlphaFIX is an interactive screen oriented debugging program for use under AMOS It lets you examine and run machine language programs If you use AlphaXED or AlphaVUE you will find the operation of AlphaFIX familiar AlphaFIX uses many of the same screen display concepts to give you a two level visual interaction with your program Throughout AlphaFIX care has been taken to present the debugging information in a format familiar to programmers Data structures such as DDBs and job control blocks may be displayed in symbolic form rather than simply as octal or hex memory dumps This manual assumes you are familiar with M68 assembly language programming and the AMOS runtime environment Related documents are the nstruction Set Manual the Assembly Language Programmer s Manual and the AMOS Monitor Calls manual USING ALPHAFIX Debugging ses
17. LER NOTES This section describes some of the features and characteristics of the AlphaFIX disassembler The disassembler disassembles all opcodes and AMOS supervisor calls If a symbol file SYM is present for the program being debugged AlphaFIX loads it and attempts to use symbolic values wherever possible AlphaFIX only uses labels equated symbols are ignored If a symbol is defined twice for instance in two different modules only the first definition is used If an instruction uses absolute addressing AlphaFIX checks for system variables as defined in SYS UNV For example MOV UPTIME D l AlphaFIX tries to disassemble the instruction to the best of its ability Most instructions for the latest processors are known to AlphaFIX If a disassembly line contains something such as 20 it means the opcode or the addressing mode will not execute on the current CPU CURSOR COMMANDS These commands move the cursor through the program being debugged It is not possible to modify the program while in Display mode Your terminal may have cursor keys If they generate the proper control characters you may use those keys AlphaFIX includes input character translation See Appendix A If the input translation table for your terminal is available you can use keys on your AlphaFIX User s Manual Rev 02 Chapter 2 Page 2 3 keyboard that are used for Alpha VUE For example the ESC key and the MENU key become equivalent Cu
18. ORA io Rh Re eta n uan 4 3 IOPE sete Ett abe dts e CERE OY wh D X IO apu Qc Eo dT RUNE Ferca n 4 3 APPENDIX A INPUT TRANSLATION DOCUMENT HISTORY INDEX AlphaFIX User s Manual Rev 02 Page 3 QUICK REFERENCE GUIDE Change to command mode Down Down page Exit subroutine Home to PC Initial page Proceed Proceed to here cursor Repaint screen Single step Toggle breakpoint Toggle subroutine mode Up Up to previous label Up to previous non local label Display Mode or or Jor T or NEXT SCREEN key E or R or PREV SCREEN key X G S P or or Shift F16 AK or T F or CHAR INS key CHAR DEL key Command Mode Clear breakpoint at location lt expr gt Declare DSECT base register Declare PSECT base register 32K Bias Display DDB at lt expr gt Display data from location lt expr gt Execute AMOS command lt string gt Exit AlphaFIX Move data Proceed until breakpoint Search for program symbol or location Set address register n to value lt expr gt Set address base mode Set breakpoint at location lt expr gt Set data register n to value lt expr gt Set option Octal Hex Split Nosplit Cmode Nocmode Setup command line lt string gt A2 Watch byte value Watch longword value Watch word value AlphaFIX User s Manual Rev 02 CLEAR lt expr gt DSECT An PSECT An DDB lt expr gt VIEW lt expr gt GO lt string gt QUIT MOVXx lt src gt lt dest gt PRO
19. ORT 0020 e eee eee ee 1 2 ALPHAFIX MODES voi canes waar news Bab bh Coen d RR Pe utet 1 3 CHAPTER 2 DISPLAY MODE DISASSEMBEER NOTES ue or See bee Sc ie m ES 2 2 CURSOR COMMANDS i eiiis eut o ERRARE ee ee cete 2 2 Cursor Down Control J or Down arrow 2 ee 2 3 Cursor Up Control K or Up arrow 0 000 ee 2 3 Page Down Control T or Next Screen 000 cee eens 2 3 Initial Page Control R or Prev Screen 0 000 eee eee 2 3 Home GOhlfOl 5 use eqs dee fal ok mean hae aoe 2 3 EXECUTION COMMANDS 202440226 Gs25 me eR RED Meee oA 2 3 Toggle Breakpoint Control P or F5 00 cece eee 2 3 Proceed to Breakpoint Control X 0 00 cece ee eens 2 4 single step RETURN 25 cack ee ae sews A E ee ti EL aaah 2 4 Proceed from Subroutine Control E 0 0000 eens 2 4 Proceed to Cursor Control G fincas ud Batis dra ee oe Wee ER RR CR S 2 5 Toggle Skip Subroutine Mode Control or Shift F16 2 5 Up to Previous Label Control F or Char Ins 05 2 5 Up to Previous Non local Label Control D or Char Del 2 5 Repaint Screen Control S nanan 0c seen 2 5 Change to Command Mode or ESC or MENU 2 6 SPLIT SCREEN DISPLAY MODE 5 5 x ecg eR et XU 2 6 CHAPTER 3 COMMAND MODE COMMAND EXPRESSIONS 2355 4 aUe ata t et a as peek 3 2 Bl nnbere ase os sho eA MR eme Eh ua ec DEAE coda tt 3 3 Address Base Relocation
20. are not allowed in this command THE COMMANDS The basic format of AlphaFIX commands is the command name followed by a parameter list Commands may be abbreviated to as short as desired provided the abbreviation is unique Note however that overlay commands must be fully specified Commands in AlphaFIX may be edited with most of the line edit commands available under AlphaXED or AlphaVUE The preceding command line can be recalled for editing or re execution by using the Control N command A summary of the commands available for editing are Function Keystroke s Go to end of command line N Go to start of command line U Move cursor left H or Move cursor right L or gt Insert blank character F or Ins Char Key Delete character D or Del Char Key Toggle insert mode Q or F16 Delete previous character RUBOUT AlphaFIX User s Manual Rev 02 Chapter 3 Page 3 5 An or Dn or SP Set Register n to Specified Value E The sixteen commands DO to D7 AO to A6 and SP let you modify the registers The register name is followed by the new value of the register The new value may be specified by any valid expression except a register For example gt DO 2356 QEN sets data register DO to 2356 in the current radix You should be careful when modifying SP Any data below SP is invalid since the first thing AlphaFIX does upon acquiring control from the user program is to save the processor status register and PC on the
21. can set up to six watches at once To clear a watch type the same command you used to set it PROCEED or X is the only function which enables watches Since watch processing traces every instruction loop times can be very slow For this reason if anyone else is using the computer you shouldn t use watches with a routine that JLOCKs the system You should never use watches with a routine which SVLOKs If you have subroutine mode set subroutines are executed full speed and the watches are checked after the return If a subroutine triggers a watch condition the subroutine call is highlighted Two control keys are available while you re running a program with watches Since these are debugging keys if you re using the alternate terminal feature they work only on the primary debugging terminal The two keys are AlphaFIX User s Manual Rev 02 Page 3 12 Command Mode B causes the program to break execution and puts you in display mode You can then examine memory or registers or X to continue eG causes the program to execute at full speed disabling all watches and B checking AlphaFIX User s Manual Rev 02 CHAPTER 4 AlphaFIX OVERLAY COMMANDS In addition to the commands described in the last chapter a number of additional commands are available in AlphaFIX Command Mode These commands are not permanently resident but are overlays If an overlay command is entered the overlay is fetched into memory from DSKO 7 0
22. default base of PRG all expressions are relocated relative to the base of the current program unless you specify otherwise within the expression For example if the base of the current program is 12000 and you specify the expression 1234 the relocated value of the expression would be 13234 12000 41234 If you wish to override this automatic base address calculation simply specify the base address you wish in the expression Base addresses are specified by enclosing them in parentheses since they function exactly the same as indexed addressing in the macro assembler For example if you want the expression to be taken as an absolute address you may override the default base address by specifying ABS in your expression For example to specify absolute location 1234 you would use the expression 1234 ABS Valid base addresses are AlphaFIX User s Manual Rev 02 Page 3 4 Command Mode A0 A6 relative to an address register SP relative to the stack pointer PRG relative to program base ABS absolute JCB relative to the user s job control block SCA relative to the system communication area Register Expressions Some commands such as MOV take registers DO D7 A0 A6 SP as argument expressions Most commands however do not accept registers as arguments since most commands operate on memory locations not registers If you try to specify a register expression where it is not allowed you see Registers
23. eady set this command is ignored AlphaFIX User s Manual Rev 02 Page 2 4 Display Mode If there is already a breakpoint at this location this command clears the breakpoint and redisplays the line in full intensity Proceed to Breakpoint Control X This command starts the user program at the current cursor location The program executes until a breakpoint or a dynamic breakpoint set by a WATCH command is encountered or until an EXIT supervisor call is encountered When a breakpoint is encountered the cursor is left at the breakpoint location in Display mode See the description of the WATCH command in Chapter 3 for what happens when a dynamic breakpoint is encountered and for additional options available when you use the WATCH commands Single step RETURN E 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 was a transfer instruction AlphaFIX single steps properly through any instruction including AMOS monitor calls As you single step the cursor walks through the program just as you would if you were walking through a listing 00000000 PRG MOV 1 D1 00000002 PRG LOOP DCVT 0 2 00000006 PRG CRLF 00000010 PRG ASL D1 00000012 PRG BNE LOOP 00000014 PRG EXIT This example is a sample AlphaFIX session The cursor appears to loop on the screen until the conditional branch fa
24. een defined in a DSECT Note impure area offsets defined by the OFDEF macro do not appear in the SYM file used by AlphaFIX AlphaFIX User s Manual Rev 02 Chapter 3 Page 3 7 For example AlphaFIX 2 1 156 Status Disassembly PRG 2002574EA hex Debugging TEST2 LIT with SYM PSECT 8000 A3 DSECT A5 C Mode gt DSECT Memory Display from v a5 60 Effective address 259DD0 mins A5 000 000 000000 00000400 0 0000062 A5 000 004 000400 04000001 YX 3 761582371E 37 maxs A5 001 000 000001 00010000 E A 0 00000066 A5 000 000 000000 00000000 et 0 emsgf A5 000 000 000000 00000001 0 0000006A A5 001 000 000001 00010000 A 0 vcount A5 000 000 000000 00000001 0 GO Execute AMOS Command This command fetches and executes another AMOS program t is used to debug drivers or AlphaBASIC 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 AlphaFIX and the user may debug the subroutine or driver For example AlphaFIX 1 0 111 Status Disassembly PRG 200021136 octal Debugging INPUT SBR GO RUN MENU EUR In the example shown above INPUT SBR an XCALL subroutine for AlphaBASIC applications is being debugged The AlphaBASIC program MENU RUN contains an XCALL INPUT If a breakpoint is set in INPUT SBR AlphaFIX gains co
25. ils It then falls through to the EXIT statement Not all code can be single stepped properly due to timing or other considerations For instance other users on your system could get annoyed if you single step through a JLOCK prohibiting them from running Proceed from Subroutine Control E This command sets a temporary breakpoint at the value on the top of the stack and proceeds to it proceed until PC SP In a normal subroutine this command executes the rest of the subroutine returning control to the user just after the original CALL instruction If the subroutine has modified the SP in any way for example PUSHx SUB n SP SAVE the longword on the top of the stack will not be the return address and this command will have undefined or unmentionable results AlphaFIX User s Manual Rev 02 Chapter 2 Page 2 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 Toggle Skip Subroutine Mode Control or Shift F16 This command turns Skip Subroutine Mode on and 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 fu
26. kpoint is set at the specified location it is cleared otherwise this command is ignored For example gt CLEAR CML2 tUm clears breakpoint if any set at CML2 When in command mode and not in the View submode AlphaFIX generates a CLEAR command for the top breakpoint in the breakpoint window when you press c amp amp Lst J The CLEAR command is executed after you press a This command may be edited by the available line editing commands DDB Display Contents of a DDB This command displays the contents of a DDB Dataset Driver Block in symbolic form The address of the DDB is specified by a standard argument gt DB INFILE A6 DDB display Filespec START CMD D ERR 0 D FLG 40 INITed D REC 0 D BUF 255E0A D CDT 18 Mar 86 14 37 52 D SIZ 200 D UDT 18 Mar 86 14 37 52 D IDX 0 D BDT 18 Mar 86 14 37 52 D OPN 0 not open D RSZ 0 DSECT Declare DSECT Base Register This command declares a DSECT base register to AlphaFIX If you are in the VIEW display mode addresses may be shown as offsets from this register User DSECT symbols may also be shown as offsets from the declared DSECT base There are however some prerequisites for AlphaFIX to generate nice displays eThe address register declared by the DSECT command must contain the start of an AMOS memory module or point 32768 10 bytes into a memory module eFor symbols to appear in the display they must have b
27. ll speed until the return instruction Skip Subroutine Mode assumes no data follows a CALL instruction the return address of a subroutine is the instruction following the subroutine If a subroutine modifies the return address this mode may crash AlphaFIX Up to Previous Label Control F or Char Ins This command positions the cursor to the largest PSECT label with a program relative address PRG less than the cursor Using this command presumes the symbol file SYM was found and loaded If the cursor positions to a line that appears to have no label then the label that was found has an odd value Up to Previous Non local Label Control D or Char Del This command positions the cursor to the largest PSECT label with a program relative address PRG less than the cursor that is not a local symbol This command is useful when returning from a subroutine to find the name of the calling routine Use of this command presumes the symbol file SYM was found and loaded If the cursor positions to a line that appears to have no label then the label that was found has an odd value Repaint Screen Control S This command causes the screen to redisplay This can be useful especially after TCRT calls AlphaFIX User s Manual Rev 02 Page 2 6 Change to Command Mode or ESC or MENU Display Mode This command switches AlphaFIX to command mode SPLIT SCREEN DISPLAY MODE If split screen display mode is set then AlphaFIX displays
28. ntrol when AlphaBASIC calls INPUT SBR allowing INPUT SBR to be debugged under AlphaFIX MOVXx Move Data of Type x The MOV MOVW and MOVB commands let you move data to memory and registers in longword word and byte formats respectively These MOVx commands can be used to move constants to memory or registers from memory to registers or from registers to memory All three commands accept data in the same format MOVx src dst where src and dst may be any valid source and destination expression respectively For example the following commands are all valid uses of the MOVx commands gt MOV 4123 D7 EU gt MOVB A2 D1 EU gt MOVW 1 100 A3 gt MOV HOFFE1 2000 ABS AlphaFIX User s Manual Rev 02 Page 3 8 Command Mode Indexed addressing by use of the Rn format is not supported by MOVx commands PROCEED Proceed to Breakpoint This command starts program execution at the current user PC location It is equivalent to entering Display Mode and pressing cm J the proceed to breakpoint command When a breakpoint is encountered you are left in Display Mode with the cursor at the new PC location PSECT Declare PSECT Base Register 32K bias This command declares a PSECT base register to AlphaFIX The PSECT base is assumed to be the start of the program memory module plus 32768 10 bytes This declaration information is used in display Disassembly mode When AlphaFIX disassembles a memory reference wi
29. or example AlphaFIX 2 1 156 Status Debugging USER LIT with SYM gt Registers DO 2 D4 1 A0 255C8E A4 258592 PC Cursor 00000008 PRG 00000008 PRG Disassembly PSECT Dls DS Al 24E13C 4 1FDF A5 258514 Status X N 0 0 Z 0 8000 A3 A6 FF V 0 0 DSECT 0 2 256808 FF8008 PRG 00255C8E TO T1 0 0 QA5 S 0 D3 D7 A3 SP hex C Mode 5A 8039 25DC8E 268740 M Int Mask 0 0 The first line of the screen displays the current AlphaFIX status Statuses displayed are Display Mode disassembly Base address and mode Radix Command edit insert mode Q Program being FlXed Symbols status if SYM file loaded PSECT declaration if any DSECT declaration if any C Mode status The name of the program being debugged is displayed on line 3 The prompt appears on line 5 The currrent user program registers are displayed on lines 9 through 12 any breakpoints are set they are displayed beginning on line 14 If You can leave Command Mode and return to Display Mode by pressing Or we To exit enter Q RETURN AlphaFIX User s Manual Rev 02 Page 3 2 Command Mode COMMAND EXPRESSIONS Many of the commands described in this chapter and the next take an argument typically an address X AlphaFIX lets you specify this argument in the form of an expression which is evaluated before the command is executed The range
30. ose used for AlphaVUE The translation tables for AlphaFIX are in DSKO 7 0 LIB and have the extension FIX Input translation tables for the standard supported tables are part of the standard release If an input translation table for AlphaFIX does not exist for your terminal type but does exist for Algha VUE you may create it Follow this procedure 1Log into DSKO 7 0 2 Type the command COPY FIX tttttt VUX where tttttt is the name of your terminal type 3Now type FIX FIX and do a MAP display Your terminal should then display something like this Memory Map FIX LIT 20366 24EADO 531 515 220 242 IMPURE FIX 14174 253A6A 472 301 074 276 tttttt FIX 686 2571D4 263 410 524 241 Free 79940 25B27E Note that a terminal translation table takes about 700 bytes If your debugging environment cannot afford this additional overhead rename the FIX file for your terminal type This prevents the translation table from being loaded AlphaFIX User s Manual Rev 02 AlphaFIX USER S MANUAL DOCUMENT HISTORY Revision A00 AMOS L Release 1 0 Printed 5 82 New Document part number DSS 10005 00 Revision 00 AMOS Release 2 0 Printed 3 88 New part number assigned DSO 00017 00 This document was revised and rewritten to reflect AMOS 2 0 Revision 01 AMOS Release 2 2 Printed 4 91 Re wrote the document in new format Removed a reference to FXO command and modified VIEW
31. pts a single argument which specifies the address at which to start displaying memory Since the VIEW command always starts the display on an even byte boundary if you specify an odd address AlphaFIX rounds the address down for you For example gt VIEW 10000 ABS Memory Display from 10000 ABS Effective address 10000 00010000 037 007 003437 00707647263 AEW 2 962212196E 35 00010002 163 116 047163 11634627410 sN LVC 254996610 78 00010004 010 057 027410 05702026170 GU 3 0962316106E 11 00010006 170 054 026170 05436002224 x GDX 8 8113654443E 13 Use these keystroke commands to move the VIEW display Keystroke s Function AK or T Scrolls data display up one word Jor l Scrolls data display down one word T or NEXT SCREEN key Pages data display up 16 words R or PREV SCREEN key Pages data display down 16 words or HOME key Redisplays at original VIEW PTR address S Register Breakpoint display mode The following example uses data register indexed addressing mode If A2 00200000 and DO 0000FFFF then the command gt VIEW 6 A2 D0 forces word extension of the contents of DO to longword size before it is added to A2 so the result is a display of address 00200005 abs which is A2 minus 1 plus the six DO is extended to HFFFF FFFF m Data register indexed addressing mode is only available in the VIEW command AlphaFIX User s Manual Rev 02 Chapter 3 Page 3 11 WATCH WATCHB WATCHW SET DYNAM
32. rsor Down Control J or Down arrow Pressing 4 or 6 amp J C3 moves the cursor down one instruction If the cursor was already at the bottom of the screen the screen is scrolled up one line and the next line is disassembled Cursor Up Control K or Up arrow Pressing T or 8 C moves the cursor up one instruction If the cursor was 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 Page Down Control T or Next Screen This command moves the cursor down one page the distance depends on the display size of your terminal Initial Page Control R or Prev Screen This command moves the cursor to the start of the program Home Control Pressing Hove or c amp moves the cursor to the current program counter This command is useful when you have executed part of a program then move the cursor to look at something and then wish to restart the program at the point you left off EXECUTION COMMANDS These commands test the execution of the program being debugged They perform single stepping annd breakpoint control Toggle Breakpoint Control P or F5 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 redisplays in reduced intensity Up to 16 breakpoints may be set at one time If 16 breakpoints are alr
33. ser s Manual Rev 02 Chapter One Page 1 3 ALPHAFIX MODES AlphaFIX operates in two basic modes called Display Mode and Command Mode You can switch between the two modes by pressing 5 Display mode shows you a disassembled listing of your program including symbols if a SYM file was located along with the address of each instruction When in Display mode you may set breakpoints proceed to or from a breakpoint execute a single instruction execute a subroutine and perform several other functions When in Command Mode AlphaFIX displays the current status of AlphaFIX and your program and lets you modify the debugging environment For instance you can set register values or delete memory modules Command mode is further subdivided into several submodes such as Register submode and View submode In the Register submode AlphaFIX displays the current contents of the processor registers as well as the status of the condition codes and any breakpoints you may have set In the View submode AlphaFIX displays a screenful of memory in byte word longword RAD50 ASCII and floating point formats You may step backward and forward through this display by using the NEXT SCREEN and PREV SCREEN keys or by using the control characters Control T Next Screen or Control R Previous Screen Other submodes exist for displaying data in DDB or terminal control block format When you leave Display Mode and enter Command Mode you always ret
34. sions with AlphaFIX follow a fairly consistent pattern for the simple reason that most all debugging follows a standard procedure Upon calling AlphaFIX you might set a breakpoint or preinitialize a register You can then start execution and trap on the breakpoint you set At that point you can single step through the code examining and or modifying registers or memory at any time CALLING ALPHAFIX You can call AlphaFIX from AMOS command level by entering FIX followed by the name of the file that contains the program to be debugged and any optional command line input the program may require You can specify any file extension but the default extension is LIT AlphaFIX attempts to locate the desired program file and if found FETCHes it AlphaFIX does not delete the module if it already exists before doing the FETCH AlphaFIX then attempts to locate a corresponding symbol table SYM file If found it is loaded in and you may reference locations by their symbolic names as well as by numeric value For example FIX USER TEST DAT tUm AlphaFIX Version X X xxx AlphaFIX User s Manual Rev 02 Page 1 2 Introduction E E where USER is the name of the program you are going to debug the extension LIT is assumed and TEST DAT is the name of an optional data file USER needs for input On the next line X X xxx indicates the version number of AlphaFIX AlphaFIX now enters Command Mode and you see a display something like this
35. stack In other words it is all right to increase the SP but not to decrease it The program counter can be modified by moving the cursor in Display Mode and either single stepping or proceeding The argument given to the register modification commands is not relocated by the current base address BREAK Set a Breakpoint at Specified Location This command sets a breakpoint It accepts any valid expression except a register expression A breakpoint is set at the specified location For example gt BREAK CML2 When in command mode and not in the View submode AlphaFIX generates a BREAK command for the cursor address when you press c amp J C J The BREAK command is executed after you press Ga This command may be edited by the available line editing commands Breakpoints are listed at the bottom of the screen Because of long symbols up to 32 characters only 6 breakpoints at a time may be displayed When the breakpoint display is visible there are five keystroke commands you can use to scroll or page the breakpoint window Keystroke s Function K or T Scroll display up one Jord Scroll display down one T or NEXT SCREEN key Page display up 6 R or PREV SCREEN key Page display down 6 or HOME key Position to top of list AlphaFIX User s Manual Rev 02 Page 3 6 Command Mode CLEAR Clear Breakpoint CLEAR accepts a single argument which specifies the address where the breakpoint is to be cleared If a brea
36. th a 16 bit offset that uses the declared PSECT base it takes the 32768 10 bias into account when searching for symbols For example where a PSECT A3 is used 00000012 PRG CALL typecr 8000 A3 QUIT Exit AlphaFIX This command is the normal method of leaving AlphaFIX All modules in memory are deleted and you are returned to AMOS REL Set Address Base Mode This command sets the current Base Mode The format is REL address mode The legal modes are AO relative to AO Al relative to A1 A2 relative to A2 A3 relative to A3 A4 relative to A4 A5 relative to A5 A6 relative to A6 SP relative to the stack pointer PRG relative to base of program ABS absolute mode JCB relative to users JCB SCA relative to AMOS System Communication Area AlphaFIX User s Manual Rev 02 Chapter 3 Page 3 9 For example to set the address base mode to A5 gt REL AS EUR SEARCH Search for Program Symbol or Location This command accepts an expression specifying the address to display at the top of the screen in Display Mode Typically this expression is a label used somewhere in your program although any valid expression except for registers may be given in a SEARCH command This command places AlphaFIX in Display Mode For example gt s LOOP This example searches for the symbol LOOP The colon is optional Any valid expression may be specified in a Search command For example gt s 332 4 SCA If no argument follo
37. urn to the Register submode AlphaFIX User s Manual Rev 02 CHAPTER 2 DISPLAY MODE In Display mode AlphaFIX displays memory as disassembled op codes The format is 00000000 PRG LABEL MOV QA4 VAR A5 t operand field t opcode field t symbol field t address base t address The first field is the address which is displayed in the current radix being used by AlphaFIX If the radix is octal this address contains eight digits if the radix is hexadecimal the address contains six digits The default radix is the numeric base used for display by your job and represents an offset from the current address base In the sample line above the address base is PRG the base of the program being debugged Legal address bases are AO A6 relative to an AM 100 L address register SP relative to the stack pointer PRG relative to program base ABS absolute JCB relative to the user s job control block SCA relative to the system communication area The next field is the symbol field If the address corresponds to a symbol only the first six characters of that symbol are displayed followed by a colon although internally up to 32 characters are significant If you have several long labels in your program that have the same first 13 characters they appear identical in the disassembly screen display but they are not duplicate labels AlphaFIX uses all the characters in a symbol
38. ws the Search command AlphaFIX returns to Display Mode at the last location examined SET Set Option This command lets you set several options The general format is set option where option can be OCTAL Set octal as default radix HEX Set hex as default radix CMODE Sets standard setting for C debugging Does the equivalent of DSECT A5 and PSECT A3 NOCMODE Removes the standard C debugging settings SPLIT Set split screen for display Disassembly mode NOSPLIT Turns off split screen for display Disassembly mode SPEC Set up Command Line Stores a line of text and leaves your A2 register indexing the stored line It is used to simulate the set up of command lines by AMOS on entry to a user program The use of this command is optional since the command line is usually included in the original command that called ALphaFIX For example gt SPEC DSK0 20 4 FIX LIT FXO REN This example sets up a command line for testing a wildcard program If no argument is specified SPEC lists the last line SPEC d For example AlphaFIX User s Manual Rev 02 Page 3 10 Command Mode gt SPEC REUN DSK0 20 4 FIX LIT FXO VIEW Display Memory Contents From Specified Address Lets you display a portion of memory on your terminal VIEW displays data in longword word byte RAD50 ASCII and floating point formats Simple one keystroke commands let you move the display forward and backward through memory VIEW acce

Download Pdf Manuals

image

Related Search

Related Contents

生体情報モニター(フィリップス)保守点検業務仕様書  IC Intracom Wireless 150N PCI Card  334450B, 859.0369, Verderair VA 50 Air  Memup 16GB Quickee II  LGW50621  la contravention verte  DOCA4962 Tafonius Junior User Guide v10Mar2011  AP11 User Manual - EN (Download here) 2015-9-28      

Copyright © All rights reserved.
Failed to retrieve file