Home
Software #1 Resident Assembler User`s Manual
Contents
1. 1 The assembler will create a symbol table beginning at OF60 to contain all of the labels that you have defined in your source program See the description of source program statements in Section 4 2 The symbol table requires seven bytes per symbol when you determine where in memory to locate a file or an object program be sure to allow for the anticipated size of this symbol table 2 Next the assembler will translate each statement to its corresponding binary representation and assign an address in memory to each byte of the resulting object code Consecutive bytes of object code will be assigned consecutive addresses beginning at aaaa unless you use the ORG pseudo operation described in Section 4 6 to override this procedure 3 If you include the bbbb parameter the object program will be stored at location bbbb If no value is specified for bbbb the code is placed at aaaa Remember to assign to aaaa the address at which the program will eventually be loaded the only purpose of bbbb is to allow a temporary displacement of the code For example if the source program starts at aaaa and you do not specify a value for bbbb the object program will replace the source program in memory If the assembler listing then indicates that there are errors in the source program you will have to reenter the source code in order to be able to correct it A program that is assembled to r
2. correct checks m numbers When a program containin the checksum test reads all of e program in memory and calculates a checksum num compared with a correct value If the numbers match is correct Nothing is displayed t if they do not match the message in addition to th e checksum g this test ber which is the when th is displayed Th Even though the checksum test was failed it may be en bad dat CHECKSUM e message possible to ter the program anyway by typing the carriage return key The ta may not even be apparent program you do not use if it is in a por It is best however to try tion of the to find and correct the problem causing the error so the checksum test is passed circuitry bad memory locations The error can be caused by the cassette int fac bad tape a faulty improper alignment or settings on the cassette recor other equipment problems APPENDIX 1 recording Ger OF SOFT1 Appendix 8080 Opcode table sorted by function omitted APPENDIX Processor Technology Corp APPENDIX Processor Technology Corp ProcessorTechnology Processor Technology 7100 Johnson Industrial Drive 415 829 2600 Corporation Pleasanton CA 94566 Cable Address PROCTEC Software 1 Update 731070 The procedure described below corrects an error in the way that Software 1 R
3. the video screen unless you have used the SOLOS C UTER SET command to direct output to a different pseudo port See your SOLOS CUTER User s Manual which contain errors will be listed If the E option is included in the ASSM command only lines The description of the ASSM command in Section 2 3 contains and explains an example of an assembler listing 4 2 SOURCE PROGRAM STATEMENTS STATEMENTS may contain either symbolic 8080 machine instructions or assembler pseudo operations A st atement may include as many as four fields separated by blanks label operation operand comment The label field if present must begin in th e first source code character position that is it must be separated from the line number by exactly one blank space The symbo field can contain any number of characters but on five characters are used in the symbol table thus SUBSET1 and the label SUBSET2 will be regarded as if they appear in label fields in the same program an error message to be displayed All symbols in field must begin with a letter and may contain on numbers The operation field contains either an 8080 o mnemonic or a pseudo operation code this field mu occupied unless the line is a comment line l in the label ly the first the label identical and Will cause the label ly letters and peration st be Th
4. ERROR MESSAGES pa dde t k Bie Se aide abe aid dle ai dv ale atts 4 8 APPENDICES 1 USING CASSETTES 2 8080 OPERATION CODE SOFT1 Zs GENERAL DESCR EE ON The Processor Technology Soft SECTI ON INTRODUC contained program development system puter or other Ss 10 using the CUTER moni the packag 0 computers based on tor programs and CUTS xecutive assembler A are an and a 1 language tutorial of what an assemb material by Lance A Leventhal 1978 Santa Clara to enable yo development system At least system This memory is all 0000 OD9F 0D50 0F5E 0F60 Addition object and text files are to be done 2 2 LOAD Software Package 1 usin sorTl runn in ing it detail Cy carriage return EXEC from s function permi exec u tive The CUST command is described in Sect ts the user to call a routine of In order to re enter Soft in lthough this m 8060 pseudo operations n ler does orient to handle memory files d editor anual includes a cursory discussion it is not intended as an assembly TION for tware Package 1 is a self the Sol Termin the 8080 microprocessor module al Com Included in an of some or does it offer an exhaustive explanation Two books which do describe such are 8
5. DB R will cause the string ERROR to be stored in successive locations in memory 4 6 EXPRESSIONS An expression is a sequence of one or more symbols constants or other expressions separated by the arithmetic operators plus or minus Remember not to include any blanks a blank will always be regarded as a field separator Expressions may be used only in the operand field PAM 3 ISAB A 52 LOOP 32H 5 Expressions are calculated using 16 bit arithmetic thus all arithmetic is done modulo 65536 Single byte data cannot contain a value greater than 255 or less than 256 Any value outside this range will result in an assembler error 4 7 PSEUDO OPERATIONS Pseudo operations are written as ordinary statements but they direct the assembler to perform certain functions which do not always develop 8080 machine code This section describes the pseudo operations that you can use in Software 1 source programs ORG Set Program Origin label ORG expression This pseudo operation determines the first address that the assembler will assign to subsequent statements If a label is included it is assigned the value of the expression If ORG is used at the beginning of a program the value of the expression in the operand field becomes the origin or first address to be assigned to the program ORG OVERRIDES THE aaaa PARAMETER OF THE ASSM OR ASSME COMMAND see section 2 3 Simi
6. If you file nam record more than one file on a side SAVE an empty ed END for example after the last file of interest Once you read its name you will know not to search beyond it for files you are seeking One way to avoid having to search for files beginning is of APPENDIX 1 to record only one file per cassette at the the tape if you can afford the extra cassettes Al 1 SOFT 1 10 The lot of empty 11 Record a redundancy can protect tape at file more and accidental erasure 12 Most cassett a casset cassette opposit covered by plastic tabs protect th xposed than once you from recorders hav tte from accidental erasure tape are two small ost physical he first file on may ing bad tape that On a featur t each end of the on one of the tabs is broken out wri you will to press remove te protected this An in at terlock then one side of the record button protection 13 Use the on the casset to zero when the first tape counter tte Always rewind the cassette and set first putting a cassette into the recorder 30 seconds and note the reading of the counter abuse before it leaves memory eguipment malfunction Do not record on the first or last minute of tape on a side tape at the ends gets the m i
7. Use leading An entry to the editor may ters plus the carriage return On the Sol video display or VDM 1 characters following the sixty fourth are displayed on the next line of the screen To insert a line between two lines that already exist you will have to assign it a line number between the line numbers of the two existing lines Thus if you anticipate that you will want to insert lines after the initial entry of a program or text file you should space your original line numbers to permit insertions For example if line 0010 is followed by line 0015 it is no problem to add line 0012 whereas if line 0010 is followed by line 0011 the user can make no insertions without renumbering the lines Other constrain to the operation of ts on the format of input lines ar the assembler related SOFT1 SECTION 4 THE ASSEMBLER 4 1 GENERAL OPERATION When you give the ASSM command the assembler translates an 8080 assembly language source program into 8080 machine object code The assembler like the editor will operate only on the current file The remainder of this manual will be devoted to describing the features of the Software 1 assembler The assembler translates each line of the current file into object code Although each line must contain a line number the line number does not become part of the object program It is however reproduced on the ass
8. You can create a file store an assembled program or enter data in a memory location that you have already used the new information will replace the previous contents of that location The only way that you can protect against lo sing informa tion accidentally is to be aware of how much memory you have how you will need to use the available storage area and how you can best avoid storing over data that you might still want to use Be sure that you are aware of the beginning and ending addresses of each of your files and make a note of locations in which you have entered data using ENTR When you consider its length in bytes and whether the fil create a file is likely to grow so large as to encroach on the beginning of another file If you plan to assemble a program remember to leave enough room for the symbol table More specific suggestions related to assembly of source programs are included in the discussions of the ASSM command and the assembler EXEC aaaa Execute a program This command is used to execute a program at address aaaa if you want to return control to the executive when execution is complete be sure that you have included a RET instruction in the program If the OUST command is in use and you want to return to SOLOS or CUTER you can use the EXEC command and assign to aaaa the beginning a
9. lin number in column 1 Line numbers can range from 0000 10 000 lines can exist in each file available When you enter the carria every input line the line including becomes part of the file in th e Current s a line t fol lows having that line it into the to experiment with the only upper case letters o to be to 9999 Decimal if enough storage is ge return the carriage return file area incorporated into MUST begin with a four digit line so that that terminates The editor places all line numbers in seguence and automatically overwrites an existin line in same line of the fil ts of lines the conten g number the with lines and line command th cu nu th rrent file mbers in e file if you ent Because you le in order are not required e displ a y will the proper sequence THE ED will ITOR that terminates th DOES NOT AUTOMATICALLY input line which does not begin wit ter a new line with not If you want the the mirror the fil the LI to enter always to s ST us ASS GN L NE NUMBERS any th a four digit lin be regarded as a command to the executive zeros for numbers less than 1000 include a maximum of eighty charact lin e number
10. location 39H If step 3 involved a list of numbers those numbers would be placed in consecutive memory locations beginning at 39H 3 When a colon appears on the screen type 47 lt cr gt to enter the number 47H at location 39H 4 When the prompt gt returns type gt EN FAF lt cr gt 731070 page 1 of 3 7 78 Ref SCN 0012 to indicate that the next number entered should replace the present contents of memory location FAFH Subsequent step 5 will occupy consecutive locations following FAFH 5 When a colon appears on the screen ty F9 51 lt cr gt Notice that the list of entries must again be In step 3 there was only one entry in the li required When the prompt gt returns the 6 Set up a casset cassette tape oth te recorder for writing I r than the production cass ntries i e the 51 in pe terminated by a slash st but the slash was still patch has been completed nsert and position a tte Be sure to leave at least half a minute at the beginning of the t 7 After hitting the MODE SELECT key to retur mode type gt SET XE 0 lt cr gt ape unrecorded n to SOLOS CUTER command to set the starting address that will be written in the tape fil header 8 Type or gt SAVE SOFT1 0 FBl lt cr gt gt SAVE SOFT1 2 0 FBl lt cr gt The first version assumes that the file is b in unit 1 t
11. the type a En mpty file tape counter readings and a brief description to locate any file quickly Before beginning work after any modification to th In addition to using the above procedures methodically need to know the various ways in which programs sistently later on th arch no of the e system This could you may be recorded and suspect the tape been recorded file may hav Processor Technology oft sid A what it contains same tim sam of the tape CATalog it with SOLOS or CUTER so you will ten records a When you Write down the tape counter SOFT1 2 An empty file named EN recorded portion of a tape D is sometimes placed at the end of the When SOLOS CATalogs a file the file header information is displayed as soon as the beginning part of the fil when le passes th the end of the program passes by tape head but nothing is displayed If another filename such as END is displayed you know you have just passed the end of the previous file 3 a test which SOLOS performs is first execu th Some of the programs supplied by Processor Technology contain checksum test within their code program in memor nu mbers match b TEST FAILED or may be followed by two numbers representing the correct and Ln ted after loading y a similar message
12. to contain an error ld is omitted the operation field must be If the lab fi separated from Otherwise th the line number by MORE THAN ONE blank interpreted as A comment line operation or pseudo operation mnemonic will be a label in the label field must begin with an asterisk separated from the EXACTLY ONE BLANK line number by With the one exception of the comment field there can be NO BLANKS within fields expressions In all other blanks 4 3 SYMBOLIC LABEI symbol in th assembler assigns it field to including within arithmetic Blanks are regarded as field separators cases fields may be separated by any number iS To assign a symbolic label to a statement put the desired lab l field When a label begins a statement the a value that corresponds to the address of assembled that is to the first address the next byte to be assigned to the statement that the EQU pseudo operation ca assume the value indicated in the operand field The only exception to this rule is uses the symbol in the label SOFT1 For example the assembler will respond to the statement POTTS EQU 128 by assigning the value 128 to the label POTTS Any label that has been defined whether by an EQU or by another statement can be used in the operand field of another statement in the program In fact because the assignment of
13. values to labels occurs on the first pass it is unnecessary to define a label in an earlier statement than the one in which it appears in the operand field for example line 0025 in the last example says jump to BEG when BEG does not appear in the label field until later in the program The only exception to this rule is that a label can not appear in the operand field of an EQU statement unless it has been defined earlier in the program There are eight symbols which the assembler has reserved and associated with particular values These names may not be used except in the operand field and the user has no control over their definition They are A the accumulator 7 B Register B 0 C Register C 1 D Register D 2 E Register E 3 H Register H 4 L Register L 5 M Memory 6 The numbers in parentheses are the decimal equivalents of the binary codes used to represent these entities In a program statement ither the single letter abbreviation or the decimal number may be used For example the two instructions INR 5 and INR L assemble to the same byte of object code The 8080 mnemonics for the Stack Pointer SP and Program Status Word PSW are not predefined in Software 1 In the context of an 8080 assembly language program they must be associated with a value of 6 therefore in order to use SP or PSW in a pro
14. 080 8085 Assembly Language Programming 1977 u to develop programs using the Software 1 program and a carriage retu use GET fol To O followed by a carriage return the executive of Software Package 1 unless you have defined th 4K of memory must Local Executive Program Special al memory must be avail and for the There will be more requirements in Sections 2 3 and 4 1 ING SOFTWARE 1 rm A Lowed by a blank xecut is t be avail ted as follows and 8080 8085 Assembly Language Manual The purpose of the following pages is System RAM Start of Symbol Table below the program after command To exit use tware 1 Adam Osborne amp Associates B his choice S rkeley CA Intel Corporation Lable for use by the Assembler Only Lable for your own source symbol table discussion of memory if assemblies may be loaded and run from cassette g the SOLOS CUTER command XEQ followed by a blank To load the program without the name SOFTI using GET to SOLOS C the CUST command to perform some other tion 2 from the name and a type UTER Sy BE within the Car 3 with the command EXEC 3 followed by a carriage ret t at address curn SOFT1 When the program is first loaded from tape and executed a checksum test is performed on the code in memory If the check fails an error message will appe
15. 3 U to SOLOS CUTER These are the steps to follow if you se CUST to execute a program other than SOLOS CUTER sing the FILE command create a current file to contain sing the editor enter the source program sing the ASSM command described below assemble the source program to object code If you are likely to want to use the program again SAVE the object code on cassette tape 4 Using the ENTR command store the beginning address of the object program in locations 02A8 and 02A9 b xecut If you have followed these instructions your program will d whenever you give the CUST command from the executive 2 7 SOFT1 Example assumes a printer using the serial port CUST lt cr gt user enters command to return o SOLOS user sets serial output port user re enters Software 1 gt SET O 1 lt cr gt gt EX 3 lt cr gt af LIST user requests a listing of the current file on the present output device in this case the listing will be sent to the printer through the serial port ASSM E aaaa bbbb Assemble a source file to object code In order to be executed a source program must be assembled to object code This command initiates assembly of the CURRENT file if that file contains a source program here is a description of what happens to the current file when you enter the ASSM command see Section 4 for more details
16. O NO FILE name 0 Delete the named file and make no file current Note no file can start at address 0 FILE name Save all parameters of the existing current file then make the named file the current file FILE Display parameters of the current file in the following format with aaaa and bbbb being the beginning of file and end of file addresses name aaaa bbbb FILES Display the parameters of all files currently known by the system 23 sor T1 Example FILE ONE 1000 lt cr gt user creates file ONE begin ning address 1060 ONE 1000 1000 parameters of file displayed 0001 THIS IS THE FIRST LINE lt cr gt user enters lines into file 0026 THIS IS THE SECOND lt cr gt 0029 LINE 3 lt cr gt FILE TWO 1100 lt cr gt user creates file TWO begin ning at address 1100 TWO 1160 1160 parameters of file displayed FILE THREE 1200 lt cr gt user creates file THREE beginning at address 1200 THREE 1200 1200 parameters of file displayed 0010 DEAR JOHN lt cr gt user enters lines into file 0012 PAY ME OR I WON T lt cr gt 0014 BE YOUR FRIEND lt cr gt 0015 SEE YOU SOON lt cr gt 0017 IGOR lt cr gt FILE TWO lt cr gt user saves parameters of cur rent file THREE and makes TWO TWO 1100 1100 current parameters displayed 1300 FILE TWO GETS
17. RRUPTS AND WAITS b OGG GOGOA E GO Gm END DELT linel line2 Al Edel Delete line s from file This command is used to delete lines from the current file lines from linel to line2 inclusive are deleted from the Example e If line2 is not specified only linel is deleted see example under LIST DELT 10 20 user says delete lines 10 20 LIST user asks for list of edited 0000 WAIT E file 0024 END lines 10 and 20 are gone SAVE name aaaa bbbb Save a file or other portion of memory on cassette tape This command is like the SOLOS CUTER SAVE command except that here the filenam is surrounded by slashes The command records the contents of a file or of a specified area of memory a cassette placed in tape unit 1 If there are arguments given as in the example above the contents of memory from on address aaaa to address bbbb are saved and a file name of up to five characters is recorded in the cassette file header with type P for Program with no arguments which saves the whole current file on tape The name which has already been assigned to the file will also its name on the cassette file header and it will have a file type T Text be The command has a simpler form SAVE 2 6 sorT1 GET name aaaa Read a cassette
18. Software 1 Resident 8080 Assembler User Manual Processor Technology Corporation 7100 Johnson Industrial Drive Pleasanton CA 94566 Telephone 415 829 2600 Copyright C 1978 by Processor Technology Corporation Second Edition First Printing June 1978 Manual Part No 727023 All rights reserved SECTI TABLE OF CONTENTS ON PAGE TNTRODUCTTON aa oe sad Shade st susie at siete e here o 1 L GENE RAD DESCRIPTION orai ea tata eS lt 2 LOADING SOFTWARE CF I oeira So glass is 1 FHE EXECUTIVE scrii ri be a pe in o soa a 27 2 3 SENTRODUG TALON nhe te i ele r a Bide abe a 2 2 2 CONVENTIONS USED IN COMMAND DESCRIPTIONS 2 2 3 COMMAND DESCRIPTIONS seier cee hte ee tee ee ee bs 272 Zs ERROR MESSAGES aa ezt eee a Behe a 2 10 TAE EDETOR Ja ied oes ay aera ha A A dost tne AS a re 3 THE ASSEMBBER sitiada e A Ge Saws 4 dos GENERAL OPERATION reia Aa aa ergo ope 4 4 2 SOURCE PROGRAM STATEMENTS o ooooooooooo 4 2 43 SYMBOLIC TAR BS da a ayia aoe ee Boe ee eee 4 3 4 4 RELATIVE SYMBOLIC ADDRESSING 4 5 A so LCONS TANT Sita 26 co ers xcs eels whe av ate Sere wt ae ah ay eye ee ee E 4 5 4 6 EXPRESSTONS 35d seed flee ce Backs 4 6 Ae B SEUDO OPE RATT ONS ise ceed Steele ii a a decane 4 6 438
19. THIS LINE lt cr gt user enters lines into file 1984 UPPER CASE OKAY lt cr gt 1000 NO LOWER CASE lt cr gt lines needn t be entered in 2710 END TWO lt cr gt order FILE lt cr gt user requests parameters of current file TWO 1100 1159 parameters of file displayed FILES lt cr gt user requests parameters of all files TWO 00 1159 parameters of files displayed THREE 1200 127E ONE 1000 1045 Hy TILE STRUCTURE AND MEMORY MANAGEMENT Files created in Software 1 have a structure in which the first byte of a line contains a count of the number of characters in that line including the counter itself the line number and the carriage return that ended the line Thus 0008 THIS IS A POSSIBLE LINE contains 32 bytes a counter 3E characters of text anda Carriage return Note that the line number and the space or spaces that follow the line number are included in the line The end of a file is indicated by a 01 Hex character a final count of the number of bytes in a file will reflect the presence of this character When you create and develop a file in Software 1 you decide where that file will be placed in memory The system will not allow you to use the same name for more than one file 2 4 SOFT1 but it places no restriction on the number of times you can place data in the same location
20. and pu get 4 5 CONSTANTS The assembler allows you numbers in the operand field decimal constants All unsigned n appropriately Hexadecimal indicate of a hexadecimal decimal The A hexadecimal constant leading zero to number rather A5H will OA5H wil ted by TEMP cen cen show ts into cons cons D is okay cants mus 2 bu 5 and 25 t not req can Cy The instruct ts of the location thr the accumulator t be have an that they are not decimal constants ion L byt gr uired may not s item in that an than a label l be assumed to be a label l be assumed to be a hexadecimal constant after them 25H is an example D will both be regarded as tart with a letter the operand field is a DA TEMP 3 s beyond TEMP to write positive or negative These numbers will be regarded as and their binary equivalents will be used umbers are considered positive to use a SOFT1 ASC constants are represented within single quote marks SHIFT 7 A constant consisting of two characters may be represented within one set of single quotes e g LXI H AB is acceptable To handle a longer string use a series of statements containing the Define Byte pseudo operation see the next section For example DB E DB R DB R DB O
21. ar and you have the option of using a carriage return to start the program Appendix 2 explains why it is not a good idea to start a program that has failed the checksum test Software 1 is recorded twice on the cassette so that if the first recording fails you can still try the second one 1 2 SOFT1 SECTION 2 THE EXECUTIVE 2 3 INTRODUCTION When Software Package 1 is first loaded from cassette are in executive mode summary below begin in blank must two arguments must column of the video screen separate the command from its first argument the first you and can use any of commands given in the All commands must be entered in upper case and At least one and any t be separated from one another by at least one blank Arguments must also be in upper case CTRL X Disregard anything typed since the last Carriage return start a new line and accept input from the keyboard ENTR Enter data into memory DUMP Display memory data FILE Create assign or display file information EXEC Execute a program ASSM Assemble a source file to object code LIST List file DELT Delete lines of file CUST Execute routine whose starting address is stored at 02A8 SAVE Save a file or memory contents on tape GET Get a file or memory contents from tape There is one ot ther type of entry that you can make in executiv
22. bler listing nor file using 1A2B as the first mally begins on the line right after the command address code beginning at 2A2B and store the object 1A2B FB 0000 WAIT E 1A2C 00 00 00 O 0010 JMP WAIT 1 1A2F 0020 THIS SETS INTERRUPT AND WAITS 0010 JMP WAIT 1 lt cr gt user enters correction ASSME 1A2B 2A2B lt cr gt user says reassemble file showing only lines with errors there are no errors SAVE OBJ 1A2B 1A2F user saves file on tape with filename OBJ GET OBJ 1A2B user reloads file at appropri ate address EXEC 1A2B user executes object program sorT1 2 6 ERROR MESSAGES T 2 3 The executive has three error messages WHAT indicating an improper command or an error in the parameters following the command NO CURRENT FILE indicating that you have entered a command that references a current file when none exists and NO NO indicating that you have attempted to create a file that already exists in memory 2 10 SOFT1 THE EDI SECTI ON T 3 OR Whenever you are in executive mode and begin an entry with a four digit nun number cu system can be entered from the keyboard rrent file nber the editor insert and consisting of whatever If you have already begun you have probably noticed that tex Als the current file the
23. d version of SOFT1 to the other side of the tape on which you have recorded it load the program again as in step 1 from the ORIGINAL side of that cassette and repeat steps 6 through 8 above making sure you write the file to the REVERSE side of the cassette 11 Note on your duplicate cassette that you have updated your copy of the Software 1 program from MOD 0 to MOD 0 1 When you execute th program it will continue to identify itself as MOD 0 it is therefore very important that you make a record of the correct MOD number so that you will know whether any further update notices apply to you Remember that Processor Technology software is copyrighted Your duplicate is for your use for maintenance and backup purposes only No copies should be given away or sold 731070 page 3 of 3 7 78 Ref SCN 0012
24. ddress of SOLOS CO 00 or CUTER To r nter th xecutive give the EXEC 3 command from SOLOS CUTER LIST number List file This command is used to display the lines entered by the user into the current file The output consists of the lines in the file starting at the specified line number is specified display starts at the beginning of If no number the file The LIST command does not change the format of the file in any way e g by reducing multiple blanks to one each line appears precisely as you entered it Lines are listed with line numbers in ascending order as they exist in the file Use MODE SELECT or the CTRL and keys simultaneously to discontinue a listing and return to the executive SOFT1 Example IOOOH OOO Oi 0 0 0 5000 00 COC Ont NNFOWNNEBFNNNFOLF WAIT El lt cr gt JMP WAIT 1 lt cr gt SIMPL 1A2B lt cr gt user creates current file user enters lines into file dj THIS ENABLES NTERRUPTS AND WAITS lt cr gt END lt cr gt 10 lt cr gt JMP WAIT 1 user says start list at 10 lines of file are displayed a THIS ENABLES NTERRUPTS AND WAITS END lt cr gt WAIT E JMP WAIT 1 user says list current file list starts at beginning of file by default iS THIS ENABLES NTE
25. e Error displayed on the assembler Some of the errors are only An improper argument appears in the operand field be 1 it e g 3STOP or 2 characters Two labels in the program th starts with a number This might a number with a letter in 2L 2 a label that 0 a string longer than e g ABC are the first five same Toen characters are identical The symbol in th contains i label field characters llegal Error in an EQU Error The field instructio A label has not been included instruction symbol in the operation is not a valid 8080 n mnemonic or assem bler pseudo operation mnemonic An designat invalid symbol was used to The syntax not comply a register of a statement does with the require ments of the assembler A label in Can not be table in the lab Teer the operand field found in the symbol it does not appear the source The expres l1 field anywhere in program sion in the operand field is outside the allowed range SOFT1 09 cassett APPENDIX 1 USING CASSETTES uccessful and reliable results with cassette recorders and files requires a good deal of care You need to use consistent and careful methods and you need to know what to expect when you try to read a manufacturer s tape or your own The following method
26. e mode by typing any four digit number you Can insert a line having that line number into a memory file Obviously you have to create a file first A detailed discussion of all of the commands will begin in section 2 3 files is Software Package 1 SINP and the current SOLOS CUTER User s Manual output from a LIST space bar spacebar together control to the executive 2 4 CONVENTIONS USED The t UPPER CASE letters literally in the form of a command below discussed in Section 3 1 does input SOUT entry points of SOLOS CUTER pseudo ports Section IV The u DUMP and therefore ser may The use of the editor to enter lines in and output by calling the through See the SOLOS CUTER temporarily halt the or ASSM command by depressing the and then cause it to resume by depressing the again Typing the MODE SELECT or CTRL and keys will terminate output from a command and return IN COMMAND DESCR PT ONS following conventions will be used in the discussion of command format and all numbers For example that the user should actually type the word SAVE 2 1 should be entered SAVE means SOFT1 2 Lower case letters represent the item to be typed but are not literal For example name means type a name 3 Optional elements in a command are enclosed in square bracket
27. e operand field contains arguments reguired by the operation in the operation field If two argument they must be separated by a comma BUT NO BLANKS first line of the example below s are present as in the SOFT1 0015 FLOP MOV M B COMMENT 0020 COMMENT 0025 JMP BEG 0030 CALL FLOP 0035 BEG ADI 8 6 4 0040 MOV A B The comment field is for explanatory remarks It is repro duced on the listing during the second pass Line 0015 above has a comment field There is a distinction between a comment field and a comment line A comment line like line 0020 in the example above does not translate into any object code whenever a line begins with an asterisk in the first source code character position the assembler disregards that line The comment field of a program statement does not generate any code either but the rest of the line is assembled normally another by one or more blank spaces Notice that all of the fields are separated from one Here is a summary of the rules concerning blanks 1 2 3 4 of Th If there is no label field must be separated from the line number by EXACTLY ONE blank the line number as the first of an operation or pseudo operation mnemonic If there is more than one blank following the assembler will regard the next character blank immediately following the line number the line will be found
28. elease 1 6 MOD 0 accepts input from a driver other than the Sol keyboard It is recommended that all users of the program make this patch otherwise an attempt to use an input device other than the Sol keyboard will have undesirable consequences Also the documentation for any future patches will assume that this patch has been made In the examples the symbol lt cr gt is used to denote a carriage return and the symbol gt is the SOLOS CUTER prompt The patch is made by reading the program into memory and making alterations there then saving the corrected program on a cassette tape other than the production cassette The commands used are those described in the SOLOS CUTER User s Manual This notice is intended to nable the user to make the necessary changes in SOFT1 and to have a minimal understanding of the processes involved without having to refer to that manual If you are not very familiar with the operation of cassette recorders you may want to consult the appendix entitled Using Cassettes in your Software 1 Resident Assembler User s Manual 1 Set up a cassette recorder for reading and load SOFT1 with the SOLOS CUTER GET command gt GET SOFT1 lt cr gt 2 When the prompt gt returns type gt EN 39 lt cr gt to indicate that the next number entered s step 3 should replace the present contents of memory
29. embler listing The character position immediately after the line number should be left blank thus the first source code character position is the second position following the last digit of the line number The Software 1 assembler operates in two passes that is it passes over the source program twice from beginning to end in the course of creating the corresponding object program If you are not already familiar with the syntax of source program statements you might want to look at Section 4 2 below before reading the rest of this discussion On the first pass the assembler creates a symbol table defining all symbols in the order that they appear as labels in the source program BIG EQU LITL is meaningful only if LITL appears in the label field of an earlier statement With the minimum 4K of memory there is room for 22 five character sym bols in the symbol table Only the first five characters are used to identify a symbol although you may enter more than five characters Each entry in the symbol table requires seven bytes five for the symbol two for the value of that symbol so that for each additional 1K of memory there is room for 146 more symbols in the table Remember to calculate how much memory you need to store your source and object programs You can f
30. f y locations but does no kips these owing the reserved area evaluate to a 16 bit number i e beginning at and makes its next assignment S tions will the it must be represent that number in 16 or fewer bits DB Defin Byt This pseudo assigns to it a valu expression must evaluat 8 or fewer bits DW This pseudo assigns to them expression must 16 or fewer bits the lower memory two byte operand memory location than Define Word evaluat label DB expression tore anything in them be reserved current position to the location expression must possible to The operation reserves a single memory location and label DW expression determined by the expression te to a number which can b The represented in operation reserves two bytes of storage and a valu i address s For example PA 7 DW AB determined by the expression te to a number which can b the low order byte of the value is stored at in conformity to the stores The represented in Intel format for B at a lower SOFT1 4 8 ERROR MESSAGES The following error messages ar listing when the error occurs the first pass displayed during A Argument Error D Duplicate Label L Label Error M Missing Label O Opcode R Register Error S Syntax Error U Undefined Symbol V Valu
31. gram you must insert the lines PSW EQU 6 SP EQU 6 in the text of your source program file In addition to the above reserved symbols there is the single special character symbol This symbol changes in value as the assembly progresses It is always equated with the next address to receive object code after the current instruc tion is assembled may only be used in the operand field 4 4 SOFT1 Examples JMP means Jump to the location following this MOV A B instruction i e to the MOV instruction This JMP is obviously redundant 4 4 RELATIVE SYMBOLIC ADDRESSING If the name of a particular location is known a nearby location may be represented by an expression including the known name and a numeric offset The offset is expressed in bytes of object code rather than in source program lines so that the variable length of instructions must be taken into account Only and may be used in the expression of an offset Example UPDATE STA TEMP 3 SAVE ACCUMULATOR IN TEMP LOC LDA IT GET IT INR A NCREMENT 1 STA IT STORE IT LDA TEMP 3 GET BACK THE ACCUMULATOR TEMP DB 10 DB 20 DB 30 DB 40 TEMP 3 POINTS HERE In this example the instruction STA TEMP 3 causes the contents of the accumulator to be saved in a location three bytes beyond that denot the con those con means
32. he second assumes that the file i cassette in unit 2 eing written to a cassette s being written toa When the file has been prompt gt will be displayed again 9 Before copying the patched version of SOFT cassette tape NOT the production cassette TAPE THAT YOU HAVE JUST WRITTEN to make sure input pseudo port setting that you use when y ave access to another input keyboard and you h command to return top of page 2 8 in type SET I ins return to SOLOS CU TER If you do not have ano If the program seems to be working properly Tf not load SOFT1 ag repeat steps 2 through 8 writing the new pat patched version of the program and testing yo 731070 page 2 of 3 7 78 recorded completely the 1 to the other side of your load the program FROM THE that it works If the ou execute SOFT1 is the Sol device try using the COST to SOLOS CUTER the SET command to change the input pseudo port and the EXEC command to restart the Software 1 Residen tead of SET O and use matches your device several of the commands to see that nothing i SOFT1 Use the example on t Assembler User s Manual but the port designation that ther input device just try s amiss use the CUST command to ain as in step 1 and ched version over the old ur results Ref SCN 0012 10 To copy the patche
33. igure out the length of a source program or text file by counting characters including line numbers spaces carriage returns byte counters and the end of file character one character equals one byte You can determine the length of an object program by knowing the number of bytes generated by each instruction and then adding but this procedure is long and tedious nobody follows it A good practice is to allow plenty of space if you give your object program about 20 as much room as your source file you will almost certainly have made ample provision for it On the second pass each source program instruction is translated into the corresponding object code all expressions 4 1 SOFT1 symbols operation codes and ASC constants are assigned their absolute values and each line of code is given an address Remember that the correct form of the ASSM command is ASSM E aaaa bbbb Addresses assigned to the object code begin at aaaa unless you use the ORG pseudo operation in the source program to override this procedure As the object program is generated it is placed in memory starting at bbbb If bbbb has been omitted from the command assembled code is stored beginning at aaaa The listing also produced on the second pass indicates exactly what data has been assigned to each location in memory Because entry point of SOLOS CUTER is used the listing wil the SOUT l appear on
34. larly an ORG statement within a program overrides the rule of assigning consecutive addresses to consecutive statements the ORG statement indicates the next address to be assigned regardless of previous addresses The statements that follow 4 6 SOFTI1 the ORG statement are given addresses beginning at the one represented by t END End of Asse source statement the second pass terminate and re pseudo operation when it reaches he expression mbly has been read or This pseudo operation informs the assembler that the last The assembler will proceed to if both passes have been completed turn control to the execut ive This is not required becaus th EQU Equate Symb olic Value nd of file indicator th assembler will stop O1H label EQU expression This pseudo operation assigns the value of the expression to the given lab will assign a value of 3 to both GREEN and COLOR 4 to BLUE used in the oper DS Define Stora This pseudo successive memor The expression determines how many locat the assembler s in the program immediately foll el For example GREEN EQU 3 COLOR EQU GREEN BLUE EQU GREEN 1 and a value of and field of ge label DS expression Notice that GREEN had to be defined befor another statement it was operation reserves a specified number o
35. mmand is used to examine the contents of memory The values contained in memory from locations aaaa to bbbb are displayed in hexadecimal Each line of display consists of an address followed by the contents of the next 16 memory locations If bbbb is not specified or if it is a number less than or equal to aaaa only the contents of location aaaa will be displayed The space bar may be used to stop the listing at any point the next key depressed will cause the listing to resume If you want to discontinue the listing and return to the executive type MODE SELECT CTRL Example DUMP 1140 1152 lt cr gt 0040 OA D8 D6 07 C9 DB 00 E6 45 00 DO 01 D3 02 F8 CF 0050 E6 7F C9 FILE name aaaa Create assign or display file information This command is used to create and delete files to examine their beginning and ending addresses and to establish whether or not a given file or any file will be current i e available for editing or assembly Up to six files can exist simultaneously with any one of these files regarded as current Depending on the form of the command and its parameters the following functions are performed NOTE Slashes around a filename are literal FILE name aaaa Create a file with the specified name starting at address aaaa and make it current If a file with the same nam already exists display the error mes sage N
36. mpatient when trying to read t the manufacturer of a pre recorded program the beginn Do not be a tape You or have recorded a This allows you to the edge of the cavities cassette If the cassette is in the recorder will not allow A piece of tape over the cavity to keep track of the position of files the counter Time Always begin recording after this count on all cassettes Record the beginning and ending count of each file for later referenc Befor recording a new file after other files advance a few counts beyond the end of the last file to insure that 14 list of all recorder be displayed called END further If with the file 15 test by SAVEing and GETting a short test program the loss of much work prevent on tapes you have purchased 1 If you cannot read a file con itself do not despair The sam elsewhere on the tape second version first get a know exactly readings at APPENDIX 1 As th you will be able tape th on the screen you If you hav as suggested you will know when to se write down the the catalog information along it will not be written over The SOLOS CUTER command CATalog can be used to gen files on a cassette rewind to the beginning of the tape e header of each file is read record In SOLOS CUTER and press PLAY on information will erate a CAT lt CR gt
37. s LIST number means that the LIST command need not include a number Of course the presence or absence of a number affects the way the command operates default values for optional parameters are included in the discussion of each command In some cases omitting a particular parameter makes it necessary to omit another For example name unit address means that you can a include name unit and address OR b omit name unit and address OR c omit unit and or address but not name Neither unit nor address may be specified if name is omitted 4 lt cr gt means type a carriage return Unless an exception is noted the user should enter a carriage return to terminate any line of input The computer will supply a carriage return at the end of every line of output 5 aaaa and bbbb are used to represent hexadecimal addresses 2 5 COMMAND DESCRIPTIONS ENTR aaaa Enter data into memory This command is used to enter data into memory starting at address aaaa Enter data in hexadecimal format when you have finished typing the data that you want to enter type a slash If you enter more than one item into memory as in the example the items that you type will occupy successive memory locations Example ENTR 1500 lt cr gt 0 OA 30 44 FF FE 2 2 SOFT1 DUMP aaaa bbbb Dump Contents of Memory This co
38. s are recommended 1 Use only a recorder recommended for digital usage For use with the Processor Technology Sol or CUTS the Panasonic RO 413AS or Realistic CTR 21 is recommended 2 Keep t h recorder at least a foot away from equipment cont aining power transformers or other equipment which might gener ate magnetic fields picked up by the recorder as hum 3 Keep the tape heads cleaned and demagnetized in accordance with the manufacturer s instructions 4 Use high quality brand name tape preferably low noise high output ta pe Poor tape can give poor results and rapidly wear down a recorder s tape heads 5 Bulk ras tapes before reusing It can be hard to find the file you want in a jumble of old file pieces Bulk erasing also decreases th noise level of the tape 6 Keep cassettes in their protective plastic covers in a cool en not in use Cassettes are vulnerable to dirt high place wh temperatu re liquids and physical abuse 7 Experimentally determine the most reliable settings for d tone controls and use these settings only volume an 8 On som recording ance with e cassette recorders the microphone can be live while through the AUX input Deactivate the mike in accord the manufacturer s instructions In some cases this can be done by inserting a dummy plug into the microphone jack 9
39. tape file into file or memory This command reads the specified file from tape unit one into the from the area of memory beginning at aaaa If aaaa is absent command the file will be read into the area occupied by the current file The filename used must be the same as when the file that as was SAVEd a filename must be specified The form of this command is like that of the SOLOS CUTER GET command except with the SAVE command the filename must be surrounded by slashes CUST Execute program whose beginning address is stored at 02A8 This command is a call to the address stored at 02A8 Actually the high byte of the address must be stored at 02A8 the low byte at 02A9 If you have not entered a different address 02A8 and 02A9 will contain a return entry point to SOLOS CUTER To enter the address of a program other than SOLOS CUTER use the ENTR command ENTR 02A8 lt high byte gt lt low byte gt where the high and low bytes ar ntered in hexadecimal form with a space between them The routine to be called must be an object program starting at the given address If an 8080 RET instruction is included in the program and if proper stack operations are maintained control will return to the executive The example below illustrates the use of the CUST command to return want to u 1 U 2 U the source program
40. un at aaaa but that is actually stored at bbbb must be SAVEd and reloaded if it is to run properly 2 8 SOFT1 4 listing consists of a the line b note that the instruction c a single letter error code If you do not use the optional E in the command the assembler produces a complete listing each line of the beginning address assigned to the a hexadecimal representation of the object code the number of bytes of object code will vary with where appropriate see Section 4 program line errors will be screen SOLOS or CUTER listed If you specify the E The unless you have changed the output pseudo port in 8 and d the original source only lines containing listing will appear on the The second line of the sample program below contains an opcode error signified by the JMP iS an operation from the line number by MORE T requirement will be discussed requirements in Section 4 2 rather than a label letter 0 In order to show that you must separate it HAN ONE blank space this along with other assembler Examples LIST lt cr gt user asks for listing of file 0000 WAIT E LIST starts at file beginning 0010 JMP WAIT 1 0020 THIS SETS INTERRUPT AND WAITS 0024 END ASSM 1A2B 2A2B lt cr gt user says assemble the current assem
Download Pdf Manuals
Related Search
Related Contents
Harbor Freight Tools 93119 User's Manual ASP user manual Copyright © All rights reserved.
Failed to retrieve file