Home

Advanced 8080 Debugger User`s Manual

image

Contents

1. 100 or as 100 If no memory location has yet been examined the value of is 0000 6 BLANKS ARE NOT ACCEPTABLE WITHIN EXPRESSIONS 2 2 DEBUGGER COMMAND LIST All of these commands will be command may be entered at any video display SYNTAX SA lt cr gt SBexpr lt cr gt c lt cr gt SE lt Daddr lt cr gt cr gt expr expr described in the next subsection A time that the gt prompt appears on the FUNCTION Set breakpoint mode to Static Set breakpoint at address expr Up to fifteen breakpoints may be set Set output mode to Character Delete the breakpoint at address expr Exit DEBUG return to PTDOS Allo Display the content of w modificat the location designated by expr the value at that location tion of Print the value of expr in Hexadecimal DEBUG expr Print the SFexprl expr2 bb lt cr gt SH lt cr gt SI lt cr gt SK lt cr gt SP n lt cr gt SRexpr lt cr gt Sexprl expr2 bb mm lt cr gt ST lt cr gt SV lt cr gt SWexprl expr2 lt cr gt SXr lt cr gt SZ lt cr gt value of expr in Decimal Fill memory from address exprl to address expr2 with byte bb Set output mode to Hexadecimal Set output mode to Instruction Delete all currently set breakpoints continue skipping this breakpoint until it again for the nth time
2. SOLOS CUTER will print load address and byte count on the same line as the command or whatever version you want to use 2 14 CDEBUG TEST is loaded but not executed DEBUG is loaded and executed RST 3 DEBUG asks user to assign restart location User enters 3 2 DETERMINE OUTPUT PORT V command gt SV lt cr gt Output will be sent to the internal VDM driver instead of to the current SOLOS CUTER pseudo port If the current pseudo port setting is the VDM it really does not matter which output driver you use 3 SET BREAKPOINTS with B command gt B0102 lt cr gt Because only the first byte of information appears to have been moved properly see description above it is worth checking whether the BMOVE loop is executed only once that is whether the zero flag is set and causes a return the second time the RZ instruction is reached By setting a breakpoint at 0102H we can examine the condition of the flags at the time of the RZ instruction More breakpoints could of course be set to simplify this example we set only one at a time 4 SET BREAKPOINT MODE with A or Z command gt SA lt cr gt Breakpoints will not be deleted automatically after they have been encountered once The distinction between the modes is relevant here because the breakpoint at 0102H will give useful informati
3. gt SI lt cr gt set output mode to Instruction gt 5002 MOV D B lt linefeed gt value displayed display next 5003 LXI SP lt linefeed gt location and next 5004 3E lt linefeed gt second and third bytes of multi byte 5005 F5 lt cr gt instruction are displayed in Hex gt return to command mode An UP ARROW C causes the content of the previous location to be examined If the current mode is Instruction mode the location will be assumed to be the first byte of an instruction whether or not this is actually the case and will be decoded into an 8080 instruction mnemonic Consider that whereas it is possible to determine from an operation code how many subsequent bytes are part of the instruction it is not always possible to tell whether or not PRECEDING bytes are operation codes gt SC lt cr gt set output mode to Character gt 2300 G value displayed as Character 2299 U lt cr gt value of previous location displayed gt return to command mode 2 12 CDEBUG Load user program or program to be examined and a version of DEBUG gt GET prog gt XEO DBG8 or another version Determine output port V command Set breakpoints B command Set breakpoint mode A or Z Execute user program R command Examine modify DA Set output mode registers amp flags X command H I or C command Examine memory expr
4. The in slowes ternal V being displayed striking a key representing one of t tput can be suspended reactiva Ou ted by any ot DM driver has a variab it is possible to alter the digits temporarily by the space bar and t display speed i her key SET OU This comm examined The c output unless TPUT MODE TO HE and determin expr comma ands to exam omm is an Hexadecimal other mode is in force XA DECIMAL tha 1 es nd ine i A is therefor le speed option while The defaul SH lt cr gt memory are in Group 3 unnecessary to specify th speed of the 0 is fastes t when the content of a memory locat will be displayed as a hexadecimal number The defa SET OU This c examined into the correspondin undefined opera DEBUG will assu the expr command is mode locati byte o as an reflect what is actually happening in th There Inst E specif DE TO IN TPUT MO termin comma and de expr omm tion c on specified in f a multiple byt assembly langua are two excepti les the first b linefe program wil Hexade ed key is used 1 display format cimal SET OU This command determines that expr ASC hexade EXI DE TO CH IPUT MO command any cimal number UCTI STR that
5. W F S commands Determine possible changes in breakpoints T K D commands Kill all remaining Proceed with execution breakpoints K command P command Exit DEBUG E command Save debugged version of program gt SAVE prog addl add2 add3 Correct source program gt XEQ EDIT Fig 2 1 Typical Procedure for Using DEBUG to Debug A Program 2 13 CDEBUG 2 4 A WALK THROUGH THE DEBUGGER The ex ample below illustrates the use of DEBUG to locate and correct the errors in an assembly language program The next few pages consis additi figure using t entirely of tutorial material they do not contain any onal information about the features of the debugger The on the facing page is a generalized diagram of the process of DEBUG to debug a program This figure and the command summary in subsection 2 2 are intended to serve as your quick reference als after you have read the detailed descriptions in the rest materi of the SAMPLE manual PROBLEM Below is the assembler listing of a routine just added to a large program called TEST The purpose of this routine is to move BC bytes of information from one area of memory to another When the routine is first called the H and L registers point to the first of BC consecutive locations occupied by the information to be moved the D and E
6. 1 1 GENERAL INFORMATI ON 1 DUCTION This program is an aid for debugging a machine language program developed and assembled on a Sol Terminal Computer or other 8080 computer system using CUTER software and CUTS format cassette tape With DEBUG you are permi a program you want to deb under the control of that CPU registers flags examined and modified TI or at ano At the conclu breakpoint modifications tted to set as many as fifteen breakpoints in ug or examine stop at each of these addresses so d specified memory locations may be is possible to resume execution at a cified memory location after you have made sion of debugging you can save the When that program is executed modified version of your program with the SOLOS CUTER SAVE command There are five versions of th DEBUG program on the cassette tape Bach version is designed for use on a system with a particular amount of memory DBG8 is for a system between OEO DBG16 is for a sy between 2EO DBG32 is for a sy tem tem DBG48 is for a sy between AEO DBG64 is for a sy n between EEO Lem tem The versions are identical locations Each version occ restarted at the address at the debugger will be used The DEBUG program contains it begins however all output is sent a command is provided pseudo port H an ory an H a
7. Default for Proceed from a breakpoint execution is met Ai ass La Begin execution of the program being debugged or examined at address expr Search memory from address exprl to address expr2 for byte bb using mask mm Display a list of current breakpoint addresses Change output driver vice versa SOUT to VDM or Dump contents of memory from address exprl to address expr2 Display the content of CPU register r Allow modification of that value Set breakpoint mode to Remove 2 3 CDEBUG 2 3 DESCR PL ON O This subsection describes all of examples of their the operation of a command is not eviden DEBUG program simply issues a carriage return anda provides short in which i e in which th prompt after discussion i F COMMANDS e the command is execu t is convenient to group the commands as follows GROUP 1 DEBUGGER These are commands not directly relat CONTROL the commands in use There ar the debugger and no examples in cases t on the display ted For the purpose of this ted to the process of debugging a program V and whether hexadecimal numbe Also included in of the debugger They det the contents of memory will b rmine wher rs H charact output will be sent from the debugger represented as or 8080 instructions ters C GL this group
8. for for for for the Accum register register register register CPU Flags register register B D E H L is in regis ulator the case of longer stop DEBUG tops to permit the A breakpoint can be ion and a breakpoint t there the value of each number following For ter B The symbols the content of the memory location to which H and L point for Program Counter for Stack Pointer DEBUG The flags that ZOUPBNn Thus were set were set at the time of the breakpoint are indicated by letter symbols following the letter F and an equals sign The symbols for the flags are for the Sign flag for the Zero flag for the Auxiliary Carry flag for the Parity flag for the Carry flag for no flag f ZAP means that Obviously the Zero symbol follows the equals sign The X comm time of th to examine and modify any of th e breakpoint and modify the con discussed in Subsection 2 3 e values existing in the registers or flags at There are also commands that make it possible tents of memory at any named location Auxiliary Carry the letter N will only appear if no other below may be used and Parity flags to the The 8080 microcomputer allows for eight possible RESTART locations numbered 0 24 32 40 instructio debugger whatever question order to access restart
9. nd or du g 8080 in odes are me tha the first the comm es ON FORMAT when the con W command ion mnemonic in Hexadecimal the mped struct output location I lt cr gt tent of a memory 1 it will be The tw output is display by tro 9 2028 s 2 ion is ult mode for this mode ocation is decoded elve n nstruction byte of an and is in e instr fact G will given by the exp instruction If the second still deco ression in the or third ction DEBU ge instr ons to th ruction mode will be displayed the W command is ent tered wh yte of a to examin the secon ARACTER value T TO SOLOS CUTER SE lt cr gt ction mnem e that as an e rule onic and the resu object code every byte displ 8080 instruction ile Instruc multiple by e the next location s d and third C lt cr gt when the conten that corresponds character will be displayed as that ASC does not correspond to a printable ASC tion mode is set charac te instruction an the de the byt lt will not ayed in mnemonic or if expr d the DEBUG bytes of instruc ts of memory a to the code fo character ter will be tions in re examined r a printable Any value that printed as a This command
10. and continuing past 65535 to O xprl is reached type MODE SELECT or CTRL To terminate a gt W100 110 lt cr gt 0100 01 07 00 21 50 00 11 65 00 78 B1 C8 OB 7E ee A a EY 010E 12 24 14 Er FILL MEMORY WITH A GIVEN BYTE SFexprl expr2 bb lt cr gt This command fills memory from exprl to expr2 with byte bb If exprl and expr2 are quite far apart in memory a few moments may pass before the prompt gt reappears on the screen SEARCH MEMORY FOR A GIVEN BYTE Sexprl expr2 bb mm lt cr gt This command searches memory from that specified by expr2 for byte bb As each byte is examined equality to byte bb address and If the q specified it will all bits will be compared EXAMPLE gt S2340 2375 4C lt cr gt 2357 4C 52 61 5263 5264 5265 5266 C2 52 3E OF 90 gt 955261 5269 0 lt er gt the using mm as location speci fied by exprl to ask a m it is ANDed with mask mm and then checked for search for 4CH 4C is found at search for even uantities are equal the byte at the address are printed be assumed to have the value OFF Hexadecimal even numbers found at five then the memory If the mask is not LU using default mask location 2357 numbers locations DEBUG d EVALUATE EXPRESSION OR EXAMINE MEMORY expr expr expr If an expression is entered and followed immediately by an equals sign _ the e
11. group when F is specified in the X command ZQUV PNU the part carriage modify one of the for the Sign flag for the Zero flag for the Auxiliary Carry flag for the Parity flag for the Carry flag for no flag icular flag MODIFYING A REGISTER OR FLAG In order to modify a register or flag enter the X command following the letter X with the symbol that designates the register To flags type XF lt cr gt NOT the symbol that stands for If the letter X is followed simply by a return the values of all registers and flags will be displayed again When the X command is entered the value of the named register will be displayed EXAMPLE gt SXB command to display register B B 52 hexadecimal value of register B If you do not want to modify the register after all type a carriage return to re enter command mode If you DO want to modify the register enter a new value at the cursor position without inserting additional punctuation replace the val or spaces The value that you enter will ue currently in the register Follow the entry with a space or a carriage return a space dictates that the next register b displayed on the current line while a carriage return effects a return to command mode To modify the value of a flag enter the symbols of all flags that are t
12. proceed with execution and do not stop again for this breakpoint it is encountered for the n 1 cause other breakpoints will that wil all is 1 that If a number is given after SP n lt cr gt beginning at and will proceed until the next uses program execution to resume after a breakpoint the All registers will be loaded with v th tions that have been made tained when the breakpoint was encountered the breakpoint j ust be th time letter P is BEG N EXECUT ON This command will s tar normally execu has not been deleted or removed will SRexpr lt cr gt specified by expression expr program at its star a breakpoint restored registers and flags GROUP 3 D because ting address be tain the value the command is For example t implemented to be bypassed fou implemented normally tion will proceed a register that it taken t E The defaul and any breakpo emented normal imp restores th t execution of a program at the location The R command is used to execute a it should not be used to proceed from the values of registers and flags will not be The P command by contrast values of X displays CPU registers and flags W dumps a series of memory locations F fills a series of locations with a given value S searches a series of locations for a given
13. 8 gt SK lt cr gt 11 EXIT DEBUG with the E gt SE lt cr gt using K command command This is the command to re can use the SAVE command sourc code fil and El th execution or exiting to PTI D DOS to save In order to have used we may as well type out turn to SOLOS CUTER Once in SOLOS CUTER we to save the object file IT to alter the CDEBUG
14. DEBUG Advanced 8080 Debugger User s Manual Describes DEBUG 1 1 Processor Technology Corporation 7100 Johnson Industrial Drive Pleasanton CA 94566 Telephone 415 829 2600 Copyright C 1978 by Processor Technology Corporation First Printing August 1978 Manual Part No 727131 All rights reserved IMPORTANT NOTICE This manual and the program it describes are copyrighted by Processor Technology Corporation All rights are reserved All Processor Technology software packages are distributed through authorized dealers solely for sale to individual retail customers Wholesaling of these packages is not permitted under the agreement between Processor Technology and its dealers No license to copy or duplicate is granted with distribution or subsequent sale SECTI TABLE OF CONTENTS ON PAGE ENTRODUETILON a A Stoica a is Ds De ia 1 1 el GENERAL ENPORMATIO N iii 22 222 anna a TA 2 LOADING AND INITIALIZATION OF THE DEBUGGER E 3 BREAKPOINTS AND RESTARTS ur oc een tra asas ee 1 2 COMMANDS de ds Eh en is eis See eee Be Saale be 2 1 Aa ZCONVENELONS a a a its pd 2 1 Aado DEBUGGER COMMAND CIST 22 0 ele sd ds Wisi ane a sde a 2 2 223 DESCRIPTION OE COMMANDS AA AEE AEA a a 2 4 2 044 AV WALK THROUGH THE DEBUGGER sane itet ei ee a a a 2 14
15. We have found the bug in BMOVE and want to continue running TEST rather tha the X comm execution n reinitiate execution of that calling program We can use and to modify several registers and so backtrack in our of the program to a point before BMOVE first put an incorrect byte in an incorrect location Remember w are still at a breakpoint The X command without a register specification will cause the contents of all registers and flags to be displayed gt SX lt cr gt A 2E B 00 C 85 D 02 E 65 F P H 02 L 50 P9 B6 S 625C P 0108 The bug in incorrect we want to registers BMOVE caused all bytes but the first to be moved to locations in memory To backtrack to the point from which reinitiate execution we must alter the following C so that BC indicates that the last 6 of the 7 bytes that compose the English word FIDDLE must still be moved gt SXC C 05 06 D and E so that they point to the next location to which information should be moved gt SXD D 02 00 gt SXE E 65 66 and 2 18 CDEBUG 10 K H and L so that they point to the next location from which information should be taken gt SXH H 02 00 gt SXL L 50 51 ILL ALL BREAKPOINTS Befor ither proceeding wit the file we kill all current breakpoints almost all possible commands in this example the breakpoints first with the T command gt ST lt cr gt 0102 010
16. and whether there are any that can be deleted EXAMPLE gt ST lt cr gt command to type out current breakpoints 4075 addresses at which breakpoints have been 4089 set with the B command 4102 KILL ALL CURRENT BREAKPOINTS SK lt cr gt This command deletes all of the breakpoints that have been set Once a program has been debugged it can be executed normally from within the debugger if all breakpoints have been removed If the altered version of a program is going to be saved following a return to PTDOS it is necessary to delete all breakpoints before entering the E command SET BREAKPOINT MODE TO STATIC SA lt cr gt This command determines that breakpoints will NOT be deleted after they are encountered that is that execution will stop again every time a breakpoint address is reached Static mode is set when th debugger is entered SET BREAKPOINT MODE TO REMOVE SZ lt cr gt This command determines that breakpoints WILL be deleted after they are encountered Execution will stop only the FIRST time that the breakpoint address is reached 2 6 CDEBUG PROCEED FROM A BREAKPOI Th is command ca been encountered and relat has been completed NT Exec ins that refl whose val con truction that breakpoint is encountered lect the modificat lue has not been modified will ret
17. cr gt 0050 46 49 50 44 4C 45 53 FIPDLES The dump shows that the third character is incorrect To insert the correct character at address 52 we can enter gt SC lt cr gt to set the output mode to Character and then gt 52 to display the contents of location 52 The contents of the location will be displayed right after the slash To enter the correct character we type a double quote the character and a carriage return Now the line looks like this gt 52 P D lt cr gt Of course the fact that there was a P instead of a D at location 52 does not account for the fact that the program does not run properly 6 DETERMINE POSSIBLE CHANGES IN BREAKPOINTS with T K D B In this instance we have no real reason to type out or delete our one breakpoint but we might want to add a breakpoint at address 0108H By looking at the registers at that point we can s whether th locations addressed by HL and DE are what we would expect them to be i e whether the value of each of these register pairs has been incremented by 1 gt B0108 lt cr gt 7 PROCEED FROM BREAKPOINT with P command gt P lt cr gt Execution will continue until the next breakpoint is encountered 0108 A 46 B 00 C 06 D 01 E 65 F N H 01 L 50 M 2E S 625C P 0108 From this display of the values of registers and flags 1t becomes clear that the regi
18. ction in place of a single will be placed in successive memory locations ts of those locations will be overwritten ts of memory will seldom be in Instruction format type the mnemonic for rather ct Ei ay p ou tha NS sh a carriage return to command mode than the corresponding machine code The ion mnemonics have been implemented See the on Codes Most of the standard symbolic be used in the operand field the two should be used to denote the Program Status ld be used to denote the Stack Pointer SP tered immediately after the colon Use a the operation code and a comma Terminate the input with a carriage return any of these delimiters will first delimit the the function ascribed to it elsewhere in this return will delimit the input and than cause a gt H lt cr gt set output mode to Hexadecimal gt 2113 1C INR E NR C lt cr gt value displayed in Hex then as gt Instruction Instruction input and return to command mode A LINEFEED causes the contents of the next location to be displayed If the current output mode is location Instruction mode and the last DEBUG examined was interpreted as the first byte of a multiple byte instruction the next one or two locations if examined by means of the linefeed will be displayed in Hexadecimal
19. ded the program you the program is recorded o SOLOS CUTER command examine is already in Do not use the program until you can do he cassette from osition the tape as and use the SOLOS CUTER XEQ command to load and execute number between 0 and 7 location will Subsectio When from 1 3 BREAKP n OINTS AN A BREAKPOI NT DEBUG begins to run it will display the ques RST probably the video display inclusive be used by the debugger to implement will determine tion Your response a which 8080 restart breakpoints 3 discusses breakpoints and restarts the gt prompt appears the keyboard the debugger is ready D RESTARTS to accept a command is a location at which the operation of a program stops to permit some kind of ex the user program user set at any address has been implemented or even to determine that execution will or the program being examined to examine and modify registers and memory when ternal intervention in S the debugger is in operat it is possible to proceed from that breakpoin no When a breakpoint is encountered by the debugger register i S immediately displayed as a hexadecimal the letter symbol for the register and an equals sign B 3E means that the number 3E example for the registers are SrFaoAACQW py un U for for for for for
20. e of 8080 Operation Mnemonics in the ASSM subsystem manual indicates that INX H which should be one of our instructions corresponds to the Hexadecimal value of 23 To search a section of memory above our most recent breakpoint we can enter gt S100 108 23 lt cr gt only to find that the BMOVE routine does not contain an INX H instruction at all Using the expr command to EXAMINE MEMORY we can look at the code in the same area that we Just searched for INX First we shall change the output mode to Instruction so that we will see the contents of memory as a series of assembly language instructions rather than as Hexadecimal numbers 2 17 CDEBUG gt SI lt cr gt gt 0100 MOV A B lt linefeed gt you enter the linefeeds 0101 ORA C lt linefeed gt 0102 RZ lt linefeed gt etc 0106 INR H lt linefeed gt 0107 INR D lt cr gt Now the cause of our troubles is clear instead of adding 1 to each of the register p registers change the airs HL and DE we have added 1 to each of the single H and L By examining locations 0106 and 0107 again we can two INR instructions to IT4X instructions and solve our The colon indicates instruction input INR H INX H lt linefeed gt problem gt 0106 0107 9 EXAMINE INR D INX D lt cr gt AND MODIFY REGISTERS AND FLAGS with X command
21. eight of the resi then the answer through 7 and corresponding to memory addresses 0 is quite common tine an origin at one of the resi r 48 much used subrou because a call ra a subro restart n allow by the user TO and 56 Decimal It such a location requires only ther than th utine for dealing with breakpoin location is specified in answer to The program provides for a choice of resi the other restart addresses to remain available for the program being debugged may use addresses as origins for some of its subroutines tart locations are available for use by the debugger to RST can be any number between O and 7 tart thr byte CALL ins For example truction 8 16 to give a locations the one byte RST In the ts has its origin at the RST tart locations in Hs ee CDEBUG DEBUG SECTION 2 COMMANDS 2 1 CONVENTIONS On the next page is a list of the commands accepted by the DEBUG program In this list and for the remainder of the manual the following conventions are used The symbol lt cr gt denotes the RETURN key Upper Case letters are literal the Bexpr lt cr gt command actually contains the upper Case letter B Note that it also ends with a carriage return Lower case letters are not literal the Bexpr lt cr gt command contains a four character hexadecimal address or an expression t
22. everal different entries are possible A CARRIAGE RETURN effects a return to command mode A SINGLE QUOTE MARK causes the value of the location to be displayed in Character mode without changing the current mode setting for the debugger gt SH lt cr gt set output mode to Hexadecimal gt 5002 50 P lt cr gt value displayed in Hex then as gt Character return to command mode A SEMI COLON causes the byte to be displayed in Instruction format the location is assumed to be the first byte of an 8080 instruction The current mode setting for the debugger is not altered gt SH lt cr gt set output mode to Hexadecimal gt 1234 39 DAD SP lt cr gt value displayed in Hex then as gt Instruction return to command mode 2 10 CDEBUG An EQUALS SI be displayed in Hexadecimal debugger for the gt SI lt cr gt gt 025F XCHG EB lt cr gt gt A DOUBLE Q or up arrow gt SC lt cr gt gt 47 D8 GN UOTE MARK character as a replacement for the c Replacement inpu each of ascribed to it elsewhere in th replacement If an attempt is double quo not accept either ch input te mark gt B lt cr gt gt In this example caus ee es the contents of the present memory location to without changing the current mode setting set output mode to Instruction
23. hat evaluates to a four character hexadecimal address The rules governing expressions are given below If a number occupying more than four hexadecimal places is entered as an address only the rightmost four characters are significant Similarly if an expression evaluates to a number occupying more than four hexadecimal places only the rightmost four places are significant Brackets indicate that a parameter is optional The command SP n lt cr gt contains an optional parameter represented by the letter n Other punctuation is literal except that the dollar sign signifies the ESCape key rather than the shift 4 The ESCape key is actually echoed on the screen as a dollar sign EXPRESSIONS The letters expr denote an expression that points to an address in memory i e an expression that evaluates to a number between 0 and 65535 inclusive The characteristics of an expression are as follows 1 An expression may involve any of the operators add subtract multiply and divide Expressions are evaluated from left to right with no operator precedence Parentheses are not allowed 2 An operand is assumed to be a hexadecimal number unless it is preceded by an exclamation point in which case it is assumed to be a decimal number 100 is 100 Hexadecimal or 256 Decimal 1100 is 106 Decimal or 64 Hexadecimal 2 1 CDEBUG 3 The resu
24. is E the command that terminates execution GROUP 2 CONTROLL NG EXECUT These commands se rest N GROUP 3 EXAM e rtia Veg countered E se Subsection 2 4 followed while de GROUP 1 V sets tart the program being NG AN se commands are relat ular memory locations These commands are although it below ugging a program and del ON OF lete breakpoints debugged THE USER PROGRAM B D T K start and R P FY NG D D MEMORY MO ting any breakpoints illustrat b ted to the examination and modification of expr W F S generally used after a breakpoin is possible CPU registers and flags t has been thout to examine memory wit tes a typical sequence of steps he o H sets tput mode to Sets tput mode to E O O O u u u G E sets exits tput mode to the program CHANGE OUTPUT DRI program is first Normally DEBUG can send output either current SOLOS CUTER pseudo port driver from the curreni VER SV lt cr gt utput port Hexadecimal Instruction Character CO t pseudo port to V the internal VDM driver or to the the V command changes the output DM or vice versa When the executed ou tpu this is also the video display is sent to the current pseudo port DEBUG
25. lt of division is truncated is 4 LE correspondin circular n valu in coun Multiplication and division operate on two 16 bit unsigned numbers lost 3 There is n may be the system A t to its integer part and the remainder D 7 evaluates to 0008 o check for overflow or for division by zero umber 65535 ter clockwise of clockwise valu to increment becomes clear tha 65534 5 will be 3 arrangemen expressions zero nor greater than 5 A period memory location examined Hexadecimal from the to advantage that actual Division by zero will al in an expression represents Thus location examined could b with ockw useful to imagine the acceptable range of numerical values g exactly to the range of addressable memory Welock es increasing in a cl on a O at the twelve o clock position and ise direction Thus the largest number is nex twelve a Val O ue to the smallest 0 Just clock If we follow the rule Move counter clockwise to decrement a Although it is possib it is probably less conf ly evaluate to a n 655394 last lways give the res in this system 3 5 will be 65534 and le to utilize this using to use umber neither less than ult 65535 Decimal the address of the last location offset by 100 represented as a memory
26. n emory an H an d ory and occupies memory d d S S between 6E00H an S S emory an H an 8K of memory and occupies memory occupies memory occupies memory occupies memory they run at different memory 2 K of memory and may be loaded Hereafter DEBUG or to design te any version of the program DM output driver When execution the current SOLOS CUTER V command described in Subsection 2 3 to direct output to the internal V current pseudo port DM driver instead of to the 1 2 LOADING AND INITIAL 1 Connect a cassett DEBUGGER recorder to the computer Your Sol manual has instructions for setting up a recorder CDEBUG 2 Insert want to debug t before the MODE Omit this si position i Use mode memory 3 XEQ so under control of 4 When you have loaded your own program the recorder and insert the in step 1 DEBUG When on the output device the casse Use SELECT te tape on which you hav the SOLOS CUTER CAtalog command to rewind the tape and the part of the tape on which or CTRL and keys to return tep if reco the program you want to Use the GET command to load your program into memory because you do not want to DEBUG xecut remove t tape P DEBUG program r
27. o be set whether or not they are set already gt SXF lt cr gt F SZC SZP lt cr gt gt examine flags Sign Zero and Carry flags already set user sets Parity alters carry so no longer set back in command mode 2 8 CDEBUG DUMP MEMORY This command causes the conten displayed in the current output mode see Group 1 Instruction format on each line first all bytes are displayed in Hexadecimal are displayed as characters th In in in tion tion tion struc truc truc format per lin S S Memory will be dumped s con expr2 the valu memory were circular S SWexprl expr2 lt cr gt e byte does not correspond to a printable ASC memory will be dumped with fourteen bytes represent and then all A period will be printed if the value of ts of a specified section of memory to be If the mode is not character In memory will be dumped in decoded format e and the second and third bytes of multiple byte s represented in Hexadecimal Ear tinuing to that specified by expr2 e exprl will be used ting at the If no val with one location specified by exprl and lue is specified for the dump wil tar ting at exprl finally stoppin dump before it g when the byt reaches expr2 befor ll continue as though
28. on only the second time it is encountered It is actually unnecessary to use the A command unless the Z command has been used previously Static breakpoint mode is set when the DEBUG program begins to run 5 EXECUTE USER PROGRAM or program to be examined with R command gt R1200 lt cr gt The address specified in this command is the starting address of the program called TEST Execution will proceed until it reaches the breakpoint address then that address and the contents of all registers and flags will be displayed 0102 A 07 B 00 C 07 D 00 E 65 F N H 00 L 50 M 46 5 625C P 0102 Assuming that we intended to move 7 bytes of information beginning at address 50 to consecutive addresses beginning at 65 all is well so far The STAX operation will put the value 46 or ASC F in location 0065H M represents the value of the location addressed by H and L 2 15 CDEBUG SET OUTPUT MODE With H I or C commands EXAMINE MEMORY with expr W F or S command For good measure we can EXAMINE MEMORY to make sure that the characters F I D D L E and S are actually stored at consecutive locations beginning at 50 The W command can be used to display the locations output mode does not need to be set to Character becaus in the default Hexadecimal mode the dump will appear both in Hexadecimal and in Characters ra gt W50 56 lt
29. registers point to the first of BC consecutive locations to be occupied by the same information when control returns to the calling routin e The calling routine prints out the BC bytes beginning at the location to which the first byte was moved 00 78 BMOVE MOV A B 01 Bl ORA 02 C8 RZ 03 OB DCX B 04 TE MOV A M 05 12 STAX D 06 24 INR H 07 14 INR D 08 C3 00 01 JMP BMOVE ooooO0o00o00O0 OO O Let us assume that we have run TEST in SOLOS CUTER and that where we would expect 7 bytes the characters F 1 D D L E and S to be printed out as the ASC string FIDDLES we see a good first character F followed by a great deal of suspicious screen activity Write and execute a program that calls BMOVE and then prints out about time o 100 bytes fF the call beginning at the location indexed by D and E at the Let us also assume that we do not immediately recognize the bugs in the program and that we decide to use the debugger to take execut ion a closer look at the BMOVE routine during its Remember that the symbol gt is the prompt character and should not be Also signifies the ESCape key not the dollar sign typed 1 LOAD TEST and gt CA lt cr gt gt GET TEST lt cr gt gt CA lt cr gt gt XEQ DBG8 lt cr gt DEBUG from SOLOS CUTER
30. ster pairs that address memory locations have 2 16 CDEBUG actually been incremented not by 1 but by 100H 256 Decimal In order to verity that data is actually being stored at every hundredth or 256th address we can proceed with execution until the next time 0108H is reached Then we can use other commands to examine memory locations in the areas from which and to which we want to move our data To proceed with execution w nter the command gt SP lt cr gt We will not delete the breakpoint at 0102 because we might want to look at it again the next time that breakpoint is encountered however we can ignore it and Proceed with execution when we reach 0108 the values of registers and flags are 0108 A 2E B 00 C 05 D 02 E 65 F N H 02 L 50 M 06 S 625C P 0108 8 EXAMINE MEMORY with the expr command If w nter the command to examine locations 150 and 165 we can indeed see that the second byte to be moved was taken from location 150 and moved to 165 instead of being taken from location 51 and moved to 66 gt 150 lt cr gt gt 165 lt cr gt If we look at location 66 we find whatever value was at that location when the debugger began its operation gt 66 lt cr gt If our sample routine were not so short we might want to use the MEMORY SEARCH S command to locate the part of the program containing the INX instructions The tabl
31. terminates execution of the debugger and returns to SOLOS be sav comman GROUP CUTER ed from memory d is entered a sets a br B T A R eakpoint displays all breakpoin and Z set breakpoint and P begin and res At this point the altered program may be saved from memory or its source may be altered in E DET f the If the program is going to all current breakpoints must be removed before the E D deletes a breakpoint ts K deletes all breakpoints t mode tart program execution 2 5 CDEBUG SET BREAKPOINT SBexpr lt cr gt This command sets a breakpoint at the location specified by the expression expr A breakpoint causes program execution to stop immediately BEFORE the execution of the instruction at the specified address for this reason it is not permissible to set a breakpoint on the second or third byte of a multiple byte instruction There may be as many as fifteen breakpoints set at any given time DELETE BREAKPOINT SDexpr lt cr gt This command deletes the breakpoint currently set at the location specified by the expression expr If there is no breakpoint at the specified address a question mark will be printed DISPLAY ALL CURRENT BREAKPOINTS ST lt cr gt This command causes the addresses of all current breakpoints to be displayed thus it becomes evident how many breakpoints have been set
32. value expr displays expr displays expr displays ISPLAY CPU REGISTERS AND FLAGS SXr lt cr gt the contents of location expr the value of expr in the value of expr in Hexadecimal Decimal has ted examination or modification of the code ution will continue Caused the breax alues or flag o mean until the command P5 lt cr gt times t forn int Iy This command is used to examine and modify the values of CPU registers and flags after a breakpoint has been encountered command format represents a symbol for the register that examined or modified If no value is specified for r ALL registers and flags are displayed required if a value is specified for r SYMBOLS DES GNATING REG Here is STERS AND FLAGS a list of the symbols for registers and memory The carriage re Any of symbols may be used as the r element in the X command The r in the is to be the values of turn is NOT these DEBUG A for the Accumulator zema for register B for register C for register D for register E for CPU Flags for register H for register L for the content of the memory location to which H and for Program Co L point unter for Stack Pointer P S These ar value of the symbols for the flags The X command will not display the an individual flag rather the flags are displayed as a
33. value displayed as Instruction in Hex return to command mode then followed by a character specifies that urrent value of the location mus th and made DEB U ara B lt cr gt the p the rul displayed S A COLON indica possible to en and the previo Such a disturbance of desirable To enter a replacemen the instruct standard In tion tel instru appendix of 880 Opera names for registers m exceptions are word linefeed list PSW The instruction must be en single blank to separate operands from to separate two operands or up arrow input and then perform e g a A nd ter byte instruction th a in us con at mul put ten Les then cau to enter the previous conten ina imi be term ese del ted by a carriage return linefeed ters will also perform the function is list e g a linefeed will delimit se the next location to be displayed more than one character following a respond with a question mark and will tered G will cter en set output mode to Character value displayed as Character replaced with letter B new value displayed return to command mode location above eriod is used to designate the last s for expressions in subsection 2 1 subsequent input is an instruction is tiple byte instru
34. xpression is evaluated and the result is displayed as a Hexadecimal number gt 5 6 001E result displayed in Hexadecimal If an expression is entered and followed immediately by a pound sign the expression is evaluated and the result is displayed as a Decimal number gt 5 6100030 result displayed in Decimal If an expression is entered and followed by a slash the expression is evaluated and the content of the memory location denoted by the expression is displayed in the current output mode see Group 1 gt SH lt cr gt output mode set at Hexadecimal gt 134 2 40 value of location 17 Decimal is displayed in Hexadecimal output mode Note that none of these commands requires a carriage return In the rules for expressions see Subsection 2 1 an expression was defined as POINTING to an address in memory Actually in the case of an expression followed by an equals sign or a pound sign the expression need not denote a location that is to be examined any arithmetic problem whose result will lie between 0 and 65535 inclusive can b ntered even if the computer being used does not have any memory at the designated location If the expr command is entered and there is no memory at the specified location the result will be FF in Hexadecimal mode RST 07 in Instruction mode Once expr has been entered and the location has been displayed s

Download Pdf Manuals

image

Related Search

Related Contents

Installation and Operating Instructions for Davey HP  PDF (BOE-A-2014-6119 - 5 págs.  Télécharger le rapport (format / 230 ko)  The FIP Bus  Sony CDX-GT111 User's Manual  Radio Shack 63-1411 User's Manual  riempi big bag  Valueline VLAB22255B02    enTourage eDGe  

Copyright © All rights reserved.
Failed to retrieve file