Home

User Guide

image

Contents

1. CPU INITIAL STATE INTERRUPT MODE INTERRUPT VECTOR INTERRUPT FLIP FLOP STACK POINTER 20 VALUE EO D3 CF VALUE CF EO CF EO VALUE 2 13 ENABLED 1100 INDEX B BACKSPACE 5 baud rate 7 binary operations 5 bootstrap 1 7 BREAK 9 ll breakpoint 9 10 15 BRKFLG 18 BRKRTN 18 buffer 5 C character delete 5 CHRDEL 17 command codes 19 command scanner command string l COMPARE ll completion code 3 4 completion return address 3 CONTROL H 5 CRC error 4 CTC 18 20 Cyclic Redundancy Checking 4 D data length 3 data transfer address 3 Debug 15 Debug commands 10 Debug environment 7 debugger 10 defaults 7 Delete Current Line 6 Delete Last Character 6 disk address 3 DISPLAY 11 Index 1 E echoing 5 entry point FLOPPY 3 entry point TTY 5 environment 15 error 6 error codes 19 error return address 3 external routine 15 EXTRET 18 F FILE ERROR 11 FILL 11 G GEt 10 11 GO 10 11 14 I I O devices 18 I O error 11 initialization 1 INTERRUPT 11 interrupt routine 4 6 interrupt status 9 interrupt system 9 I register 10 J JUMP 10 11 14 L LFCNT 5 17 LINDEL 17 line delete 5 line edit 6 Index 2 MCB MT board 7 9 memory 1 6 MOVE 13 Multiple character deletes 17 N NEXT 9 13 NULLCT 5 17 P parameter vector 3 PIO 1 18 20 port addresses 1
2. If the address is zero the return is normal Bit 7 of the completion code is set when the operation completes normally Bit 6 is set to indicate that an error occurred The only error condition returned is Invalid Operation C1H This action occurs for request codes greater arithmetically than those honored by TTY Request codes lower than those honored by TTY return complete with no error but also with no effect 3 2 Line Edit Commands The two line edit commands interpreted by the TTY driver Delete Last Character and Delete Current Line can be changed from the Debug environment as follows 1 To change the Delete Last Character command Set memory location 13CCH to the ASCII code for the character desired For example to make the the character delete set the location to 40H 2 To change the Delete Current Line command Set memory location 13CBH to the ASCII code for the character desired For example to make the line delete set the location to 21H These characters are also changed to defaults when the RIO operating system is bootstrapped or when the RIO SET command is issued This means that when the Debug environment is entered from the RIO operating system the characters may not function in the same way 3 3 Terminal Requirements The 280 MCB MT board in any Zilog system interfaces to any terminal using a standard 8 bit ASCII asynchronous transmission mode with or without parity on RS 232 or 20 mA curr
3. feed count permits automatic multiple spacing i Prompt Character 13CAH The character output by the GET and TTY routines before reading a line from the terminal is stored in this location Modifying the prompt character permits various levels of interactive software to identify themselves in each command query Prompting can be effectively eliminated by setting this location to a null character ASCII 0 Line Delete 13CBH The character interpreted by the GET and TTY routines as a line delete is stored in this location When a line delete is encountered in the ASCIT input stream from the terminal GET and TTY purge their buffers and continue reading the input stream Character Delete 13CCH The character interpreted by the GET and TTY routines as a character delete is stored in this location When charaeter delete is encountered in the ASCII input stream the last character entered is purged from the input buffer Multiple character deletes delete multiple characters 2172 Parameters Description BRKFLG Breakpoint Flag 13CDH Bit 5 of this location determines the return address for the QUIT command Bit 7 is used to Signal the existence of an external breakpoint see Section 4 3 BRKRTN Breakpoint Return 13CEH 13CFH These locations are used with BRKFLG to make use of an external breakpoint handler see Section 4 3 EXTRET External Return 13BEH 13BFH These locations are used with BRKFLG when calli
4. or GO command is executed the user stack is utilized This implies that the stack must be set up in writable memory Also if the JUMP or GO address has a system breakpoint set the execution of the instruction immediately following the GO or JUMP will not cause suspension of execution Subsequent executions of the breakpoint locations Suspends execution This permits breaking and continuing execution without resetting the breakpoint as for example inside a loop When debugging system programs verify that the I register is set to 13H and that interrupts are enabled Before starting debugging set the stack pointer to where the debugger software will not interfere with it Because the debugger uses 10 20 locations down from 1100H location 10C0H should be used under normal circumstances 4 3 Debug Commands In the following command descriptions the angle brackets lt gt enclosing descriptive names for the quantities to be entered should not be typed Square brackets enclose optional quantities Parentheses are used for grouping repetitive items The commands may be abbreviated to their first letter with the exception of SAve and GEt which must have at least two letters If a command is not understood the system issues a 72 followed by a command prompt gt All numbers may be entered in free form hex with leading zeros omitted If more than four hex digits are entered the last four will form the number used All f
5. 4 4 Debug Inter lace 299923329 4 9 790909 9 oS y CONNU 2S SYSTEM PARAMETERS 9 9 9 99 99 909 90 09 999 9 959 09 990 9 9 9 5 9 a L7 5 1 User Accessible System Parameters 17 dae Port AddESSSeS bras eerste ace 18 5 3 PROM Monitor Routine Requests and Ector Codes aussagen 9 5 4 Device Command Codes viviste l9 INDEX wie Se o AN LILA SECTION 1 INTRODUCTION 1 1 Software Components The MCZ 1 20A MCZ 1 25A Floppy PROM set provides the basic debugging commands Input Output and bootstrap portions of a floppy disk operating and development system The system consists of a bootstrap loader a floppy disk driver a terminal handler and a command interpreter The system resides in 3K bytes of PROM memory starting at address 0000 and uses 1K bytes of RAM including 256 bytes allocated for the system stack starting at address 10005 1 2 Initialization At system RESET the PROM Monitor reads the switch bank to determine the baud rate required at the serial interface All variable parameters are set in RAM to their initial values The USART Universal Synchronous Asynchronous Receiver Transmitter is programmed for asynchronous operation with two transmit stop bits no parity 8 data bits and divide by sixteen operation The USART is further programmed to generate active low signals on REQUEST TO SEND and DATA TERMINAL READY lines and both the receiver and tr
6. 8 procedure file 14 program counter ll program restrictions 9 PROMPT 17 Q QUIT 13 15 R RDBIN 3 5 19 RDLIN 5 19 REGISTER 13 repetition counter 9 reset values 19 RET 4 6 RETI 4 6 routine codes 19 S SAve 10 14 sector address 3 sector error 3 4 serial interface 5 SET 14 stack pointer 10 20 SWITCH 18 Index 3 switches 7 System parameters 17 T timing distortion 9 track address 3 track error 4 transfer length 3 5 U USART 1 18 W write protected 4 WRTBIN 3 5 19 WRTLIN 5 19 Index 4 Zilog Inc 10460 Bubb Road Cupertino California 95014 Telephone 408 446 4666 TWX 910 338 7621 Printed in USA rro
7. MCZ 1 20A and MCZ 1 25A MICROCOMPUTERS FLOPPY PROM User Guide December 1979 E qe T T al H MR ET Q2 03 3106 01 Rev A December 1979 Copyright 1979 1980 by Zilog Inc All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without the prior written permission of Zilog MCZ 1 20A and MCZ 1 25A MICROCOMPUTERS FLOPPY PROM User Guide December 1979 SECTION SECTION SECTION SECTION SECTION CONTENTS INTRODUCTION 000 0000000000000000000000000000008090000 ls 1 So ftware Components e o 9 99 9 9 99 9 9 9 8 9 9 99 9 9 8 8 9 y Initialization v 9 99 09 99 99 9 9 9 9 909 09 9 9 9 9 99 9 9 9 e 9 e 1 3 Command Interpreting aae idad hh pp FLOPPY DISK DRIVER 99 09 99 990 09 9 99 9 99 9090 999 9 999 58 e 9 9 UJ 2 1 PLOPPY Requests dust 3 2 2 Conpletion COdeS css sia ns Y UN PTY DRIVER 0 4 9 9 9 69 0 9 e seo ee 0 9 90 8 6 9 9 e 9 9 000 0 l TTY Requests 8000000009000000000000000000400008000 2 Line Edit Commands ooroconrnonrarenorosoo 3 Terminal Requirements ooooooooooooaoooooo SVU DEBUG ENVIRONMENT 600 600000000000000000000000000 A 1 Br akpOlnes iia ia 9 4 2 Program Restrictions arica caera A d 1 3 Debug Commnands 4235993348 99 99 9 959 7 908 8 20
8. ansmitter are enabled Finally the PIO Parallel I O chip in the disk interface is set to the bit control mode on both its ports and appropriate directions are assigned to the bits 1 3 Command Interpreting After USART initialization the monitor fetches its first command string from the terminal If that command string is comprised of a carriage return or the characters OS meaning Operating System followed by a carriage return control transfers to the bootstrap logic For any other command String control is passed to the the Debug command scanner The bootstrap subroutine reads in 128 bytes of a Supplementary bootstrap routine from disk If the read is Successful control is transferred to the routine If the read is unsuccessful and the drive is attached control returns to the Debug command scanner If no drive is attached the bootstrap routine reads 128 bytes of data in binary form from the terminal These bytes of data are put into RAM starting at address 1000H The central processing unit CPU continues program execution from that address zie SECTION 2 FLOPPY DISK DRIVER 2 1 FLOPPY Requests The Floppy driver FLOPPY is used to read and write from the disk The FLOPPY routine can only access information on a diskette formatted to Zilog software standards The entry point for the Floppy driver is at location OBFDH The driver accepts a standard parameter vector as follows IY 0 Ignored IY 1 Request ty
9. e TTY driver which is used to read and write from the terminal is interrupt driven for input characters Characters received from the terminal are stored in a 20H byte circular buffer This approach provides the user with a type ahead capability The entry point for the TTY driver is at OBES8H The driver accepts a standard parameter vector as follows IY 0 Ignored TY 1 Request type of action needed IY 2 IY 3 Data transfer address IY 4 IY 5 Data length in bytes IY 6 IY 7 Completion return address IY 8 IY 9 Error return address IY 10 Completion code IY 11 IY 12 Ignored The four valid requests handled by the terminal driver are RDBIN 0AH WRTBIN O0EH RDLIN 0CH and WRTLIN 10H The binary operations read or write the specified length of data between the serial interface and the block of memor y beginning at the data transfer address No special characters are honored in binary operations No echoing on the terminal is performed for RDBIN See the 280 RIO Operating System User s Manual for more information on RDBIN and WRTBIN The RDLIN operation begins by issuing a prompt character to the terminal then proceeds to input characters from the terminal to the data transfer area All input characters are echoed on the terminal Special line delete which is initialized by the PROM Monitor to DEL ASCII 7FH and character delete which is initialized by the PROM Monitor to BACKSPACE or CONTROL H ASCII 08H are honor
10. ed by this routine A RDLIN operation terminates either on receipt of the number of characters specified as the transfer length or on receipt of a carriage return The carriage return is echoed and the number of line feeds and null characters specified in the corresponding parameter storage locations is generated The WRTLIN operation also proceeds either for the number of characters specified as the transfer length or until a Carriage return is encountered The carriage return is sent to the terminal The NULLCT parameter determines how many nulls Should be sent to the terminal The LFCNT parameter determines how many linefeeds should be written to the terminal NN Both ASCII line operations return a count of the number of characters actually transferred in the transfer length field If the request code is incremented by one control transfers to the completion return address after the operation The routine at this address should act as an interrupt routine except that it should not execute a RETI instruction a RET should be used instead If the request code is not incremented by one TTY returns normally after the operation has been completed In this case the completion return address is ignored In either case the data is transferred without the use of interrupts If an error occurs and the error return address bytes are non zero the routine stored at that address is called The routine takes the appropriate action and returns
11. ent loop The interface uses four switches on the MCB MT to set a binary value equivalent to a specific baud rate The speeds and their corresponding switch positions are as follows SPEED SETTING SW1 SW2 SW3 SW4 50 0 ON ON ON ON 75 l OFF ON ON ON 110 2 ON OFF ON ON 134 5 3 OFF OFF ON ON 150 4 ON ON OFF ON 200 5 OFF ON OFF ON 300 6 ON OFF OFF ON 600 7 OFF OFF OFF ON 1200 8 ON ON ON OFF 2400 9 OFF ON ON OFF 4800 10 ON OFF ON OFF 9600 i OFF OFF ON OFF 19200 12 ON ON OFF OFF 38400 13 OFF ON OFF OFF SECTION 4 DEBUG ENVIRONMENT 4 1 Breakpoints The 280 MCB MT board allows the user to set software breakpoints for program debugging A breakpoint is a command to suspend program execution whenever a specified instruction is executed The address specified in the command is the address of the instruction When encountered in the course of program execution the breakpoint suspends execution of the user s program saves all registers in a reserved memory area and prints a message informing of the break and the address at which it occurred Any number of breakpoints can be set manually by setting the desired breakpoint location to OFFH which causes a trap to the breakpoint routine The breakpoint location must be the first byte of an instruction and when the breakpoint is no longer desired the original instruction must be restored manually The fact that OFFH causes a break means that anytime a program erroneously attempts to execute f
12. ields are blank delimited An example of a valid Display command is D 1000 10 10 Monitor Syntax B lt addr gt lt nth time gt C lt addrl gt lt addr2 gt lt no of D lt addr gt lt no of bytes gt The following commands are implemented in the PROM Description BREAK Sets a breakpoint at the specified address first clearing any breakpoint previously set lt nth time gt denotes the number of times the breakpoint instruction is encountered before a breakpoint occurs The default is 1 See description of breakpoints Section 4 1 bytes gt COMPARE Used to compare the contents lt no of bytes gt of two blocks of memory lt addrl gt and lt addr2 gt specify the starting addresses of the two blocks If any locations of the two blocks differ the address and contents of those locations are displayed on the user s terminal DISPLAY Displays contents of memory locations starting at the specified address for the specified number of bytes If no of bytes is not specified memory locations are displayed one at a time with an opportunity to change each byte For each byte the address is displayed followed by the contents of the location followed by a space To change the contents of that location type in the new contents A carriage return either alone or after the new contents causes the next sequential location to be displayed A Q Quit followed by a car
13. ng the Debug command interpreter see Section 4 3 L 5 2 Port Addresses The following equates define the system I O devices SYSTEM HARDWARE I O PORT ADDRESSES PORT ADDRESS USART DATA TTYDAT DE USART CONTROL STATUS TTYSTT DF CTC CHAN 0 CEKO D4 CTC CHAN 1 CLK1 D5 CTC CHAN 2 USART TRANSMITTER READY D6 CTC CHAN 3 USART RECEIVER READY D7 PIO DATA A D8 PIO CONTROL A DA PIO DATA B D9 PIO CONTROL B DB DISK SHIFT REGISTER DSKDAT CF DISK PIO DATA A DSSTAT DO DISK PIO CONTROL A D2 DISK PIO DATA B DSKSEL D1 DISK PIO CONTROL B D3 SWITCH BANK TTYSPD DD 183 5 3 PROM Monitor Routine Request and Error Codes The following request codes are satisfied by the PROM routines PROM MONITOR I O ROUTINE CODES FLOPPY REQUEST CODE VALUE RDBIN OA WRTBIN 0E TTY REQUEST CODE VALUE RDBIN 0A RDLIN 0C WRTBIN 0E WRTLIN 10 Error codes that may occur are as follows ERROR CODES CODES VALUE NORMAL RETURN 80 INVALID OPERATION REQUEST CI DISK NOT READY C2 DISK WRITE PROTECTED C3 SECTOR ERROR C4 TRACK ERROR C5 CRC ERROR C6 5 4 Device Command Codes The commands sent to the I O devices are defined as follows I O CONTROL PROM MONITOR RESET VALUES USART CONTROL WORDS VALUE MODE INSTRUCTION CE COMMAND INSTRUCTION 27 19 CTC CHANNEL 0 CONTROL WORDS VECTOR REGISTER CONTROL REGISTER TIME CONSTANT DISK PIO CONTROL WORDS PORT A CONTROL PORT A I O SELECT PORT B CONTROL PORT B I O SELECT
14. pe of action needed IY 2 1Y 3 Data transfer address IY 4 IY 5 Data length in bytes IY 6 IY 7 Completion return address IY 8 IY 9 Error return address IY 10 Completion code IY 11 IY i2 Disk address sector track respectively The starting disk address for transfer has two parts a track address from 0 to 77 decimal and a sector address from 0 to 31 decimal The most significant three bits of the sector address indicate which of the eight possible units is used for the transfer The track address is considered the most significant part of the disk address and goes in IY 12 the sector address is considered the least significant part and goes in IY 11 If the data transfer length is not divisible by the sector size 128 bytes the data transfer length is increased to the next integral multiple of the sector size Data is written read from contiguous sectors The length should be such that the entire transfer will take place between the sector where transfer starts and the end of the track If this limitation is not observed a sector error results on a read operation and a permanent sector error is created on a write operation resulting in certain sectors being permanently inaccessible There are two valid requests for the floppy driver RDBIN 0AH which reads binary data from the disk to the data transfer area and WRTBIN QEH which writes binary data from the data transfer area to the disk If the user s request code is inc
15. reased by a value of one the driver executes a return as soon as the request has been initiated The data transfer can then continue under interrupt ud ue control When the operation is complete the routine specified by the completion return address is called This routine should act as an interrupt routine except that it should not execute a Return from Interrupt RETI instruction a RET instruction should be used instead If an error occurs during processing of the user s request and the error return address bytes are non zero the routine at that address is called The routine takes whatever action is appropriate and returns If the address is zero the return is normal as though there were no error 2 2 Completion Codes Bit 7 of the completion code byte is set when the operation is complete Bit 6 is set to indicate that an error occurred The least significant six bits indicate which error occurred Possible return codes are Code Meaning 80H Normal return Bit 6 not set ClH Invalid operation request C2H Not ready disk is signalling a Not Ready condition C3H Disk is write protected C4H Sector error the sector address in the sector header did not agree with the sector position C5H Track error the track address in the sector header did not agree with the head position C6H CRC error Cyclic Redundancy Checking indicates one or more data bits in error SECTION 3 TTY DRIVER 3 1 TTY Requests Th
16. riage return terminates the command If no of bytes is Specified the contents of the desijnated memory locations are displayed both in hex notation and as ASCII character The character EET Syntax F addrl lt addr2 gt data GE lt drive gt filename J lt addr gt Description representation appears to the right of the screen between asterisks with all non printing characters appearing as periods FILL Stores the specified data byte into all memory locations from addrl to lt addr2 gt inclusive This range must not include any areas of ROM or non existent memory GET This command assumes that filename is a procedure file and reads the file into core using the segment information in the file description record If lt drive gt is not specified the filename is searched for in the usual drive sequence order 1 7 0 1 0 errors are reported with the message FILE ERROR hh where hh consists of two hex digits representing the RIO OS error code Refer to the Error Code listing in the 280 RIO Operating System User s Manual GO Branches to the last stored program counter PC thus continuing program execution where it was last interrupted All registers are restored INTERRUPT Displays the status of the interrupt enable flip flop as either 00 disabled or 01 enabled To change the status enter the number corresponding to the desired status after the display o
17. rom non existent memory a break occurs immediately The BREAK command saves the address at which the breakpoint is being set and the instruction the OFFE is replacing The BREAK command has an optional parameter of a repetition counter which is also saved when specified If a repetition counter with value N is specified suspension of execution does not occur until the Nth time this breakpoint is encountered unless some other breakpoint is encountered first If the breakpoint is cleared BREAK lt CR gt the instruction modified with OFFH is restored 4 2 Program Restrictions I interrupts are disabled when a breakpoint occurs program execution will begin with interrupts enabled Because some timing distortion occurs each time the breakpoint is encountered the program should not be timing dependent The program must not use Channel 3 of the CTC Counter Timer Circuit as this channel is used to implement the multiple execution feature The breakpoint cannot be within an interrupt routine entered by an interrupt from Channels 0 2 of the CTC Both the breakpoint programs and the NEXT command use instruction modification and the interrupt system Thus the instructions being debugged cannot be in ROM and they cannot involve modifications of either the interrupt status or the Interrupt I register Also the byte preceding the instruction in question is temporarily modified and so must be in writable memory Whenever a JUMP
18. t register type in the new contents A carriage return either alone or after new contents causes the next register to be displayed To terminate the command enter Q Quit either alone or after new contents then enter a Carriage return 13 Syntax Description R lt register name gt The sequence in which the registers cont are displayed when they are stepped from one to the next is A B C D Er P H Ly l A B s C Des E ES A L y Ike LY PC SB The registers are saved at the start of the program and at each breakpoint They are restored at each JUMP or GO command SA lt drive gt filename lt startl gt lt endl gt lt startn gt lt endn gt Ezentry RL record length SAVE Builds a procedure file on the specified drive If no drive is specified the file is built on the first available drive in the sequence 1 2 7 0 The SAVED procedure file contains segments Specified by the address pairs lt start gt and lt end gt The entry point of the SAVED procedure file is set to 0 and the stack size is set to 100H Segment sizes are rounded up to multiples of 512 The file is overwritten if it is an old file I O errors are repeated with the message FILE ERROR hh where hh consists of two hex codes representing the RIO OS error code Refer to the Error Code listing in the 280 RIO Operating System User s Manual S lt addr gt data lt data gt lt data gt 1 SET S
19. therwise enter a carriage return JUMP Branches unconditionally to the specified address thus executing the user s program All registers are restored before branching lox Syntax M lt dest gt lt source gt lt n gt N lt n gt R lt register name gt Description MOVE Used to move the contents of a block of memory from the source address specified by lt source gt to the destination address specified by dest lt n gt is the length in bytes of the block to be moved There are no restrictions on source dest or lt n gt NEXT Causes execution of the next machine instruction starting at the current PC and displays all registers after each instruction execution If n the number of instructions is not given 1 is assumed Typing a carriage return after a NEXT command causes execution and tracing of the next instruction QUIT If Debug was properly entered from an external program such as the RIO operating system QUIT returns to that program otherwise it is an invalid command REGISTER Allows the contents of the indicated register to be displayed and modified If no register name is specified all registers are displayed on one line If a register name is specified individual registers are displayed starting with the one specified For each register the register name is displayed followed by its contents followed by a space To change the contents of tha
20. tores the specified data words into sequential memory locations starting at the specified address A carriage return terminates the list alas 4 4 Debug Interface An external routine can interface with the PROM Debug package in one of two ways Either way a flag is set and a return address is stored in an associated location The first way is to make a call into the Debug environment thus passing control to the Debug command interpreter until a QUIT command is issued This is done by setting Bit 5 of location 13CDH BRKFLG in system RAM storing the return address at locations 13BEH 13BFH EXTRET and jumping to the Debug command interpreter at OBFAH The second method is used when an external routine is to handle breakpoints If Bit 7 of 13CDH BRKFLG is set the Occurrence of a breakpoint causes a jump to the location stored at 13CEH 13CFH BRKRTN alos SECTION 5 SYSTEM PARAMETERS 5 1 User Accessible System Parameters The following system parameters are user accessible Parameters NULLCT LFCNT PROMPT LINDEL CHRDEL Description Null Count 13C8H The number of null characters and line feeds inserted after a carriage return is stored in this location Modifying the null count adapts the TTY driver to the mechanical carriage return delays of various terminals Line Feed Count 13C9H The number of line feeds inserted after a carriage return is stored in this location Modifying the line

Download Pdf Manuals

image

Related Search

Related Contents

取り扱い説明書はこちら  Brother MFC-410N  MANUAL DEL USUARIO DEL TCP (TROMSØ CCD PHOTOMETER)    Lightolier IS:1000IC User's Manual  COMBI UNIT BIAS REPAIR (CAR / TRUCK) TRUCK  USER MANUAL  取扱説明書 施工者さまへ お客さまへ  Samsung Galaxy S2 Uživatelská přiručka(Jelly Bean)  MANUEL DU PROPRIÉTAIRE DU JETSTREAMMC ET - Port-A-Cool  

Copyright © All rights reserved.
Failed to retrieve file