Home

^mmg m m u - Altair 8800 Clone

image

Contents

1. ee w 9 i P e oaa He a o e s 2 2 2 ii 5 Ne e e e ec 9 5 ew c Qu oe we u e c9 2 we we wo we 5 e ee ee o o o see sesso oe 9 3 oo e ee ooo 5 oe asea ea oe see e ees s 99 9 9 eea c i e lt ses s e 9 2 oe we oo e 9 952 52 2 9 2 oo lt sba e 99 o c 5 ee oe 9 t ew e e 9 9 oe 5 5 ew 5212 9 9 se e sss se es so e 19 c o 72 79 5 e ase oo o eee osso os e 9 9 52 9 5 a t 9 we 94 45 45 27 21 103 119 187 122 131 Random read e o Random write 22 2020 Range 5 7 5 Read 4 eo 5 5 o 6 9 on Record number 20 Relative address Relocatable file Relocatable load module Relocatable object code module Rename s TR TBC 67 R 6 Replace command ED17 Dra gt Request Control Block RQCB E Return address lt Rubout s ss n n S command EDIT S command LINK ve S subcommand EDIT 4 X o cA SAV command SYSENT sesos ooo o Save e ot on Sector 2 o 0 4 Sense switch 2 o Sequential file Source code
2. 1 The content of register r is moved to the memory io cation whose address is in registers H and L 0 1 1 1 0 Cyctes 2 States 7 Addressing reg indirect Flag none MV r data Move Immediate r byte 2 The content of byte 2 of the instruction is moved to register r J Cycles 2 States 7 Addressing immediate Flags none MVI M data Move to memory immediate H L lt byte 2 The content of byte 2 of the instruction is moved to the memory location whose address is in registers H and L Cycles 3 States 10 Addressing immed reg indirect Flags none i LXI rp data 16 Load register pair immediate rh byte 3 ri byte 2 Byte 3 of the instruction is moved into the high order register rh of the register pair rp Byte 2 of the in struction is moved into the low order register ri of the register pair rp high order data Cycles 3 y 10 States Addressing immediate Flags none 208 June 1977 LDA addr Load Accumulator direct A byte 3 byte 2 The content of the memory location whose address is specified in byte 2 and byte 3 of the instruction is C moved to register A low order addr high order addr Cycles 4 States 13 Addressing direct Flags none STA addr Store Accumulator direct byte 3 byte 22 A The content of the accumulator is moved to the memory location whose ad
3. AAI msg rare SYSTEM DOCUMENTATION MITS Inc 1977 First Printing June 1977 2450 Alamo S E Albuquerque New Mexico 87106 TABLE OF CONTENTS Section Page 1 INTRODUCTION Sho Sayles deci Tae RAE M p vr ac N es 1 1 1 Introduction to this Manual 1 eee eee s aD UR 3 1 2 Loading and Initializing DIS ve eee ee eae n 3 1 3 Program Development Procedure es 9 1 4 Notation and Definitions 2 2 sosa eoa eeo 14 1 5 DOS Input Conventions ee ee eee E Coi A 17 2 MONITOR VU div da er Ud S es a a T9 2 1 Introduction to the Monitor vv em del 2 2 Input from the Console Vibe gh ove TREE 2 3 Monitor Commands eee UP PIECE 23 2 4 Monitor Error Messages eov orte e M CRECEN 25 2 5 File Name Conventions eor o ot on ng 28 3 TEXT EDITOR mI RIPE Pr a Sal 3 1 Introduction ee ee et tee ee we we 5 n s 33 3 2 Edit Commands S 00 Re o P E EE 4 ASSEMBLER 4 3a 5 wong x Pow Ote dom ee i wu y d E 4 1 Statements 4 n n woes ie usa 46 4 2 Addresses nn as uu d 4 3 Op Codes eee ee ee ee nn a egy ae tok fares 52 4 4 Assembler Error Messages ee ee e we es A 5 LINKING LOADER Ce 1 we ee ee 73 5 1 Introduction sa 4 4 e on o o on o 9 onn ot n9 75 5 2 Address Chaining M P 77 5
4. we we we s 48 Definitions s ne 14 Delete command EDIT E ee E TE 36 D lete sr wen v 4o UE ve ie e a s O Delimiter o e n o t ot o ww 9 ng 18 23 PET e on Se cae ere M OS a KaR A A 219 23 Device table s or o on on on 25 Directory track e s e e ew on B osos o 182 J Directory e e w soe eom a o e eco 9 sca voc w w 109 DoS 128 d June 1977 Disk Boot Lo der Disk Full Disk Loader Disk format Dismount E command EDIT E command LINK E error EDIT END sss ENDIF 2 ENTRY 0 EQU sss EXIT suseso EXT coo a Editor Editor Editor Enable End of file E backup file source file D Error code Monitor Error messages Monitor Explicit address External address External reference F command EDIT F error 2 File 4 File ASCII File absolute File random File relocatable File File File File absolute listing File File File File File File File File File random Link Error mode name number table Finding a string Format o disk relocatable sequential Copy utility LE Editor backup Editor source Front panel switches G command DEBUG Get character 505 June 1977 ee 97979 osos s
5. Cycles States Addressing reg indirect Flags none E XCHG Exchange H and L with D and E H D L E The contents of registers H and L are exchanged with the contents of registers D and E oli lo fa 4 1 1 1 Cycles 1 States 4 Addressing register Flags none 57 Arithmetic Group This group of instructions performs arithmetic oper ations on data in registers and memory Unless indicated otherwise all instructions in this group affect the Zero Sign Parity Carry and Auxiliary Carry flags according to the standard rules All 4ubtraction operations are performed via two s complement arithmetic and set the carry flag to one to in dicate a borrow and clear it to indicate no borrow ADDr Add Register A A r The content of register r is added to the content of the _ accumulator The result is placed in the accumulator o s s s Cycles 1 States 4 Addressing register Flags Z S P CY AC 1 0 0 0 ADD M Add memory A lt A H L The content of the memory location whose address is contained in the H and L registers is added to the content of the accumulator The resuit is placed in the accumulator Cycles 2 States 7 Addressing reg indirect Flags Z 5 P CY AC ADI data Add immediate A A byte 2 The content of the second byte of the instruction is added to the content of the accumulator The result is p
6. SP 1 PCH HSP 2 PCL SP SP 2 PC byte 3 byte 2 The high order eight bits of the next instruction ad dress are moved to the memory location whose address is one less than the content of register SP The low order eight bits of the next instruction ad dress are moved to the memory location whose address is two less than the content of register SP The content of register SP is decremented by 2 Con trol is transferred to the instruction whose address is specified in byte 3 and byte 2 of the current instruction Cycles 5 States 17 Addressing immediate reg indirect Flags none Ccondition addr Condition call If CCC SP 1 PCH SP 2 PCL SP SP 2 PC lt byte 3 byte 2 If the specified condition is true the actions specified in the CALL instruction see above are performed otherwise control continues sequentially low order addr high order addr Cycles 3 5 States 11 17 Addressing immediate reg indirect Flags none RET Return PCL SP PCH SP 1 SP SP 2 The content of the memory location whose address is specified in register SP is moved to the low order eight bits of register PC The content of the memory location whose address is one more than the content of register SP is moved to the high order eight bits of register PC The cont
7. address at which to load relocatable module gt S device X execution address 76 Table 5 A Linking Loader Commands Lo ds a module at the specified address The module is loaded from the specified disk The module must be in LINK s relocatable code format If the loading address is not specified the default address is 240004 for the first module to be loaded and the next available location above the previous module for all subsequent modules The L command automatically adds a to the file name For an example of the use of the L command see Appendix E Section 2 Displays the names in all of the currently loaded modules and their assigned addresses Undefined names J are displayed with asterisks instead of addresses Displays all undefined names in all current modules For each undefined entry point name LINK searches the specified device for a relocatable file by that name and loads it For an example of the use of the S command see Appendix E Section 2 Exits to the Monitor Begins execution of the program at execution address If the execution address is omitted X branches to the address in the 005 June 1977 C last encountered END statement If no END statement has been en countered X branches to location 24000 5 2 Address Chaining Each time LINK encounters a reference to a symbol that has not yet been defined it enters the address of the r
8. Line e e s Line feed seo Linking Loader LISE s 210 5 x eos Listing file Load switch Loading DOS Load M error MNT command 130 or oe we ae ee se o eee gt ss oa o e e 0 0 a a o oe eee s e oe eee oe ee ee ee eee eee oe 9 s e e o oe ee ee ot n oe awe ee c9 79 o v o s e ea s oe ee ee e we 008 June 1977 USG a e 2 Machine language Memory error Mnemonic Mode mismatch Monitor Monitor Calls Monitor commands Monitor error mes Mount oe 7 5 N command EDIT N error Name Notation O error Object code o 2 c5 eo e s o s on 9 n Object code module Octal address Opcode o Opcode list Open s Operand Overlay error P command DEBUG P command EDIT P error Page Paging commands Paper tape Phase Error Program Developmen Program Program system Program user Program point Prompt Pseudo ops Put character Q command DEBUG Q command EDIT Q error R command EDIT R subcommand EDI REN command qe RQCB address RUN command Random block Random file DOS June 1977 a ee ew we we Qe we ew o t o ec 2 c c c Dec nt
9. M Memory error Data from the disk does not store properly The location at which the error occurred is stored at locations 1 and 2 absolute 0 Overlay error An attempt was made to load data over the loader I Invalid Load Device The setting of the sense switches is incorrect C When the Monitor has been loaded correctly it responds with the first initialization question MEMORY SIZE l Here the programmer may specify the amount of memory in bytes to be used by DOS Typing a carriage return or zero causes DOS to use all of the read write memory in the system The next question is INTERRUPTS Typing Y enables input interrupts and Typing N or carriage return disables them If interrupts are enabled special characters may be used to control program execution NOTE Input interrupt features may be used only if the input inter face board is strapped to accept interrupts See Section 2 2 for information on 1 0 interrupts If interrupts are not strapped the answer to the INTERRUPTS question must be N 4 j 008 June 1977 The next question is HIGHEST DISK NUMBER to which the programmer responds with zero if there is one disk in the system 1 if there are two disks and so on The next question is HOW MANY DISK FILES to which the programmer responds with the number of disk files both sequential and random to be open simultaneously Responding with a carriage return sets the number of files at zero Finally D
10. 6 for disk Device number Mount 40 Same as MNT command Save l 106 Load 100 Byte 40 4 Qi 4 m On ore 110 Function Kind of device 6 for disk Device number Same as SAV command Function Kind of device 6 for disk 0 for Teletype Device number Address of 8 byte file name Same as LOA command Function Kind of device 0 for Teletype 1 for cassette tape 6 for floppy disk device number address of 8 byte file number address of first byte to be saved address of last byte to be saved starting address DOS June 1277 APPENDIX D ABSOLUTE LOAD TAPE FORMAT Cy The paper tape dump of an object program consists of 3 records The Begin Name record is first and carries the name of the program and comments version number date etc The program records follow the Begin Name record The last record is an end of file record The formats of the records are as follows A Begin Name Record Byte 1 125Q Begin record sync byte 2 4 Name Program name 5 N 15Q Terminates the Begin Name record 8 Program Record Byte 1 74Q Program record sync byte 2 Number of bytes in this record 3 4 Load Address Low order byte is first 5 N Program Data N 5 Checksum 11 bytes except the first two are added with no carry to generate a checksum byte used to detect load C errors C End of File Record Byte 1 1700 EOF Record sync byte 2 3 Begin Execution Address C 00S J
11. Cycles 1 States 4 Flags CY Cy Branch Group This group of instructions alter normai sequential program flow Condition flags are not affected by any instruction in this group The two types of branch instructions are uncondi tional and conditional Unconditional transfers simply per form the specified operation on register PC the program counter Conditional transfers examine the status of one of the four processor f ags to determine if the specified branch is to be executed The conditions that may be specified are as follows CONDITION ccc NZ not zero Z 0 000 Z zero Z 1 001 NC no carry CY 0 010 C carry CY 1 011 PO parity odd P 0 100 PE parity even P 1 101 P plus S 0 110 M minus S 1 111 es JMP addr Jump PC byte 3 byte 2 Control is transferred to the instruction whose ad 098 June 1977 dress is specified in byte 3 and byte 2 of the current instruction low order addr high order addr Cycles 3 States 10 Addressing immediate Flags none Jcondition addr Conditional jump if CCC PC byte 3 byte 2 If the specified condition is true control is trans ferred to the instruction whose addrass is specified in byte 3 and byte 2 of the current instruction other wise control continues sequentially iow order addr high order addr Cycles 3 States 10 Addressing immediate Flags none CALL addr Cali
12. automatically so that the next line can be entered This process continues until all the lines of the program have been entered 00340 PROD DB 0 0 cr 00350 END lt cr gt 00360 lt cr gt To stop the generation of line numbers type a null line just a cr The Editor prints an asterisk to indicate it is ready to accept new commands To check the file in order to make sure it has been entered without error type p This prints all of the lines on the current page with their line numbers In this example there is only one page see paging commands p 40 for an explanation of program pages so the P command prints the whole file The output appears as follows NS 00100 LDA IER 00110 LHLD CAND 00120 SHFTR RAR 00130 SHFTR RAR 00240 CAND DB 64 00250 PROD DB 0 0 20s June 1977 en en me C Suppose the line at 120 was inadvertantly entered again at line 130 To eliminate one of them use the D for Delete command E D 130 lt cr gt de u It is not necessary to type the leading zeros in the line number To add another line between number 100 and 110 use the I for Insert command 1 100 00105 A COMMENT LINE lt cr gt 00107 cr The line number specified is that of the existing line imme diately before the desired position of the new line The A Editor generates a line number halfway between the two existing lines After typing the new line a lt cr gt causes another number to be g
13. 0015098 SET UP INPUT FILE 9016008 201708 CALL MSG TEL OPR WHATS GOING ON 991500 DW SETUIN 001990 CALL DTYP INPUT DEVICE TYPE 002000 STA DTIN 902100 CALL DN DEVICE NUMBER 992294 STA DNIN d 202399 CALL ASK FILE NAME 2024980 DW ASFNM Pd 202580 LXI D FNIN PUT IT AWAY l DOS bi June 1977 O 002600 0202720 002800 002900 203900 903130 003200 003300 003400 903599 903519 203690 283798 003800 003900 004000 004100 004200 004306 004400 004500 004600 804780 004800 004900 005009 005100 005200 005390 905499 005500 205600 205700 205300 905900 006000 806100 006292 006300 006318 006400 206500 006600 006708 006808 006900 007800 907190 907290 007390 207400 008 June 1977 CALL CALL DW LDA ORA JNZ LDA CPI JNZ LXI SHLD CALL DW JMP CHRIN LXI SHLD MOV8 10 RBINOP STINOP A NOINOP DTIN 6 CBRIN H BLKGC GCROUT io BLGCRB SETO H CHRGC GCROUT SET UP OUTPUT FILE SETO CALL DW CALL STA CALL STA CALL DW LXI CALL CALL DW LDA MSG SETUOU DTYP DTOU DN DNOU ASK ASFNM D FNOU MOV8 10 RBOUOP STOUOP A NOOUOP DTOU 6 CHROU H BLKPC PCROUT Io BLPCRB MINIT H CHRPC PCROUT ILD OLD OPEN FILE CHECK STATUS UNABLE TO OPEN IS INPUT DEVICE A DISK NO DO INPUT 3Y CHARACTERS SET UP GC FOR BLOCK INPUT ROUTINE SET U BLOCK GET POINTERS GO SEY UP OUTPUT USE CHRGC xOUTINE H TELL OPR WHATS GOING O
14. 1 byte is transferred into the buffer Use of Block Input in this 50s June 1977 107 way may save programming effort but Get Character is much faster and more efficient f Block Output Writes a sector 128 bytes to a ai disk file Returns the addresses of the first byte of the next 128 byte buffer to be written and the number of empty bytes in the buffer To write a block of data the Block Output routine is called to get pointers to the memory buffer The buffer is then filled with data to be output and the Block Output rou tine is called again to write the data Each successive Block Output call returns pointers to be used by the next Block Output call Byte Function 3 File number 4 5 Pointer to the number of bytes left empty in the buffer When this number is zero the buffer is full 6 7 Address of the first byte in the buffer Block Output may be used to output data to a terminal In that case each Block Output call outputs one byte These Monitor calls are used in the following manner The Input or Output routine is called to get the pointers to the buffer In the Input case the buffer is filled with input data In the Output case the program must fill the buffer with data to be output As each byte is transferred either to or from the buffer the byte counter pointed to by bytes 4 and 5 is decremented When the counter reaches zero the transfer to or from the buffer is complete Calling Block O
15. 297 212 gi 212 031 pi4 pis 916 7 pep 921 222 223 20S June 1977 A9 up Octal Data 41 362 77 61 22 06 333 208 917 339 333 291 275 319 255 167 2060 351 283 209 123 ACR Load Sense Switches Bootstrap Loader Octal Address poo ant ppe 124 A9 A8 up Octal Data 241 392 977 261 222 200 333 9906 p7 330 333 297 275 319 255 167 399 351 293 DOS June 1977 C 223 4PIQ Load Sense Switches Bootstrap Loader Octal Address DAR pp 992 Bp3 ana pps 206 207 pip au 912 913 214 015 216 217 029 p21 222 23 p24 925 226 927 530 pa p32 233 934 cos June 1977 A 10 up ppp Octal Data 257 323 p4p 323 241 276 954 323 pap 241 392 977 261 p33 222 949 297 332 333 pa 275 319 p55 167 320 351 p14 Bop 125 126 blank amp 7 t on on n f d V ec oneri wr eee eps 2 error 8080 instruction L LU gt A command EDIT A command LINK A error 2000 ABORT 4 o ASCII Character Codes ASCII file Absolute address Absolute file Absolute load tape Address special Address Expression Address chaining Addresses Addressing mode Alter command Angle brackets Assembler ee ee ee e o Assembler listing Assembler pseudo ops Assembly Language B command EDIT
16. 3 Relocatable Object Code Module Format x ae 77 6 DEBUG i voe s eae T Ia Sei R L Ar 81 6 1 Introduction lt e drug Man Vae raa 83 6 2 Display rennen 87 6 3 Modify K ae O ds o ds de PME S 87 6 4 Breakpoints oum vsu ceo DE UE doe di bo Ce e vu 88 6 5 Controlling Execution eee o on on on n 89 6 6 Using Debug with Relocated Programs 1 ee eae 90 7 MISCELLANEOUS SYSTEM PROGRAMS 1 eee eoo or o oh on n n 91 I INIT AQ 3 ate GoW Shea e lA emere om URL 93 1e ENS 220g Dex AS peque ar CASS R ACID 93 l 73 SYSENT a wv RUE ELS VAS dade sem At o erre 93 2 SUL HIRE alc ee E es a od 95 c 005 June 1977 APPENDICES A ASCII Character Codes se ee e on n 99 B Disk Information ee te th te ew 101 C Monitor Calls e ea sew eee e on o on on on n o9 n9 n Voss 109 D Absolute Load Tape Format Ss Y E The File Copy Utility lt 0 112 F Bootstrap Loaders v2 ee or or n IN d INDEX force ce amp R R e Iw A ode A a ia ee 127 00s June 1977 ANAR DOS DOCUMENTATION SECTION MNTRODUCTION amp 1 INTRODUCTION 1 1 Introduction to This Manual The Altair Disk Operating System DOS is a system for developing and running Assembly Language programs It consists of a Monitor and several system programs The parts of this manual describe
17. Insert display and remove breakpoints to initiate pauses in program execution 4 Start execution of the program at any address or at any break point f A Running Debug After the system disk is mounted in drive zero Debug is entered from the Monitor by typing DEBUG Debug indicates that it is loaded and running by printing DOS DEBUG VER x x br on the terminal At this point it is ready to receive com mands The Monitor may be reentered by typing R B Addressing Modes Debug can display modify or transfer pro gram control to any point in memory In addition entry to Debug causes the registers and condition flags to be stored in memory making them available for display or modification Most of the Debug commands may be preceded by an address This address may be expressed in any one of several modes 1 Explicit Anywhere an address is expected a number is interpreted as an octal address A number preceded by a pound sign is interpreted as a decimal address The address is entered into an address pointer in Debug All commands operate on the location in the address pointer The current contents of the address pointer may be accessed by typing a period Thus Cs a 1 June 1977 83 84 the Debug command T displays the contents of the location whose address is currently in the address pointer The use of the period is optional in this case since and cause the same o
18. LESS 014700 LHLD BLGCDP GET POINTER TO DATA 014808 MOV A M GET DATA 0149060 iNX H ADVANCE POINTER 615000 SHLD BLGCDP PUT POINTER AWAY 015180 POP H RESTORE H L 815299 JMP GDEX TAKE NORMAL EXIT 015308 CHRGC POP H RESTORE H L 215400 CALL IO GET CHARACTER 015588 DW RBGC CHECK STATUS 215688 LDA STGC 0157068 CPI 925 EOF 0158900 JZ BDEX YES 31530 ORA A ERROR STATUS 016309 JNZ ABORT YES BAIL OUT 016100 LDA DAGC 816294 JMP GDEX Put character uses block output Monitor Calls to write data into the output file 916300 016409 PUT CHARACTER ROUTINES 816500 l 016600 PC PUSH H SAVE H L 816700 LHLD PCROUT GET ADDRESS OF ROUTINE TO USE S 117 sa 118 816860 016999 217090 017019 917149 917299 917328 017430 017500 017600 217790 017899 917999 218200 018180 218200 018300 018406 018500 918609 018790 013809 018900 019090 8019198 019209 0193060 019400 619596 019600 219709 219800 219904 020000 220100 220290 020300 020400 020580 220600 320799 029399 829900 821409 021190 221298 6213090 921408 021500 BLKPC BLKPCS CHRPC 3 uo L L E M se se Oro so se NOINOP NOOUOP MSNOIN MSNOOU PCHL PUSH LHLD MOV ORA JNZ CALL DW LDA ORA JNZ DCR LHLD POP MOV INX SHULD POP RET POP POSH STA CALL DW LDA JNZ POP RET RET RET RROR BAILOUTS CALL DW JMP CALL DW JMP DB JUMP TO IT PSW SAVE
19. LF Line Feed FF Form Feed CR Carriage Return DEL Rubout pps 100 i June 1977 C APPENDIX B DISK INFORMATION 1 FORMAT OF THE ALTAIR FLOPPY DISK Track Allocation 1 2 Track 0 5 6 69 70 71 76 Use DOS Memory Image Space for either Random or Sequential files Directory Track Space for Sequential files only Sector Format There are 32 sectors per track and 137 bytes per sector Of these bytes 128 are available for data storage Tracks 0 Byte 0 1 2 3 130 131 132 905 June 1977 Tracks 6 Byte 0 5 Use Track number 128 decimal Sixteen bit address of the next higher location in memory than the highest location saved on this sector 128 bytes of DOS code Stop byte 255 decimal Checksum Sum of the bytes 3 130 with no carry out 0f one byte 76 Use Most significant bit always on Contains track number plus 200 octal Sector number 17 MOD 32 File number from directory Zero means this sector is not part of any file If the sector is the first of a group of 8 sectors 0 means the whole group is free Number of data bytes written 0 to 128 This is always 128 for random file data blocks For random file index blocks this number is the number of groups allocated for this file Checksum Sum of bytes 3 134 with no carry out of one byte 101 Byte Use 5 6 Pointer to the next group of the file The first byte is the trac
20. Monitor s device independent Input Output system reduces pro gramming effort The programmer could write a different input or output routine for each 1 0 device used by a program But these device handler routines are incorporated into the M nitor so the programmer can perform the desired information transfer simply by calling the Monitor Monitor Calls are described in detail in Appendix C When DOS has been loaded and initialized the Monitor starts up and prints the following message DOS MONITOR VER x x This message is also printed when the Monitor is entered from another program The period indicates that the Monitor is ready to receive commands 2 2 Input from the Console Input from the console keyboard is handled by a central Monitor routine regardless of the system program that is running at the time This routine provides the following special characters and functions Rubout deletes the last character in the input buffer Typing Rubout causes a backslash N and the last Character in the buffer to be printed Subsequent Rubouts print the immediately previous character in the buffer When a character other than Rubout is typed a second backslash and the character are printed All the characters between the backslashes are deleted Backarrow same as Rubout 00s June 1977 21 Control R Control U Cr causes the current contents of the input buffer to J be printed on the console Example EXEMPLE
21. Source file EDIT Source listing Space we we Square brackets Starting address Statement s s s eea o Subcommand EDIT oe eo woo 8 System program s s T error e 9 9 9 9 9 e TASKNM e 2 on on on Terminal switch Text Editor EDIT Track oe eo 9 ww e U command LINK err ww ely v ie U error we ew ew e Uparrow Upper case 1 n User program sses V error SS Sats Joy t oe etus W command EDIT P ee s WEITE e en ne ie X command DEBUG ee X subcommand EDIT wot GU ue Y command DEBUG ngo d Ne e 132 e 9 ese oe s e 9 9 2 7 ew 5 oe we 9 we e o oe 92757 5 e se 52925225225 8 oe 9 1 9 oe o s e e sa ee ee ee we ew we es 000 oe e eee 9 ess c5 9 ew se oo ee ee ew i we ew we ee 9 9 wo o o eee we we s o e aoe so o se ee os o s es oe 9 wee e 28 2 we s ee 2 9 9251 e es ee o we 9 ee c e ess xas e e o oe we we 29 o s e oaos oeo 186 186 105 110 101 186 20S une 1977 5 Microsoft CP M BASIC Addendum to Microsoft BASIC Manual for Users of CP M Operating Systems A CP M version of BASIC ver 4 5 is now available
22. an Absolute mode address has the mode of the expression The difference of two expressions of the same mode is of Absolute mode 4 3 Op Codes Op codes are of two types One type the machine codes are the mnemonic expressions of the 8080 instructions These op codes and their associated operands are discussed in section A below which is reprinted from the Intel 8080 Microcomputer System Users Manual The Assembler can use any address expression to derive the required address for direct or immediate addressing instructions Register instructions can use any address expression as long as its value is the address of a register 0 7 absolute Before a register indirect mode instruction may be used the register pair must be loaded with an address Any address expression can be used to supply that address 005 52 June 1977 A computer no matter how sophisticated can only do what it is told to do One teils the computer what to do via a serias of coded instructions referred to as a Pro gram The realm of the programmer is referred to as Soft ware in contrast to the Hardware that comprises the actual computer equipment A computer s software refers to all of the programs that have been written for that computer When a computer is designed the engineers provide the Central Processing Unit CPU with the ability to per form a particular set of operations The CPU is designed such that a specific operation is pe
23. and all Data block reference addresses are subtracted from rather than added to the base Set Location Counter The address is loaded into the loading location counter Address Chain The current value of the loading location counter is placed in each element of the chain whose top element is the address Set Common Base The assigned address of the named Common block is the current Common base Chain 4 Call an External Name The name is placed into the loader table if it is not already there The address chain whose top element has the specified address is linked to the chain for the name if it has not yet been loaded or to the name if it has been loaded Define Entry Point The address is assigned to the named entry point Define Program Limit The address is that of the first location after the program End of Record This record indicates the end of the program being loaded and the end of data in this record A is the execution address End of Module End of load module Control re turns to the loader 79 80 Blank ALTAR DOS DOCUMENTATION SECTION Y DEBUG E 6 DEBUG PACKAGE 6 1 Introduction The Debug package is a system program which provides facilities for debugging Assembly Language programs Commands allow the following operations 1 Display the contents of memory locations registers or flags in several modes octal decimal etc Modify the contants of memory locations registers or flags
24. and sector number in each sector Zeros are written into each byte of each sector destroying any existing files and marking each sector as free The DOS disk is initialized at t e factory and must not be initialized again Doing so will destroy all system programs as well as user files 208 June 1977 23 Command DIR lt device gt DSM device list LOA file device MNT device list table for unused sectors REN old name new name device RUN file device SAV file device 1st location last location gt lt sa gt Function Prints a directory of the files on the indicated device See section 2 7 for an explanation of the file name conventions Dismounts the disks on the listed device or devices A disk must be dismounted before it is removed from a drive Failure to do so may cause file link errors the next time the disk is read Loads the named file into memory from the specified device The file must be an absolute binary file The LOA command automatically adds to the file name Mounts the disks on the specified devices The MNT command causes the system to read each specified diskette and creates a table of unused space When files are created or modified the system checks the This command must be given before the files on a disk may be accessed Renames the file old name on the specified device to have a name new name Loads the named file
25. are loaded into memory at the same time see page 71 EXT pseudo op The program that loads relocatable modules into memory and links their symbolic references to the proper addresses is called the Linking Loader LINK In the simplest case where an entire program is con tained in one module LINK loads the program into memory and causes control to jump to its starting address In the more complex case where several modules are to be loaded into memory and linked together to form a single large program LINK serves many functions It loads the modules and makes sure that bytes of a module are not destroyed by loading subsequent modules in over lapping locations It makes the connections between all external references and the addresses to which they refer It prints lists of those external references for which no addresses have been defined It can even search the disks for files to resolve these undefined references and automatically load them All of these functions are controlled by the Linking Loader s commands which are described in Table 5 A For an explanation of the use of LINK in this case see Appendix E If the system disk is mounted on drive zero the Linking Loader is loaded and run by typing the following command to the Monitor LINK l When LINK starts it prints the following message DOS LINK VER x x The asterisk means LINK is ready to receive commands 00s June 1977 75 L lt file gt lt device gt
26. asterisk as the first character of the file name or extension will match any file or any extension Examples FILES FILES BAS FILES B FILES TEST 8AS m Q 10 11 12 13 15 15 16 17 The LOF x function returns the number of records present in the last extent read or written usually by a PUT or GET CSAVE and CLOAD are not implemented LLIST and LPRINT assume a 132 character wide printer and write their output to the CP M LST device All filenames may include A or B as the first two characters to specify a disk drive otherwise the currently selected drive is used Filenames themselves follow the normal CP M naming conventions A default extension of BAS is used on LOAD SAVE MERGE and RUN filename commands if no appears n the filename and the filename is less than nine characters long The error messages DISK NOT MOUNTED DISK ALREADY MOUNTED OUT OF RANDOM BLOCKS and FILE LINK ERROR are not included in MBASIC The CONSOLE statement is not included To return to CP M use the SYSTEM command or state ment SYSTEM closes all files and then performs a CP M warm start Control C always returns to MBASIC not to CP M If you wish to change diskettes during MBASIC opera tion use RESET RESET closes all files and then forces CP M to re read all diskette directory infor mation Never remove diskettes while running MBASIC
27. code programming languages have been developed There 20s June 1977 are programs available which convert the programming lan guage instructions into machine code that can be inter preted by the processor One type of programming language is Assembly Lan guage A unique assembly language mnemonic is assigned to each of the computer s instructions The programmer can write a program called the Sourca Program using these mnemonics and certain operands the source program is then converted into machine instructions called the Object Code Each assembly language instruction is converted into one machine code instruction 1 or more bytes by an Assembler program Assembiy languages are usually ma chine dependant li e they are usuaily able to run on only one type of computer THE 8080 INSTRUCTION SET The 8080 instruction set includes five different types of instructions e Data Transfer Group move data between registers or between memory and registers e Arithmetic Group add subtract increment or decrement data in registers or in memory Logical Group AND OR EXCLUSIVE OR compare rotate or complement data in registers or in memory i e Branch Group conditional and unconditional jump instructions subroutine call instructions and return instructions f e Stack I O and Machine Control Group includes 1 0 instructions as weil as instructions far main taining the stack and internal contro
28. e 9 9 99 9 9 o eo a o a we oe eo we we se 929 9 2 9 85 o ee sss oso 9 oe 9 979 ee 5 s s a 9 2 e 9 ee eee 5 9 ee 9 9 9 ew 2 1 i f 5 1959 25 ee oe ee we ew ew 792 8 ver eee 9 we we s 2 2 29 9 i oe e s we oe es o oe o o e 9 Be we ww a oe 992 92 9 99 9 e ee ee 9 2 9 2 5 5 t roo 25 we 2 1 99 5 e 9 29297 o o eee ew ee s ss e e 5 ee ee se ew te ew we e e K se ee ee ss PHHH ee ss oe eee ee 9 n ee 9 9 9 9 ew o e oe ee ee we s ee oo o 27 191 109 101 89 107 129 H subcommand EDIT Handler table gt Bexadecimal address I command EDIT Xi subcommand EDIT I O Error o o I O Table I O modes DEBUG IFE 2220080086 INIT en 9 vus XO q s 34399 9b ow Ww wi Se increment so gt indirect addressing Initialize initializing DOS input conventions Input interrupt Insert command EDIT Instruction set 8080 Internal error interrupt input introduction e Invalid Load Device Er K subcommand EDIT L command EDIT L command LINK L error 6 GENE 4 a me rn LIST 6 n LOA command lt Label e
29. from Microsoft This version of BASIC is supplied on a standard size 3740 single density diskette The name of the file is MBASIC COM To run MBASIC bring up CP M and type the following A gt MBASIC lt carriage return gt The system will reply xxxx Bytes Free BASIC Version 4 5 CP M Version Copyright 1977 C by Microsoft Ok You are now ready to use MBASIC MBASIC is identical to Altair Disk BASIC version 4 1 with the following exceptions 1 MBASIC requires 17K of memory A 28K or larger CP M system is recommended 2 The initialization dialog has been replaced by a set of options which are placed after the MBASIC command to CP M The format of the command line Is A gt MBASIC filename F lt number of files gt M lt highest memory location Items enclosed in brackets are optional If filename is present MBASIC proceeds as if a RUN filename command were typed after initiali zation is complete A default extension of BAS is used if none is supplied and the filename is less than 9 characters long This allows BASIC programs to be executed in batch mode using the SUBMIT facility of CP M Such programs should in clude a SYSTEM statement see below to return to CP M when they have finished allowing the next program in the batch stream to execute If F lt number of files gt is present it sets the number of disk data files that may be open at any one time during the execution of a BASIC
30. from the specified device and runs it The file must be an absolute binary file A sign is automatically added to the file name Contents of memory from the first location to the last location are saved as an absolute binary file With the specified name A sign is automatically added to the file name causes execution to begin at sa Any subsequent RUN command If the input to the Monitor is not one of these commands the Monitor searches disk drive 0 for an absolute program file which has a name corresponding to the input The following system programs are run in this manner and run 24 If such a file is found it is loaded 005 June 1977 aaa eee Al ASM Assembler see chapter 4 EDIT Text Editor see chapter 3 C DEBUG Debug package see chapter 6 LINK Linking Loader see chapter 5 INIT Disk initialization program see chapter 7 CNS Console see chapter 7 Console allows the Monitor command console to be changed to another terminal Drive 0 must be mounted before running these programs 2 4 Monitor Error Messages When the Monitor detects an error in the execution of a command or a Monitor Call it prints an error message and terminates execution of the operation In the case of an error in a Monitor Call the error message is printed and control returns to the calling program Monitor error message contains the following information Error Code the error codes are given in Tab
31. if the device type is FDS it is sent to floppy disk The name of the listing disk file is the file name in the ASM command preceded by a percent sign The following message is printed on the terminal upon termination of the assembly XXXXX ERRORS DETECTED where xxxxx is the number in octal of errors encountered in the pro gram The machine language object code module that results from the Assembler s action is written on the same disk as the source code The name of the object code file is the file name preceded by an asterisk For example after the following command is executed ASM SOURCE O FDS 1 the object code file is named SOURCE and is written on disk 0 The listing of the source program is named SOURCE and resides on disk 1 When the assembly and listing are complete the Assembler prints ANY MORE ASSEMBLIES Typing Y causes the Assembler to start over and ask for the new file name device number and listing file parameters Thus another file may be assembled without reloading the assembler Typing N or cr exits the Assembler and returns control to the Monitor 4 Statements The fundamental unit of an Assembly Language program is the state ment whose form is as follows label op code lt operand gt lt operand gt comment The label is a tag by which other statements in the program can refer to this statement Not all statements in a program need to be labelled Since program executi
32. leftmost two lights represent the left digit If the data byte is correct go to step 16 If the data byte is not correct go to step 14 14 Put the correct value in switches AO A7 15 Depress DEPOSIT l 16 Depress EXAMINE NEXT 17 Check each successive byte by repeating steps 13 16 until the whole loader is checked 18 If there were any incorrect bytes check the whole loader again to see that they were corrected Now the paper tape or cassette labelled DISK LOADER can be read For the paper tape version put the tape in the reader and make sure it is positioned on the leader The leader is the section 2 of tape at the beginning with a series of 302g characters 3 of oe 005 June 1977 5 G W ON 0 co ny Ee TR VT e 8 holes punched For the cassette version put the cassette in the reader and make sure it is completely rewound 19 Put switches AO A15 in the down position 20 Raise EXAMINE 21 Enter the proper sense switch settings for the load and terminal devices in switches A8 A15 The rightmost four switches contain the load device setting and the leftmost switches contain the setting for the terminal devices Table 1 A shows both the octal sense switch setting and the load and terminal switches to be raised for each standard Altair system peripheral If a device is used for interface to the terminal the switches in the Ter minal Switches column must be raised If the device interfaces the
33. must be relocated to fit it Relative addresses are relocated by the action of the Linking Loader Unless otherwise specified all symbolic addresses names program points address expressions are in Relative mode To calculate a Relative mode address the Assembler calculates a displacement which the Linking Loader adds to a relocation base address when the program s loaded In this way the loader can load the program anywhere in memory and all the addresses bear the correct relation to each other An External mode address is one that refers to a location in another program A name must be mentioned in an EXT state ment before it can be used as an External mode address External addresses allow a program to use routines or data in another program 51 Data and Common mode addresses refer to separate blocks of memory locations that may or may not be contiguous with the programs which make the references Data mode addresses are so designated by being mentioned in a DAT statement Common mode items are designated by CMN statements The difference between Common and Data addresses is that Data addresses may only be referenced by the program in which they are defined whereas Common mode addresses are available to any program In addition several Common blocks can ex st simultaneously and be referred to by name In an address expression the constituent addresses may have different modes Any mode expression combined with
34. peripheral through which DOS is being loaded the Load Switches are raised Sense Switch Terminal Load Setting Switches Switches Channels 2510 2 stop bits 20 21 e 1 stop bit A12 20 21 CIAO Be A TA AR 3 AA A9 A8 4PTO Al4 A10 10 51 42 43 Aa ATOVAB Non Standard terminal 14 No terminai qu ec om el 22 Start the loading process If the load device is connected to the computer through an 88 SIO A B or C or an 88 PIO board start the tape reader and then press the RUN switch on the computer front panel For the 2SI0 or 4PIO boards press RUN and then start the reader For the ACR rewind and start the cassette Listen to the signal from the tape through an auxiliary earphone When the steady tone changes to a warble press RUN on the computer Dos 6 June 1977 If the checksum loader detects a loading error it turns on the Interrupt Enable light and stores the ASCII code of an error letter in memory location 0 The error letter is also transmitted over all terminal data channels If a terminal is connected to one of these ports it prints the error letter The error letters are as follows C Checksum error If the checksum on the DOS disk file does not equal the checksum generated by the loader C error results The error may not occur if the diskette is loaded again If it does occur three times consecu tively the loader tape or diskette is at fault and must be replaced
35. remains unchanged The condition flags are set as a result of the subtraction The Z flag is set to 1 if A r The CY flag is set to 1 if A lt r N i SENN Cycles 1 States 4 Addressing register Flags Z S P CY AC CMP M Compare memory A H U The content of the memory location whose address is contained in the H and L registers is subtracted from the accumulator The accumulator remains un changed The condition flags are set as a result of the subtraction The Z flag is set to 1 if A H L The CY flag is set to 1 if A lt UH LJ Cycles 2 States 7 Addressing reg indirect Flags 2Z S P CY AC CPI data Campare immediate A byte 2 The content of the second byte of the instruction is subtracted from the accumulator The condition flags are set by the result of the subtraction The Z flag is set to 1 if A byte 2 The CY flag is set to 1 if A byte 2 Cycles 2 States 7 Addressing immediate Flags Z S P CY AC RLC Rotate left Anti Ap Ag A7 CY lt A7 The content of the accumulator is rotated left one position The low order bit and the CY flag are both set to the value shifted aut of the high order bit posi tion Only the CY fiag is affected 0 0 0 0 0 1 1 1 Cycles 1 States 4 Flags CY 62 RRC Rotate right Ap An 1 CY Ag The content of the accumulator is rotated ri
36. s e o we ew ew ww on too gt co Checksum loader Close 20 a e HHE N L C mmenE e oo ee 1 9 L9 ee 47 Common address e we we wo n 52 Console ee e ee wo ww on n n 4 93 Constant address a ve is 47 Control GQ wor ee ee ee EI e Re AC VR Og 18 CONtEOL 6 9 9 o 4 X3 39 9 4 c v 17 Control 0 we ew er e o www oo on t n 18 Control Q 2 4 4 4 ernennen 18 Control R x es 4 4 ew eh een 17 Control 8 a 4 ee e o o ne 18 Control U s s 4 v 4 w R o IR 7 5 4 s 17 Control x D command EDIT we ew on tg n 36 D error 4 e ens 4 59 re Wow ow d Ww d se 9 71 D subcommand EDIT s ee 0 we we we 38 DATA e e a Oe 6 el 0 000 68 DB 4 6 4 9 w x a a a e a a a 69 DG vom dou les ee aa V Coe Dv len e M era ae Se 6 69 DEBUG e c9 c c t t n 09 9 5 83 DEL comman A UE re mom AE 23 DIN command e ow 23 DIR command e 0 on n n9 24 DSM command es s we we we we B tg ng 24 DE RL A AAA TAS ee AE A ae 1 69 DW e e 4 e e c 9 ee 2 t 5 7 ll 78 Data address s 6 2 ee ow xw Ww o ws 52 Decimal address 4
37. the instruction at location 5000 to be displayed Typing tab when the current location is the low order byte of a two byte address or the low order register of a register pair causes the address pointer to be loaded with the contents of both bytes of the address or the pair of registers Register When Debug is entered or when a breakpoint is encountered Debug stores the contents of the regis ters and condition flags in memory in the following order Register Remarks F Condition Flags Bit Meaning 0 Carry 2 Even Parity 4 Half Carry for decimal arithmetic 6 Zero 7 Sign One means the MSB of result was 1 A Accumulator C Note The low order register of a pair is first 8 E D L 85 H S Low order byte S High order byte Once a register has been opened typing Mine feed Or 4 causes the next or preceding register in the list to be accessed and displayed Dos 86 June 1977 6 2 Display U Typing the following command lt address gt where the address is in any mode causes Debug to display the contents of the specified location in the current 1 0 mode A I 0 Modes Debug displays the contents of locations in several modes which may be specified by the programmer The 1 0 mode is specified by typing dollar sign or lt ESCAPE gt lt Altmode gt on some terminals followed by a letter Letter 1 0 Mode 0 Octal D Decimal W Double byte octal Displays contents of
38. the next subcommand is executed deletes the rest of the line and inserts the string in its place The string is terminated either by Escape or by cr Qn some ter minals Altmode is used rather than Escape Terminating with Escape allows the Alter command to receive further subcommands cr exits Alter mode Typing H S NO Escape displays 0100 THAT S NO inserts the string before the next character The string is terminated either by Escape Altmode on some terminals or by cr Typing Escape allows further subcommands to be issued Typing cr exits Alter mode Typing ILINE cr dis plays DOS June 1977 0100 THAT S NO LINE and exits Alter mode u To demonstrate the remaining Alter subcommands the command A 100 cr is executed again This command reenters Alter mode on the same line as before and moves the current position to the beginning of the line nK character deletes everything up to but not including the nth occurrence of the character If the character does not exist or if there are fewer than n of them the subcommand does nothing Typing KO displays 0100 The effect of the subcommand is not apparent until the next subcommand is executed R lt string gt replaces the next character with the string The string is terminated by C Escape or cr Typing cr exits Alter mode Typing RSOME space Escape displays 0100 SOME nS character Skips ove
39. the various components of the system l Chapter 2 the Monitor The Monitor provides control and disk file management for all of DOS Monitor Input Output routines are avail able to any program running under DOS Chapter 3 the Text Editor The Editor EDIT creates modifies and saves ASCII coded files Typical Editor files include Assembly Language programs and data Chapter 4 the Assembler The Assembler ASM converts symbolic Assembly Language programs into relocatable machine code modules Chapter 5 the Linking Loader The Linking Loader LINK loads the relocatable object code modules into memory assigns addresses to symbols and resolves external references Chapter 6 Debug Debug is a versatile symbolic debugging program With Debug the programmer can interrupt execution of a program examine and modify the contents of register and memory locations Chapter 7 Miscellaneous System Programs Console CNS transfers command of the Monitor from one terminal device to another Initialize INIT allows the system parameters amount of memory number of disks etc to be changed without reloading the system 1 2 Loading and In tializing DOS When the computer is first turned on there is nothing of value in the semiconductor read write memory Therefore before DOS can be used the Monitor must be loaded from disk This requires another program the loader The loader may reside in read only memory or may be loaded from
40. unless you have given a RESET command The RESET statement takes the place of the MOUNT and UNLOAD statements in Altair BASIC MBASIC will operate properly on both Z 80 and 8080 systems MBASIC does not use any of the restart RST in struction vectors The FRCINT routine is located at 103 hex and the MAKINT routine at 105 hex add 1000 hex for ADDS versions These routines are used to convert the argument to an integer for assembly language sub routines 18 19 20 2 22 23 25 25 26 27 If the LEFTS or RIGHTS string functions have zero as the number of characters argument they will return the nuil length zero string The ERR Disk error function is not supported as CP M handles all disk error recovery Control H backspace deletes the last character typed and is echoed to the terminal RESTORE line number may now be used to set the DATA pointer to a specific line All error messages and prompts are printed with lower case characters when appropriate Control S may be used to cause program execution to pause In the suspended execution state control C will cause a return to BASIC s command level and any other character will cause the program to resume execution The EOF function may be used with random files If amp GET is done past end of file EOF will 1 This may be used to find the size of a file using a binary search or other algorithm LSET RSET may be
41. used on any string The previous restriction to FlELDed strings has been eliminated The string function INPUTS number of characters LZ file number gt may be used to read number of Characters from either the console or a disk file If the console is used for input no characters will be echoed and all control characters are passed through except Control C which is used to interrupt execution of the INPUTS function VARPTR lt file number returns the address of the disk data buffer for file file number 1 2 3 BASIC Reference Manual Addenda April 1977 Page 33 sub paragraph b LINE INPUT lt prompt string string variable name CHANGE TO LINE INPUT prompt string gt string variable Page 40 Paragraph S 3b line 9 The of the integer expression is the starting address of CHANGE TO The integer expression is the starting address of Page 41 Insert the following paragraphs between Paragraphs 3 and 4 ADDITION l The string returned by a call to USR with a string argument is that string the user s routine sets up in the descriptor Modifying D E does not affect the returned string Therefore the statement C USR A results in A also being set to the string assigned to C To avoid modifying A in this statement we would use C USR AS 1 so that the user s routine modifies the descriptor of a string temporary instead of the descrip
42. 1 0 1 0 1 1 1 0 Cycles 2 States 7 Addressing reg indirect Flags Z S P CY AC XRi data Exclusive OR immediate A A Y byte 2 The content of the second byte of the instruction is exclusive OR d with the content of the accumulator The resuit is placed in the accumulator The CY and AC flags are cleared Cycles 2 States 7 Addressing immediate 00 Flags Z S P CY AC June 1977 OBA r OR Register A A V r The content of register r is inclusive OR d with the content of the accumulator The result is piaced in the accumulator The CY and AC flags ara cleared 1 D 1 1 0 Cycles 1 States 4 Addressing register Flags Z 5 P CY AC ORAM OR memory A A V H L2 The content of the memory location whose address is contained in the H and L registers is inciusive OR d with the content of the accumulator The result is placed in the accumulator The CY and AC flags ara cleared 0 1 1 0 Cycles 2 States 7 Addressing reg indirect Flags 2Z S P CY AC ORI data OR Immediate A A V byte 2 i The content of the second byte of the instruction is inciusive OR d with the content of the accumulator The result is placed in the accumulator The CY and AC flags are cleared Cycles 2 States 7 Addressing immediate Flag 2 5 P CY AC CMPr Compare Register A n The content of register r is subtracted from the ac cumulator The accumulator
43. 30 Blank ALA DOS DOCUMENTATION O SECTION I TENT EDITOR Y 3 THE TEXT EDITOR 3 1 Introduction Although the Text Editor is primarily used to create nd maintain Assembly Language program files it can be used for any ASCII coded file EDIT is a line oriented Editor in that its commands operate on lines of text which are addressable by number Line numbers are assigned auto matically as the file is being created A special command allows auto matic renumbering of lines The Assembler ignores EDIT line numbers in its input file except when producing a source listing Once the system disk on drive 0 has been mounted with the MNT command EDIT may be loaded and run with the following command EDIT file device where file is the name of the file to be created or modified and device is the number of the disk where the file is stored When EDIT prints an asterisk it is ready to accept commands EDIT requires at least 2 disk files to be allocated at initialization The Text Editor is designed to minimize memory usage by dividing files into pages Only one page resides in memory at a time while the rest of the file remains on disk The number length and content of pages are completely under the programmer s control Access to the pages is sequential the paging commands refer to the next page in the file The B command always refers to the first page of the file so
44. 6 bits are to be loaded as a Common block reference address by adding the current Common base The next 9 bits are to be input as a control field and the following 16 bits as an address The 9 bit control field has the following format aannnxxxx where aa designates the type of the address aa 00 01 10 n Type Absolute Relocated relocation base is added before loading Data reference Data base is added before loading Common reference current Common base is added before loading nnn is the length in bytes of the program or common block name When nnn O the name is blank If a name is specified it immediately follows the address in the module xxxx is a 4 bit control field as follows XXXX 1 Action Define Common Size The address is interpreted as the size of the Common block that has the spec ified name This type of item may be preceded only by Define Entry Name items The program with the largest blank Common block must be loaded first All programs which refer to named Common blocks must define them to be the same size Define Data Size The address is interpreted as the size of the Data area If this item is pre ceded only by Define Entry Name and Define Common Size items normal memory allocation takes place 005 June 1977 1f however Data block references occur before this item is loaded the Data base is assigned to be the address of the first location from the top y of memory
45. B error Backarrow Backup file EDIT Bad File Number Binary file Block input Block output Bootstrap loader oe o e o o Breakpoint Byte 4 x 5 C command ED C error C subcommand CAN e 2 s 3 n D H des eee ms Ho NS a A AS poke 20S June 1977 e ee e ee e format oe es we eo o eee ee INDEX a o o o 8 o gt a gt ee ee P o eee o o 8 6 n e s o 8 PD PD e o e eee oe o e on oe 6 o 8 n sse o ee oe gt v e o gt 2 6 nm soe 8 eee o 8 e 9 9 29 9 5 2 ew ee e 95 9 s e c oe ew o oe i we oe 9 we oe ew o oe oss e oe e 951 5 eee ewe s 29 7 s o ee ee ee eee eee T oe we we ee ee esa o ee e ee s o oe 5 9 ee ee oe e eee oe a eee e 29 9 2 s o ss 9 97 s e 2 se ro pab 99 ee o eee eee oe ee ee eee es sobs oe ee ew o s eo we we s fee er 25217 s ee e ee e ee oe o e ee sso os ee 197 188 121 14 49 71 38 68 112 127 Carriage Return s een 14 Cassette 2 o o e o t o n Character address e s e wt Checksum error e e
46. DATA BLPCCP POINTER TO NUMBER OF BYTES LEFT IN BUFFE A M GET NUMBER OF BYTES LEFT A IS IT ZERO BLKPCS NO STUFF BYTE Io SET UP POINTERS FOR NEW BLOCK BLPCRB BLPCST CHECK STATUS A ABORT NO GOOD BAIL OUT M ONE LESS BYTE BLPCDP GET POINTER TO DATA PSW RESTORE DATA M A PUT DATA IN BUFFER H ADVANCE POINTER BLPCDP PUT POINTER AWAY H RESTORE 4 L ALL DONE H RESTORE H L PSW SAVE CHARACTER DAPC STORE CHARACTER I0 OUTPUT IT RBPC STPC CHECK STATUS ABORT PSW RESTORE CHARACTER ALL DONE AKE CARE OF LEADER ene PEE E D MSG MSHOIN ABORT MSG MSNOOU ABORT 815 812 INPUT FILE OPEN ERROR 015 812 OUTPUT FILE OPEN ERROR DOS June 1977 C The Calls 221600 221708 221309 021906 222999 222100 222290 2223900 0224800 222500 22600 422706 422894 022908 923000 023100 923208 223300 223400 823500 023600 023708 223898 023900 0240900 024190 224200 024390 924490 024500 024600 024704 024809 424908 825008 225108 225208 825380 825498 225500 225600 225798 025800 025999 026890 226010 226180 0262060 026308 226400 005 June 1377 following Reguest Control Blocks correspond to COP s Monitor OPEN INPUT FILE REQUEST BLOCK H OPEN W ERROR MSG SUPPRESSION RBINOP DB STINOP DS DB DB DTIN DS DNIN DS DW FNIN DS 0124 0290 1 STATUS 1 FIL NBR 148204 SEQ IN EXP DEV 1 DEV TYPE 1 DEV NBR FNIN PTR TO
47. E ALREADY OPEN An attempt was made to mount a disk which has already been mounted INTERNAL ERROR DOS became confused Please report the circumstances of this error to the MITS Inc Software Department OUT OF RANDOM BLOCKS All sectors allotted for random files have been filled FILE ALREADY OPEN An open operation was attempted on a file that was already open FILE NOT FOUND The file name referred to was not found on the Soest flag device TOO MANY FILES An attempt was made to create a file when the disk directory was already full MODE MISMATCH A command that expected a character string operand received a number or vice versa This error often occurs when the quotation marks are left out of a character string in a command l END OF FILE During a read operation an end of file mark was encountered before the read operation was complete DISK FULL All of the sectors of the disk have been used BAD RECORD NUMBER An attempt was made to refer to a random file record that was not in the specified file 27 June 1977 30 FILE TABLE FULL An attempt was made to have more than thirteen disk files or four 1 0 files open at one time 31 Unused 32 TOO MANY OPEN DISK FILES An attempt was made to open more disk files than were specified at initialization 33 FILE ALREADY EXISTS An attempt was made to name or rename a file with a name that already exists in the directory 2 5 File Name Conventions When a di
48. FILE NAME 8 FILE NAME OPEN OUTPUT FILE REQUEST BLOCK OPEN W ERROR MSG SUPPRESSION RBOUOP DB STOUOP DS DB DB DTOU DS DNOU DS DW FNOU DS 7 CHARACTER GET RBGC DB STGC DS DB DAGC DS CHARACTER PUT RBPC DB STPC DS DB DAPC DS REQUEST BLOCK BLGCRB DB BLGCST DS DB BLGCCP DS BLGCDP DS DS REQUEST BLOCK 0104 2200 1 STATUS 2 FILE NBR 2 0209 SEQ OUT EXP DEV 1 DEVICE TYPE 1 DEV NUMBER FNOU PTR TO FILE NAME 8 FILE NAME REQUEST BLOCK 2 CHRGET 1 STATUS 1 FILE NBR 1 DATA REQUEST BLOCK CHRPUT STATUS FILE NBR DATA Ea M Ka ds TO SET UP CHRGET POINTERS INTO D 8187 SET UP BLK GET POINTERS l STATUS BYTE 1 INPUT FILE NUMBER 2 POINTER TO NUMBER LEFT IN BLOCK 2 POINTER TO DATA 2 RESERVED FOR MONITOR TO SET UP CHRPUT POINTERS INTO D 119 120 226508 026600 926700 026800 026908 026910 227999 8271288 827239 927309 027409 227500 827600 027709 327800 827906 0288860 928100 028224 2283060 228400 928500 228600 028709 028809 228909 029000 The 029198 029299 029308 829400 929508 3296400 029788 029800 0299800 934000 r BLPCRB DB 8119 SET UP BLK PUT POINTERS BLPCST DS 1 STATUS BYTE DB 2 OUTPUT FILE NBR BLPCCP DS 2 POINTER TO SPACE H LEFT IN BLOCK BLPCDP DS 2 POINTER TO DATA DS 2 RESERVED FOR MONITOR 7 CHAR PUT W TAB EXPANSIION RBPC2 DB 2183 WRITE DS Bs S
49. LINEMENIL ELPMEMAMPLE Control R EXAMPLE In this example typing Rubout 10 t mes deleted the characters between the backslashes typing Control R displays the current appearance of the line clears the input buffer terminates a line of input The current contents of the line buffer are passed to the program and the line buffer is cleared If input interrupts are enabled the following special character functions are available Contro1 C Contro1 S Control Q Contro1 0 suspends execution of the current program and returns control to the Monitor temporarily suspends execution of a program until Control Q is typed causes execution of a program to be resumed after J a Control S allows execution to proceed normally but prevents output to the terminal No output is printed until another Control 0 is typed or another command is requested by the Monitor or Editor To enable interrupts on the older 1 0 interface boards PIO SIO A B C install a jumper from the IN interrupt line to PINT or if the Vector Interrupt board is in use to VI7 On newer interface boards 2S10 4PIO install the jumper between PINT or VI7 to the interrupt request line for the input channel DOS automatically assures that input interrupts are enabled For more information see the manual for the interface board in use 22 DOS June 1977 L 2 3 Monitor Commands The Monitor is directed to perform its fun
50. Monitor INIT then prints the question MEMORY SIZE and the initialization dialog proceeds exactly as it does when the sys tem is loaded see Section 1 2c p 7 7 2 CNS CNS allows the console through which the user issues commands to be changed to another terminal To use CNS type CNS channel sense switch to the Monitor where channel is the octal data channel number of the new console s 1 0 board and sense switch is the new 1 0 board s octal sense switch setting The data channel is the low order channel of the board and the sense switch settings are shown in Table 1 A on page 5 en For example to switch to a terminal using a 2SIO board with 2 stop bits through channel 20 the following command is typed CNS 20 0 7 3 SYSENT SYSENT is a system program file that contains addresses of several Monitor routines that are available for user program use The following routines are available ABORT exits to the Monitor and prints PROGRAM l l ABORTING on the terminal l EXIT exits to the Monitor and prints PROGRAM EXITING on the terminal ABORT and EXIT both return control from the program to the Monitor and close all files The program name is found in location TASKNM see below ABORT is generally used to exit under error conditions while EXIT is used under normal exit conditions 008 June 1977 l 92 10 allows access to the Monitor Call 1 0 routines The following sequence is used in t
51. N DEVICE TYPE DEVICE NUMBER FILE NAME PUT IT AWAY OPEN FILE CHECK STATUS UNABLE TO OPEN IS OUTPUT DEVICE DISK NO DO OUTPUT BY CHAR SET UP PC FOR BLOCK PUT ROUTINE SET UP BLOCK PUT POINTERS GO DO MISC INIT SET UP OUTPUT BY CHAR INPUT LEADER QUTPUT LEADER 115 116 The to copy 0907590 207699 887798 007898 807900 808000 008109 098209 008304 208408 208508 008600 2908700 208800 208900 209008 009120 009200 809309 909400 809588 889606 809798 009800 009980 910009 919100 919209 010300 018400 010508 010600 010709 019890 610908 811908 911180 811200 911210 211300 8114990 911590 211600 011700 2118908 0119900 012008 812100 412249 copy loops call the get character and put character routines binary bytes or ASCII coded characters MAIN COPY LOOPS 4 LDA FNIN GET FILE TYPE CPI mg EDIT SOURCE JZ ASCCOP YES IS ASCII FILE CPI S EDIT BACKUP FILE JZ ASCCOP YES IS ASCII FILE CPI a LISTING FILE JZ ASCCOP YES IS ASCII FILE NO MUST BE BINARY BINARY COPY LOOP BINCLl MVI 8 15 SET COUNTER BINCLP CALL GC GET CHARACTER DW BINEOF EOF ROUTINE CALL PC PUT BINARY BYTE CPI 3377 RUBOUT JNZ BINCLl NO RESET COUNTER amp LOOP DCR B ONE LESS RUBOUT TO GO JZ EXIT ALL DONE JMP BINCLP LOOP BINEOF MVi 8 15 ADD RUBOUT EOF MARKER MVI A 0377 RUBOUT BINEOL CALL PC OUTPUT RUBOUT DCR B ONE LESS T
52. NDIX C MONITOR CALLS Since the Monitor contains all the 1 0 routines for all of the peripheral devices in the system it is not necessary for the programmer to write 1 0 routines for each program Instead the program can call the Monitor to handle all input and output For this reason DOS 1 0 is device independent The programmer need not consider the idiosyncracies of individual 1 0 devices when a program is being written and the 1 0 device can be chosen at the time the program is executed The instruction sequence for calling the Monitor from an Assembly language routine is as follows CALL I0 310 IS DEFINED IN SYSENT DW Request Control Block address A SYSTEM PROGRAM FILE SEE SECTION 7 3 The Request Control Block RCB is a block of data which provides the U information the Monitor needs to perform the requested operation The first two bytes in every Request Control Block have the same significance The first byte is always the operation code byte which tells the Monitor the action being requested The second byte is a status byte which is set to zero if the operation is completed success fully and to a non zero value if an error occurred The error codes are in Appendix In the list that follows the Request Control Blocks for each 1 0 Monitor call are given beginning with the third byte When an RCB is constructed DB statements can be used to define the byte quantities and DW to define the two byte quantities This is b
53. O GO JNZ BiINEOl LOOP iP NOT DONE JMP EXIT ALL DONE ASCII COPY ASCCOP LDA DTOU CHECK DEVICE TYPE CPi 6 IS IT FDS JNZ ASCCL2 NO MUST EXPAND CTL I ETC ASCCL1 CALL GC GET CHARACTER DW ASCEOF EOF ROUTINE CALL PC OUTPUT ASC CHAR TO DISK E NO TAB EXPAND CPI 832 1S CHAR CTL 2 32 EXIT YES ALL DONE JMP ASCCLi NO LOOP ASCEOF MVI A 832 ADD CTL Z TO FILE CALL PC OUTPUT IT JMP EXIT ALL DONE ASCCL2 CALL sc GET CHARACTER DW ASCEOF EOF ROUTINE STA DAPC2 PUT CHAR AWAY CALL I0 OUTPUT IT COS June 1977 065 June 1 012309 DW RBPC2 312409 CPI 332 IS CHAR CTL 2 212590 JZ EXIT YES ALL DONE 0126908 JMP ASCCL2 NO LOOP Get character uses block input Monitor Calls to read data from the input file The routine checks for input errors and end of file marks 812700 012890 GET CHARACTER ROUTINES 212900 913000 GC PUSH H SAVE H L 213100 LHLD GCROUT GET ADDRESS OF ROUTINE TO USE 213299 PCH JUMP TO IT 813300 GCNWBL CALL IO SET UP POINTERS FOR NEW BLOCK 013409 DW BLGCRB 213598 LDA BLGCST CHECK STATUS 913690 CPi 225 IS IT EOF 013780 POP H RESTORE H L 2138060 JZ BDEX TAKE EOF EXIT 013999 PUSH H SAVE H L 214000 ORA A ANY ERRORS 014120 JNZ ABORT YES BAIL OUT 014200 BLKGC LHLD BLGCCP GET POINTER TO 914210 NUMBER OF BYTES LEFT 914300 MOV A M GET NBR BYTES LEFT 214400 ORA A 014500 J2 GCNWBL iS ZERO MUST GET ANOTHER BLOCK 014600 DCR M ONE
54. ON SET Summary of Processor Instructions E Instruction Cadal Clogk 21 Maemonic Description Oy Os Ds Oa 03 Dz Oy 0 Cycles RZ Return on zero 1 0 9 10 0 0 sn RNZ Return an no zero 1100020009 5n RP Return an gasitive tO SE GS 0 058 st RM Return on minut Jod 1 110 0 9 uy RPE Return on parity even 1 39 1 a 0 8 5711 RPO Return an parity add 1 1 t 0000 0 5 11 RST Restart It A AAI li 11 IN Input y 4 0 r ovg tT d 130 our Output LIS AL A US U ot 10 LX 8 Load immediate register 00 023 00 0 10 Pair 8 C LXI D Load immediate register 0 0 0 9 0 0 1 10 Pair D amp E LAL N Load immediate register o 0 1 0 0 0 01 10 Pair H amp L LX sP Laad immediate stack pointer 0 9 1 1 0 0 0 1 10 PUSH B Push register Pair 8 amp C an LIA 0 0 0 10 11 stack PUSH O Push register Pair O amp E on LE Q0 1 0 1 07 11 st ck PUSH H Push register Parr HA Lon Yd 108 10 1 n stack PUSH PSW Push A and Flags dn hn at EEE hE IB aE 11 n stack POPS Poo register pair 8 3 C off 11800000 10 stack POPO Poo register oair O amp E oif 11 0 12800 f 10 stack POP Pop register pair H amp L att 0171 09002007 10 stack POPPSW Pop A and Flags Mort 1 1000 10 off stack STA Siore A direct 0 0 1 tog 1 0 3 LDA Load A direct 9 0 t tf 0 1 0 13 XCHG Exchange OSE H amp L i i T3 1 tt 4 Rag stars XTHL Excnange top of stack 4 amp L vr 3102010 18 SPHL HAL o stack painter qood ode cr ocodw e 5 PCHL H 8 L to program counter 131 1 01400 f
55. OS asks HOW MANY RANDOM FILES Again the programmer responds with a number or with a carriage return which specifies zero random files To save time especially when a slow terminal is in use all of the initialization answers can be entered at once with the parameters separated by spaces For example MEMORY SIZE 0Y 120 tells 00S that it is to use all available memory input interrupts are enabled there are two disk drives in the system two sequential and 5 no random disk files are to be open at any given time When DOS has been properly initialized it prints the follow ing prompt message DOS MONITOR VER x x 4 om ge gt ere je The Monitor prints a period to indicate that it is now ready to receive commands cos June 1377 d L 1 3 Program Development Procedure DOS is designed to allow the translation of an Assembly language program on paper to an operating Machine Language program with a minimum of time and effort The process involves entering the Assembly language program into a disk file with the Text Editor translating the file to Machine language with the Assembler and loading the program into memory with the Linking Loader Before the process can proceed the disks in use must be mounted with the MNT command To mount disk 0 the following command is used MNT O cr l where cr means carriage return Other disks may be mounted in the same command by typing their numbers aft
56. TATUS DB 2 OUTPUT FILE NUMBER DB 9 ASCII DW DAPC2 PTR TO BUFFER DW 1 SIZE OF BUFFER DS 2 NUMBER TRANSFERED DAPC2 DS 1 DATA U MISC U GC ROUT DS 2 ADDRESS OF GC ROUTINE TO USE PCROUT DS 2 ADDRESS OF PC ROUTINE TO USE COPID DB 815 CR DB 912 PLE DC COPY FILE following are messages for the dialog with the operator ASFNM DB 015 DB 812 DC ENTER FILE NAME SETUIN DB 815 DB 812 DC SET UP iNPUT SETUOU D8 015 DB 812 DC SET UP OUTPUT END COP DOS June 1977 APPENDIX F BOOTSTRAP LOADERS C 2510 Load Sense Switches 2 stop bits none up 1 stop bit A8 up Bootstrap Loader Octal Address Octal Data 209 976 gal 293 92 323 293 222 994 276 995 QXX XX 21 for 2 stop bits 25 for 1 stop bit 06 323 297 929 912 p41 an 392 C 212 977 913 961 914 p32 pis ppo 916 333 217 222 929 217 921 320 222 333 923 921 224 275 825 319 926 p55 927 167 239 300 p31 351 932 213 C 933 DDD cos June 1977 121 PIO Load Sense Switches Bootstrap Loader Octal Address 200 ppl pp2 203 004 205 006 9007 pip au pi2 m3 pia 915 pte p7 pep 021 p22 223 224 122 A10 A8 up Octal Code g41 392 977 261 923 909 333 9p4 346 221 319 333 205 275 312 955 167 309 351 203 900 DOS _ June 1977 S10 Load Sense Switches Bootstrap Loader Octal Address 606 661 682 663 64 65 006
57. aded To load some of the required modules the following command may be typed S0 The S command adds asterisks to the undefined names and searches the specified disk for files with the resulting names When LINK finds Such a file it loads and links it Finally LINK prints a list of those entry names that are still undefined TSKNM MSG ze MOVs 10 EXIT ABORT l L 005 June 1977 113 114 Entry point MOV8 is contained in file MOVB so that it can be defined by the following command L MOVB O E The remaining entry names are in file SYSENT which is loaded with the following command L SYSENT 0 Now that all of the required modules are loaded and linked together the entire program is ready to be executed with the following command X The copy program starts up and prints its prompt questions as above COP LISTING The following statements define the entry point and external references 000100 ENTRY COP 000200 EXT EXIT ABORT 040300 EXT TASKNM MSG 0098449 EXT MOV8 IO 200598 EXT DTYP DN ASK 0080600 EXT GDEX BDEX 900780 000800 IDENTIFY PROGRAM AND SET RADIX 000980 801080 COP LXI H COPiD GET PRGID 801100 SHLD TASKNM PUT AWAY 001209 CALL MSG DISPLAY IT 001300 DW COP D The setup routines are basically a series of Monitor Calls They ask the operator for the file name and disk number open the required files and check to make sure everything is operating properly 9001400
58. as ETE mn Stack O and Machine Control Group FLAG WORD This group of instructions performs 170 manipulates the Stack and alters internal control flags D Og Ds Da D D2 Dy Do a ran s zo ajo rj rjcv Unless otherwise specified condition flags are not affected by any instructions in this group PUSH rp Push POP rp Pop PUSH PSW SP 1 rh HSP 2 rl SP SP 2 The content of the high order register of register pair rp is moved to the memory location whose address is one less than the content of register SP The content of the iow order register of register pair rp is moved to the memory location whose address is two less than the content of register SP The content of reg ister SP is decremented by 2 Note Register pair rp SP may not be specified ee aa Cycles 3 States 11 Addressing reg indirect Flag none Push processor status word SP 1 A SP 2 g CY SP 24 1 SP 2 9 P SP 2 3 0 SP 2 4 AC SP 216 0 SP 2 g 2 SP 2 7 S SP SP 2 The content of register A is moved to the memory location whose address is one less than register SP The contents of the condition flags are assembled into a processor status word and the word is moved to the memory location whose address is two less than the content of register SP The content of reg ister SP
59. been previously allocated An error results if a Random Read is performed on a se quential file Function File number Address of memory buffer Record number interpreted as an address Writes a 128 byte record into a random file The record is written from a 128 byte memory buffer An error results if a Random Write is performed to a sequential file DOS June 1977 C Byte Function 3 l File number 4 5 Address of memory buffer 6 7 Record number interpreted as an address Get Character Reads the next character 1 byte from an input file If the file is on disk it must be opened for input The first Get after Open reads the first character in the file Byte Function 3 File number 4 Byte reserved for the character to be read Put Character Writes a character 1 byte on an output file The character is added to the end of the file If it is a disk file the file must be opened for output first Byte Function 3 File number 4 Character to be written Block Input 1 Reads a sector 128 bytes from a disk file into a buffer in memory Returns the address of the first data byte in the buffer and a pointer to the number of bytes in the block Byte Function 3 File number 4 5 Pointer to number of bytes in the block 6 7 Pointer to first available data byte Block Input may be used to input data from a terminal In that case only
60. ctions by commands The general form of a Monitor command is as follows command code field field where the command code is the three letter designation of the command to be performed and the fields are the required operands for the Specific command The fields are separated by spaces tabs or other legal delimiters If insufficient information is given in the operand fields for a given command the Monitor asks for the missing information and will not proceed until the information is typed If the Monitor cannot execute the requested command it prints an error message which indicates the reason the command could not be executed The following abbreviations and definitions are used in the des criptions of the Monitor commands delimiter characters that separate the fields in a command Legal delimiters are space tab Control I comma semicolon and colon device number of the device to be used in the command action The Monitor at present supports only floppy disk drives in the commands so the term device is interchangeable with the term drive number file name of the data or program file on which the command action is to be performed list a series of device numbers or file names separated by delimiters Table 2 A Monitor Commands Command Function DEL lt file gt lt device gt deletes the named file from the indicated device DIN lt device gt lt list gt initializes the listed disk drives by writing the track
61. current location typed as Control I ESCAPE are special and terminate input even though they have no specific function in this context Input is interpreted according to the current 1 0 mode If the input cannot be interpreted is printed on the terminal and the command must be repeated 6 4 Breakpoints Breakpoints provide the ability to pause in the execution of a program at any point and examine the contents of memory locations registers and condition flags A breakpoint is set by the X command which has the following form address X This command sets the next available breakpoint at the specified address Eight breakpoints are available numbered 0 7 When a breakpoint is encountered during execution of the program the following message is printed on the terminal number BREAKG address Execution is suspended until it is restarted by a P or G command The positions of all the breakpoints in use can be displayed by the Q command Q lt cr gt DOS 88 June 1977 Example 10X 20X 377 Q 0 10 1 e 20 2 377 Any or all breakpoints may be removed by the Y command Y or Y lt number gt If no number is specified all breakpoints are removed If a number is specified only that breakpoint is removed 6 5 Controlling Execution Debug may be used to control the execution of a program by means of the G and P commands A 00S June 1977 The G C
62. dress is specified in byte 2 and byte 3 of the instruction Cycies 4 States 13 Addressing direct Flags none LHLD addr Laad H and L direct L byte 3 byte 2 H byte 3I byte 2 1 The content of the memory location whose address is specified in byte 2 and byte 3 of the instruction is moved to register L The content of the memory loca tion at the succeeding address is moved to register H 3 Cycles 5 States 16 Addressing direct Flag none 005 June 1977 SHLD addr Store H and L direct byte 3 byte 2 U byte 3 byte 2 1 Hi The content of register L is moved to the memory lo cation whose address is specified in byte 2 and byte 3 The content of register H is moved to the succeed ing memory location low order addr high order addr Cycles 5 States 16 Addressing direct Flags none LDAX rp Load accumulator indirect A rp The content of the memory location whose address is in the register pair rp is moved to register A Note only register pairs rp B registers 8 and C or rp D registers D and E may be specified Cycles 2 States 7 Addressing reg indirect Flags none STAX rn Store accumulator indirect rp lt A The content of register A is moved to the memory lo cation whose address is in the register pair rp Note only register pairs rp B registers B and C or rp D registers D and E may be specified
63. ecause the two byte quantities are interpreted as addresses and must conform to the 8080 s format for addresses first byte is the low order byte 1 0 MONITOR CALLS C cos Juna 1977 103 Operation Open 104 Code 104 Description Prepares a file for input or output Assigns a file number to the file A file must be opened before infor mation can be transferred to or from it The next Read or Get operation after Open begins with the first byte in the file Function File number The file is referred to by this number until it is closed File type The bits of the file type byte have the following signi ficance 0 sequential input sequential output 2 random Open for input and out put simultaneously 7 explicit device specification If bit 7 is on transfer takes place through the device speci fied in bytes 5 and 6 Other wise bytes 5 and 6 are ignored and transfer takes place through the last device used for this file Note Bit 0 is the least signi ficant bit Only one bit may be on at one time Kind of Device 0 Teletype cassette tape 6 floppy disk Device number Address of file name area 005 June 1977 Ends the connection between a file number and a file Normal exit from a system program or jumping to loca tion zero causes all files to be closed Function File number Reads amp number of bytes
64. efer to the fourth location after the location labelled LOC the following expression can be used LOC 4 Expressions of this form are called address expressions Address expressions may be comprised of any of the following Name Constant Program point reference Address expression constant The sixteen bit values of the names constants program point references and address expression are combined and truncated to 16 bits to form the value of the final address expression 005 June 1377 J Es DOS June 1977 Example SHIFT 5 A 010 LOC X F Special Addresses The DOS Assembler allows certain addresses to be referred to directly with special notation indicates the present contents of the location counter That is refers to the address of the current instruc tion or the current data address Registers may be addressed symbolically by name There fore such instructions as MOV HA are interpreted to refer to the correct registers Addressing Modes The addresses of statements or data loca tions are specified in one of five different modes The DOS Assembler addressing modes are Absolute Relative Common Data and External Absolute addresses are the actual hardware addresses of the designated locations Address constants in themselves not in address expressions refer to absolute mode addresses If an absolute mode address is specified all of the other addresses in the program
65. eference into a chain Each entry in the chain contains a pointer to the previous entry The last entry contains zero absolute When the symbol is defined LINK goes through the chain again from the last entry to the first replacing the contents of each entry with the assigned address of the symboi As a result of this process each reference to the symbol points to the cor rect address LINK handles external references by saving the unresolved chains from all of the modules The contents of the first entry in a chain for one module is the address of the top of the chain for the previously Toaded module The U command can be used to display the undefined symbols in all loaded modules 5 3 Relocatable Object Code Module Format The Assembler creates and LINK uses files which conform to the Relocatable Object Code Module format Each module consists of records of 1024 bits each A record is made up of a number of load items each one of which is preceded by at least one control bit A If the first bit is 0 the next eight bits are loaded as an absolute data byte If the first bit is 1 the next two bits are input as a control field as follows B Control Bits Action 01 The following 16 bits are loaded as relocated address after adding the relocation base address 10 The following 16 bits are to be loaded as a Data block reference address after adding the Data base 005 u June 1977 17 78 11 00 The following 1
66. endix F gi 4 N o n TM this The bootstrap loaders are entered on the front panel switches A7 AO Each switch has two positions up and down By convention up is designated as 1 and down as 0 Therefore the eight switches represent one byte of data Each group of three switches starting from the right can represent the digits 0 through 7 The leftmest two switches represent the digits 0 through 3 For example to enter the octal number 315 the switches AO through A7 are set to correspond to the following table DOS June 1977 Switch A A6 A5 A4 A3 A2 Al AQ Position up up down down up up down up Octal Digit 5 The data bytes of the loader programs are shown in octal and are to be entered on AO A7 in this manner To enter the programs Put switches AQ A15 in the down position Raise EXAMINE l Put the first loader program data byte in switches AO A7 Raise DEPOSIT Put the next data byte in AO A7 Depress DEPOSIT NEXT Repeat steps 8 and 9 for each successive data byte until the loader is completely entered Now check the loader to make sure it has been entered correctly 11 Put switches AO A15 in the down position 12 Raise EXAMINE 13 Check to see that the lights DO D7 correspond to the correct data byte for the first location A light on uw indicates 1 off means 0 The rightmost three lights correspond to the rightmost octal digit The next three lights represent the middle digit and the
67. enerated halfway between the inserted line and the next existing line New lines can be inserted in this U manner until there is no more room Insertion of new lines is stopped by typing null line When the file is in satisfactory form the Editor is exited by typing the following command E This makes all of the changes closes all of the files properly and provides a backup file The backup file is the edited file as 1t appeared before the latest series of changes were made If the edited file is unusable for some reason the backup may be used to replace it 2 When the program has been entered into a disk file with the Editor it may be submitted to the Assembler for translation into machine language The Assembler is loaded and run with the following command ASM cr The Assembler prints 7 DOS ASM VER x x S ENTER FILE NAME DOS June 1977 11 5 A The user enters the name of the Assembly language program file and a lt cr gt The Assembler then prints ENTER DEVICE NUMBER to which the user replies with the number of the disk drive on which the file resides and a lt cr gt At this point the Assembler proceeds immediately to assemble the program in the specified file In our example we can type ASM SAMP 0 cr to avoid having the computer ask for the file name and drive number The Assembler produces a file with the machine language program and a listing The listing is that of the source c
68. ent of register SP is incremented by 2 Cyctes 3 States 10 Addressing reg indirect Flags none Y Reondition Conditional return If CCC PCL lt SP PCH SP 1 SP SP 2 If the specified condition is true the actions specified in the RET instruction see above are performed otherwise control continues sequentially Cycles 1 3 States 5 11 Addressing reg indirect Flags none AA RSTn Restart SP 1 PCH SP 2 PCL SP SP 2 PC 8 NNN The high order eight bits of the next instruction ad dress are moved to the memory location whose address is one less than the content of register SP The low order eight bits of the next instruction ad dress are moved to the memory location whose address is two less than the content of register SP The content of register SP is decremented by two Control is transferred to the instruction whose ad dress is eight times the content of NNN Cycles 3 States 11 Addressing reg indirect Flags none 151413 12 11109 8 765 43 210 ojojo ojojojo o ojo N N N 0j0 0 Program Counter After Restart Jump H and L indirect move H and L to PC PCH H PCL LI The content of register H is moved to the high order eight bits of register PC The content of register L is moved to the low order eight bits of register PC PCHL Cycles 1 States 5 Addressing register Flags none c
69. er the zero separated by spaces Mounting the disk s tells DOS the location of all the files and free space on each disk If an attempt is made to run a program before the disk on which it is stored is mounted a PROGRAM NOT FOUND error will result b 1 The first step in program development is to enter the program into a disk file with the Text Editor The Editor is loaded from disk and run by the following command EDIT lt cr gt When it is loaded it prints DOS EDITOR VER x x ENTER FILE NAME to which the user replies with the name of the file to be entered or edited The editor then prints ENTER DEVICE NUMBER which is answered with the number of the disk drive where the file is stored Assume that an Assembly language program called SAMP is entered into a file on disk drive 0 The Editor is run with the fol lowing command EDIT SAMP 0 cr The file name SAMP and device number disk O can be entered in the EDIT command to avoid the necessity of asking the file name and device number The Editor searches disk drive 0 for a file name SAMP to edit If it finds no such file it prints the following messages DOS June 1977 10 CREATING FILE 00100 00100 is the number of the first line of the file Now all that is necessary is to enter the lines of the program 00100 LDA IER LOAD MULTIPLIER lt cr gt 00110 LHLD CAND LOAD MULTIPLICAND lt cr gt After each carriage return the next line number is generated
70. es in memory The character string form stores the ASCII codes of each character in successive bytes The two forms may be mixed in a single statement Character Constants are treated as character strings unless they are components of address expressions Define Character The characters in the string are stored one byte per character The high order bit of each byte is set to zero except for the last byte which has its high order bit set to 1 This arrangement allows quick searches for the end of the string The address expression e is evaluated and defines the num ber of bytes of space that are allocated The contents of the space are not affected All names used in e must be defined prior to the DS state ment 69 DW lt el gt e2 END lt e gt ENDIF ENTRY nl n2 EQU e 70 Define Word The address expres d sions el e2 are evaluated and stored as 16 bit two byte words The addresses conform to the 8080 address convention that the low order byte comes first and the high order byte comes second All addresses and address offsets are handled in this way so the DW statement must be used to define addresses END is the last statement of each program The address ex pression e is the execution address of the program Spec ifying e 0 absolute is equi valent to specifying no execu tion address d Terminates the conditional assembly started by a pre
71. ess constants are strings of decimal digits 0 9 without a leading zero The allowed range is 65536 to 65536 Examples 255 1024 23000 3 Hexadecimal address constants have the following form X hhhh where h is any hexadecimal digit 0 9 A F The allowed range is X FFFF to X FFFF Examples X FO00 X 2300 X oor 4 Character address constants have the following form nva where x is any ASCII character except The characters are translated into binary according to their ASCII codes and the resulting two byte quantity makes up the address Examp es al BZ ngu Labels When a statement is labelled the label is entered into the symbol table in the Assembler along with the address of the statement Any subsequent statement can then use the label to represent that address Two types of labels can be used in the DOS Assembler names and program points 90S dune 1977 A AA C Dos June 1977 Names are strings of up to 6 alphanumeric characters The first character must be a letter and the subsequent characters may be letters numbers or dollar signs Examples SHIFT LBL A OUT The usual use of labels is to refer to a statement by name For example SHIFT RAR JNC SHIFT The operand of the jump instruction tells the computer to branch back to the RAR rotate right instruction if there is no carry out of the shift If there is a carry execu tion proceeds with the next instruction after the j
72. ettlot see Cien Er cum 4 m a as Doe perde U mar nn e Zem ne rae ee ee I ee 0707 mev eem m 2450 Alamo SE Albuquerque NM 87106
73. except CY are Cycles 1 States 4 Addressing register Flags Z S P CY AC SBBM Subtract memory with borrow A lt A HH L CY affected 0 0 1 1 Cycles 3 i States 10 Addressing reg indirect 4 Flags Z S P AC Decrement Register 0 1 0 0 The content of the memory location whose address is contained in the H and L registers and the content of the CY flag are both subtracted from the accumula tor The result is placed in the accumulator qo5 og cg root pub qua ng Cycles 2 C States 7 Addressing reg indirect DOS Flags 2 5 P CY AC June 1977 DCRr 0 lt 1 1 i The content of register r is decremented by one i Note All condition flags except CY are affected re Cycles 1 States 5 j Addressing register Flag Z S P AC 59 DCRM Decrement memory UH L lt H L 1 The content of the memory location whose address is contained in the H and L registers is decremented by one Note Ail condition flags except CY are affected 0 0 1 1 0 1 0 1 Cycles 3 States 10 Addressing reg indirect Flags Z S P AC INX rp Increment register pair rh rl rh ri 1 The content of the register pair rp is incremented by one Note No condition flags are affected Cycles 1 States 5 Addressing register Flags none DCX rp Decrement register pair rh rt rh ri 1 The content of the regi
74. formats and functions In these descrip tions e designates an address expression and n designates a name All other notation conventions are the same as in the rest of the DOS manual Table 4 A DOS Assembler Pseudo Ops Instruction Format Description CMN block name nl lt n2 gt Common definition The names nl n2 are declared to be in the Common block with the designated block name If the block name is omitted Blank Jd Common is used Each name is assumed to require one byte unless it is written in the form N m where m is an address expres sion that gives the length in bytes of the area assigned to the name N If another CMN statement is encountered with the same block name the first address assigned by the second statement directly follows the last address assigned by the first statement DATA nl lt n2 gt The names nl n2 are 68 005 i June 1977 O aal C DB el e2 or DB character string gt 2 DC lt character string gt DS e 508 June 1977 defined to be in the Data area Each name is assumed to require one byte unless it has the form N m where m is an address expression that gives the length in bytes of the area assigned to N Define Byte The address expres sions el e2 are evaluated and stored in successive byt
75. from a sequential file either on disk or on another 1 0 device C 005 June 1977 Function File number Mode The bits of the mode byte have the following significance Bit 1 on Echo Prints all char acters as they are entered Bit 1 off no echo Bit 2 on ASCII Control R Control U and Rubout recognized input termin ates on cr Bit 2 off Absolute binary code Note Bit 0 is the least signifi cant bit Address of input buffer Number of bytes to be transferred two byte quantity interpreted as an address Number of bytes actually transferred interpreted as an address This operation begins by reading the next byte after the last byte to be read and reads the specified number of bytes 105 Writes a number of bytes into a file on a disk or another 1 0 device The bytes are written after the Tast byte in the file Random Read Random Write 106 Function File number Mode The bits of the mode byte have the following significance Bit 2 on ASCII Adds nulls to the end of the line expands tabs Bit 2 off Absolute Note Bit zero is the least signi ficant bit Address of write buffer Number of characters to be written interpreted as an address Number of bytes actually transferred interpreted as an address Reads a 128 byte record from a random file on disk The record is read into a 128 byte buffer in mem ory which must have
76. ght one position The high order bit and the CY flag are both set to the value shifted out of the low order bit gpsi tion Only the CY flag is affected Aq Ag 0 0 0 0 1 1 1 1 Cycles 1 States 4 Flags CY RAL Rotate left through carry An 1 lt Ap CY Az Ag CY The content of the accumulator is rotated left one position through the CY flag The low order bit is set equal to the CY flag and the CY flag is set to the value shifted out of the high order bit Only the CY flag is affected 0 0 0 1 0 1 1 1 Cycles 1 States 4 Flags CY J RAR Rotate right through carry Ap An 1 CY Ag A7 CY The content of the accumulator is rotated right one position through the CY flag The high order bit is set to the CY flag and the CY flag is set to the value shifted out of the low order bit Oniy the CY flag is affected 0 0 0 1 1 1 1 1 Cycles 1 States 4 Flags CY CMA Complement accumulator A A The contents of the accumulator are complemented zero bits become 1 one bits become 0 No flags are affected 0 0 1 0 1 1 1 1 Cycles 1 States 4 Flags ags none 005 June 1977 CMC C Complement carry cv CY The CY flag is complemented No other flags are affected 0 0 1 1 1 1 1 1 Cycles 1 States 4 Flags CY STC Set carry CY 1 The CY flag is set to 1 No other flags are affected 0 0 1 1 0 1 1 1
77. gnificant byte of this sum is the checksum At the end of the record it is compared with the checksum byte in the record If there is a discrepancy between them an error has occurred in loading the program and the Checksum Error message is printed MEMORY ERROR An attempt was made to write into a bad memory location This could be a non functioning read write memory location or a location in read only memory BAD FILE NUMBER A bad file number is one which has not been opened or which is greater than the number of files allocated at initialization FILE LINK ERROR During a disk file read a sector was read which did not belong to the file A FILE LINK ERROR often occurs after a disk has been removed from a drive without being dismounted first I 0 ERROR A checksum error occurred in 18 successive disk read operations A checksum error on a disk read causes the disk controller auto matically to re read the sector A Disk 1 0 Error indicates that 20s June 1977 13 14 15 20 21 22 23 24 25 26 27 00 the error is a permanent defect in the file disk or disk drive BAD FILE MODE A sequential operation was attempted on a random file or vice versa DEVICE NOT OPEN An attempt was made to input or output a file through a device which had not been opened to that file DEVICE NOT ENABLED The door of a disk drive has not been closed or the motor of the drive has not had time to come up to full speed DEVIC
78. had been omitted LINK would have asked for them This command causes LINK to load our file into memory beginning at location 24000 Other starting addresses can be specified see Linking Loader L command p s 13 1 4 ing notation conventions are used Information typed by the user is presented exactly as it is to be typed All punctuation and spacing must be observed 14 76 but the default value is adequate for our purposes The following command causes the program to be executed X cr This command causes control to be passed to whatever program begins at location 24000 Again other starting addresses can be specified see Linking Loader X command p 51 If the program does not run as expected and that is not improbable the program bugs can be tracked down by Debug For a description of the use of Debug see Section 6 p 83 Notation and Definitions In the specification of command formats and examples the follow lt gt Angle brackets enclose information that must be supplied by the user EJ Square brackets enclose information that is optional and may be specified by the user cr Carriage return ASCII 013 on most terminals cr is typed with the Return key Jj space a space ASCII code 032 Control x where x is a character is typed by holding down the Control key while typing the character In examples characters output by the computer are underlined The following defini
79. he Linking Loader can then load into memory Random files are organized as a series of records each of which may be accessed separately from the rest Each record has a unique number which may be used to read modify or write on any record in the file at any time The various system programs follow certain conven tions for file names See section 2 7 for an explan ation of these conventions Appendix E shows an example of the use of files in a DOS program 15 program prompt an ordered set of machine and or Assembler instruc tions that direct the computer to perform a given series of operations The two major classes of programs are system programs and user programs a system programs are stored on disk in absolute binary files and thus may be loaded and run simply by typing the program s name to the Monitor System programs run in memory imme diately above the Monitor and below user programs user programs are those programs that run in high memory above the system programs The usual pro cedure for developing user programs is to con struct them from one or more relocatable code modules produced by the Assembler and linked together by the Linking Loader For a discussion of relocatable modules see Section 5 3 page 77 When the Monitor or a system program takes control it prints a message indicating which program is running and whether it is ready to receive commands The Monitor prompts With a peri
80. he bit pattern designating one of the regis ter pairs 8 D H SP RP REGISTER PAIR 00 B C 01 D E 10 H L 11 SP June 1977 rh ri SP Tm The first high order register of a designated register pair The second low order register of a desig nated register pair 16 bit program counter register PCH and PCL are used to refer to the high order and tow order 8 bits respectively 16 bit stack pointer register SPH and SPL are used to refer to the high order and low order 8 bits respectively Bit m of the register r bits are number 7 through 0 from left to right Z SP CY AC The condition flags Eee NNN Zero Sign Parity Carry and Auxiliary Carry respectively The contents of the memory location or reg isters enclosed in the parentheses Is transferred to Logical AND Exclusive OR inclusive OR Addition Two s complement subtraction Multiplication ts exchanged with The one s complement e g A The restart number O through 7 The binary representation 000 through 111 for restart number 0 through 7 respectively Description Format The following pages provide a detailed description of the instruction set of the 8080 Each instruction is de scribed in the following manner 1 The MAC 80 assembler format consisting of the instruction mnemonic and operand fields is printed in BOLDFACE on the left side of the first line The name of the instruction is encl
81. he calling program CALL IO DW address of Request Control Block See Appendix C for more information on Monitor Calls and Request Control Blocks Two special routines are used to print text messages TASKNM MSG contains the address of the memory area where ABORT and EXIT find the name of the calling program The program name must be stored at this location before an ABORT or EXIT call is executed prints a user selected message on the terminal The following sequence is used CALL MSG DW address of first byte of message MSG prints the message bytes until it prints a byte with the most significant bit set to one Thus the message should be stored with a DC pseudo op To use the routine in SYSENT the desired names must be defined as External names in the calling program See EXT statement Table 4 A When the calling program is loaded into memory for execution SYSENT must also be loaded this purpose L SYSENT O The following Linking Loader command is used for This command loads SYSENT just above the user program 94 DOS June 1377 7 4 LIST C LIST is a BASIC language routine that allows DOS Assembler listing files to be printed on a line printer To use LIST BASIC must be run ning and the DOS disk must be mounted The following command runs LIST RUN LIST lt device number where the device number is that of the disk drive upon which the DOS disk is mounted LIST asks f
82. ines For a complete listing of the routines use COP to copy them to the terminal To do this specify the output device as TTY and copy the following routines amp DN amp TABLE amp ASK amp DTYP ACOP amp SYSENT amp LDEM amp CMPB 3MOVB amp AANS p DOS June 1977 2 To run the copy program from the Assembly Language source files on L the system disk it is first necessary to assemble all of the files in the list above To do this type the following command ASM COP 0 when the file is assembled ASM prints 000000 ERRORS DETECTED ANY MORE ASSEMBLIES The programmer replies to this question with the name of the next program to be assembled This process continues until all of the programs in the list have been assembled To load these modules into memory and link them together into the copy program the Link ing Loader is run with the following command LINK When LINK prints its prompt asterisk the main copy procram module COP can be run with the following command SL COP O At this point LINK loads the module into memory and resolves the references to all symbolic addresses Since numerous other symbols are as yet undefined DOS prints a list of these symbols as follows TSKNM MSG DTYP DN ASK MOV8 IO EXIT BDEX ke ABORT GDEX The asterisks after each file number indicate that the names are undefined These names are all those of entry points in the modules that have not been lo
83. instruction END for example this column is left blank If the source instruction defines the contents of memory DB or DW for example those contents appear in the object code column Source instructions that produce object code instructions LDA for example are repre sented by the octal instruction code and the address of the operand Addresses followed by an apostrophe are to be relo cated Their actual addresses are not determined until the program is Toaded into memory Finally the leftmost column is a list of the relative addresses of the object code instructions and memory areas If a letter precedes the address it indicates an error The letter desig nates the nature of the error and the position indicates the address where the error occurred A list of error letters and their meanings is in section 4 4 p 71 If an error is detected by the Assembler it can be corrected by reentering the Text Editor and making the necessary changes The ability to pass programs rapidly from the Text Editor to the Assembier and back makes DOS an extremely effective tool for writing and debugging Assembly language programs Finally the Linking Loader is used to load the program into memory and execute the program The Linking Loader is loaded typing the following command LINK er When the Linking Loader starts it prints DOS LINK VER 1 0 l To load the sample program type L SAMP 0 cr If the file name and drive number
84. is decremented by two Cycles 3 States 11 Addressing reg indirect Flags none 005 vung 1977 ri SP rh lt SP 1 SP SP 2 The content of the memory location whose address is specified by the content of register SP is moved to the low order register of register pair rp The content of the memory location whose address is ane more than the content of register SP is moved to the high order register of register pair rp The content af reg ister SP is incremented by 2 Note Register pair rp SP may not be specified Cycles 3 States 10 Addressing reg ind rect Flags none POP PSW Pop processor status word CY SP P lt SPMo AC lt SP g Z SP G S lt SP 7 A SP 1 SP SP 2 The content of the memory location whose address is specified by the content of register SP is used to restore the condition flags The content of the mem ory location whose address is one more than the content of register SP is moved to register A The content of register SP is incremented by 2 Cycles 3 States 10 Addressing reg indirect Flags Z S P CY AC i l XTHL Exchange stack top with H and L L SP H lt SP 1 The content of the L register is exchanged with the content of the memory location whose address is specified by the content of register SP The content of
85. is stored in successive memory locations with the least significant byte first followed by increasingly significant bytes The 8080 has four different modes for addressing data stored in memory or in registers e Direct Bytes 2 and 3 of the instruction contain the exact memory address of the data item the low order bits of the address are in byte 2 the high order bits in byte 3 Register The instruction specifies the register or register pair in which the data is located Register Indirect The instruction specifies a reg 54 ister pair which contains the memory address where the data is located the high order bits of the address are in the first register of the pair the low order bits in the second e immediate The instruction contains the data it self This is either an 8 bit quantity or a 16 bit quantity least significant byte first most significant byte second Unless directed by an interrupt or branch instruction the execution of instructions proceeds through consecu tively increasing memory locations A branch instruction can specify the address of the next instruction to be exe cuted in one of two ways Direct The branch instruction contains the ad dress of the next instruction to be exe cuted Except for the RST instruction byte 2 contains the low order address and byte 3 the high order address Register indirect The branch instruction indi d cates a register pair
86. k number and the second byte is the sector number Zero indicates the end of the file 7 134 Data 135 Stop byte 255 decimal 136 Unused 1 3 The Directory Track The Directory takes all of track 70 Each sector has 8 file name records each 16 bytes long The format of the sector is as follows Byte Use 0 7 File name 8 9 Pointer to the start of the file track sector 10 File mode 2 sequential 4 random 11 15 Unused If the first byte of the file name is 0 the file has been deleted If the first byte is 255 decimai the file is the last in the directory and all file name records after it are ignored 2 RANDOM FILES 2 1 Format of Random Files A random file may contain any number of sectors The first two sectors are the index blocks The Number of Data Bytes field in the first block indicates the number of groups currently allocated to this file The next 256 bytes in the two blocks give the designations of the data sectors in the file in the order they occupy in the file The upper two bits in the byte give the group number and the lower 6 bits give the track number 6 2 2 Using Random Files The user must allocate a 128 byte buffer for each random file to be open at one time in the program A Random Read or Write transfers an entire 128 byte block at a time into or out of the buffer assigned to that file l l The format of the data in the buffer is defined by the user 208 102 June 1977 APPE
87. l flags Instruction and Data Formats Memory for the 8080 is organized into 8 bit quanti ties called Bytes Each byte has a unique 16 bit binary address corresponding to its sequential position in memory 53 The 8080 can directly address up to 65 536 bytes of mem ory which may consist of both read oniy memory ROM elements and random access memory RAM elements read write memory Data in the 8080 is stored in the form of 8 bit binary integers DATA WORD D Dg Os D4 D3 MSB L When a register or data word contains a binary num ber it is necessary to establish the order in which the bits of the number are written In the Intel 8080 BIT O is re ferred to as the Least Significant Bit LSB and BIT 7 of an 8 bit number is referred to as the Most Significant Bit MSB The 8080 program instructions may be one two or three bytes in length Multiple byte instructions must be stored in successive memory locations the address of the first byte is always used as the address of the instructions The exact instruction format will depend on the particular operation to be executed D2 Dy Do 8 t Single Byte Instructions D Do Op Code Two Byte Instructions Byte Two 05 Do Data or w Address Three Byte Instructions Byte Three D7 Do or Addressing Modes Often the data that is to be operated on is stored in memory When multi byte numeric data is used the data like instructions
88. laced in the accumulator Cycles 2 States 7 Addressing immediate Flags Z S P CY AC 58 ADCr Add Register with carry C A A r CY The content of register r and the content of the carry bit are added to the content of the accumulator The result is placed in the accumulator 1 0 0 0 1 Cycles 1 States 4 Addressing register Flag Z S P CY AC ADCM Add memory with carry A A H LI CY The content of the memory location whose address is contained in the H and L registers and the content of the CY flag are added to the accumulator The result is placed in the accumulator 1 0 0 0 1 1 1 0 Cycles 2 States 7 Addressing reg indirect Flags ZS P CY AC ACI data Add immediate with carry A A byte 2 CY The content of the second byte of the instructian and the content of the CY flag are added to the contents of the accumulator The result is placed in the accumulator Cycles 2 States 7 Addressing immediate Flags 2 S P CY AC SUB r Subtract Register A A r The content of register r is subtracted from the con tent of the accumulator The result is placed in the accumulator Cycles 1 States 4 Addressing register Flag Z SP CY AC DOS June 1977 SUBM Subtract memory A lt A H L1 The content of the memory location whose address is contained in the H and L registers is subtracted from the co
89. le 2 B File Number the number of the file that was being accessed when the error occurred L ROCB Address the address of the Request Control Block of the Monitor Call that caused the error Opcode the operation code of the Monitor Call that caused the error Return Address the address to which control would have returned had the error not occurred Table 2 B Error Codes Error Code Meaning 1 FILE TABLE ENTRY MISSING The file table contains entries for thirteen disk files numbered 0 12 and four other 1 0 files 0 3 If a file number other than these is encountered an error occurs 2 DEVICE NOT IN PHYSICAL DEVICE TABLE The following devices are listed in the physical device table Teletype or Teletype compatible terminal Audio Cassette L 205 High Speed Paper Tape Reader June 1977 Floppy Disk 25 10 71 12 26 An attempt to transfer information to or from another device causes an error HANDLER NOT IN HANDLER TABLE An attempt was made to perform an invalid oper tion on an 1 0 device for example to output to a paper tape reader BOARD NOT IN 1 0 TABLE The following 1 0 boards are in the I O table 2S10 SIO A B and C 4PIO PIO Use of other hoards is not supported SHORT DATA TRANSFER The end of data transfer came before the specified number of bytes was read or written CHECKSUM ERROR When a program is loaded the Monitor keeps a running sum of all the bytes in each record The least si
90. m the computer Execution pro ceeds normally but no output is generated unti either another Control 0 is typed or another command is requested by the Monitor or Editor Example Suppose the following Editor command is typed p 00100 LDA IER 00200 _LHLD CAND Control 0 The Print command action is completed but no output appears on the terminal until the Editor s prompt asterisk appears requesting another command Other constraints are imposed by the system programs in use and are discussed in the descriptions of the Editor Assembler Debug and miscellaneous programs Some of the standards which apply to all of the system programs are as follows a All commands must be typed in upper case b The fields of the command are separated by delimiters These delimiters include space tab comma semicolon and colon Colons are used specifically to separate multiple commands on a single Tine 18 pes i dies ut ATAJO DOS DOCUMENTATION SECTION U MONOS 2 THE MONITOR 2 1 Introduction to the Monitor The Monitor is the control center of the DOS system It is used to load and execute system and user programs and to execute Input Output routines for all of the system s peripheral devices The Monitor is loaded first to load and execute all the other System components It remains in memory at all times passing control back and forth to system and user programs and providing 1 0 services The
91. mpt string is omitted LINE INPUT may not be edited by Control A Page 76 POKE explanation second line 1 I is negative address is 655354I CHANGE TO I I is negative address is 65536 I i i 11 12 13 14 15 16 17 BASIC Reference Manual Addenda April Page 3 Page 80 OCT i OCT OCT X 8K Extended Disk CHANGE TO OCT OCT X Extended Disk l Page 81 SPACE SPACESCI st Extended Disk CHANGE TO SPACE SPACES 1 Extended Disk Page 91 line 4 2 Xx question see Appendix E CHANGE TO question see Appendix H Page 95 first paragraph line 3 For instructions on loading Disk BASIC see Appendix E CHANGE TO For instructions on loading Disk BASIC see Appendix H Page 105 line 11 f C in extended retains CONSOLE function CHANGE TO C in Extended and Disk retains CONSOLE and all other functions Page 112 Paragraph 4 Line 3 USRLOC for 4K and 8K Altair BASIC version 4 0 is 111 decimal CHANGE TO USRLOC for 4K and 8K Altair BASIC version 4 0 is 111 octal Page 114 third paragraph line 2 by the first character of the STRING expression CHANGE TO 1977 18 Page 4 e e by the first character of the lt string expression Note that the 1 program named A is saved by CSAVE A Index line 12 du JEN er KDDITION NULL Te se ea M72 as E ae ADR 7 fu
92. ng In operation the breakpoint processing procedure is transparent to the programmer and program executiom is unaffected except for the pauses initiated by the breakpoints 6 6 Using Debug with Relocated Programs The Assembler produces relocatable code modules that can be loaded in any place in memory by the Linking Loader Thus the addresses of program statements are not determined until the program is loaded In order to use Debug on such programs special functions are provided for handling base addresses Typing an apostrophe recalls the execution address returned by the Linking Loader for the current load module Thus the statement J causes Debug to start execution of the module at the Linking Loader execution address The execution address may or may not be the first location in the program For this reason Debug also includes the capability of storing any address and recalling it for use in any Debug command The statement lt address gt stores the address and amp recalls it for use The address may be that of the first location ina module common or data block etc DOS 90 June 1977 ALTAR DOS DOCUMENTATION SECTION VI MISCELLANEOUS SYSTEM PROGRAMS 7 MISCELLANEOUS SYSTEM PROGRAMS 7 1 INIT INIT is a system program that allows the initialization of the system the number of disks disk files etc to be changed without reloading the system INIT is run by typing INIT to the
93. nt register 00 9 DO0 00 DCR r Decrement register 00 00D Q0 5 INR M Increment memory 0 0 9 7 01700 10 OCA N Decrement memory 0 00 1 0 0 19 ADO r Add register to A 10000 3 5 4 ADC Add register to A wath carey r 100 3 T E Y 4 08 Subtract register from A pes y 9 4 SB8r Subtract register from A 1009 7 t S S 4 wrth borrow S ANA r And register with A 1 0 10086 4 XAA r Exclusive Or ragistor wth A 10 7 039 8 4 O Ar Qr register with A 0 1 1085 4 CMP r Compare register with A 10 1195 4 ADO N Add memory to A 109 020 01 Q 7 ADCM Add memory to with carry 19 200 t 1 1 8 7 SUB M Subtract memory from A 100 0 1 4 7 88M Subtract mamary from A Lo 9 vt amp 30 7 wort harrow ANA M And memory w th A 10 1001 3 0 T XRAM Exclusive Or memory with A p e SE 1 ORAM Or memory with A ED NT EU 7 CMPM Compare memory with A 9 cp cech opor ADI Add immediate to A te Ol 0 00 7 9 7 ACI Add immediate ta A with T 16750 202 205 X 0E 90 7 carry E su Subtract immediata from A 10180 1 0 t Q 7 sel Subtract immediate from A pow T o DS 7 with borraw ANI And immediate with A dboqoq 905 0 4 7 XRI Exclutivs Or immediate with rU UU Oe pov orc 7 A on Or immediate with A Tod ELA AS da 0 7 en Campare immediate with A yh opo ek AE a ALC Rote A lett od 0 00 11 4 RRC Rotate A right 0900 80 Q 1 1 a RAL Rotate A left through carry 0 090 0 1 1 4 4 RAR Rotate A right through 0 0 0 1 t tit 4 carry MP Jumo
94. ntent of the accumulator The result is placed C AA SBI data Subtract immediate with borrow A A byte 2 CY The contents of the second byte of the instruction and the contents of the CY flag are both subtracted from the accumulator The result is placed in the in the accumulator 1 0 0 1 SUI data A A byte 2 SBB r A A 0 1 1 0 Cycles 2 States 7 Addressing reg indirect Flags Z S P CY AC Subtract immediate The content of the second byte of the instruction is subtracted from the content of the accumulator The result is placed in the accumulator Cycles 2 States 7 Addressing immediate Flags Z S P CY AC Subtract Register with borrow r CY accumulator Cycles 2 States 7 Addressing immediate Flags ZS P CY AC INR r n 0 41 The content of register r is incremented by one Note Alt condition flags except CY are affected Cycles 1 States Addressing register Flags Z S P AC INR M Increment Register Increment memory i UH L lt HP L 1 The content of register r and the content of the CY flag are both subtracted from the accumulator The result is placed in the accumulator The content of the memory location whose address is contained in the H and L registers is incremented by one Note All condition flags
95. o be referred to symbolically That is a memory location can be given a label and Cy referred to subsequently simply by mentioning that label Finally Assembly language provides the programmer with a complement of error massages that make the process of debugging much easier than in machine language programming The DOS Assembler translates Assembly Language to machine language by means of a two step process In the first step the Assembler reads the Assembly Language program and assigns addresses to all of the sym bols In the second step the program is read again and the instructions are converted to their machine language equivalents On this second pass through the program the program m y be listed on the terminal or in a disk file If the Assembler detects an error in the program the place where the error occurred is marked in the listing with a letter that indicates the nature of the error Once the system disk is mounted in drive 0 the Assembler is run by typing the following command to the Monitor ASM file name device device type device number gt where the file name is the name of the disk file that contains the C vos June 1977 45 source program and lt device gt is the number of the drive where that file resides If a device type is specified an Assembler listing is written in a file on the specified device If the device type is TTY the listing is printed on the terminal
96. od which precedes each command Similarly Editor and Linking Loader commands are typed after an asterisk Debug and the Assembler prompt only once after the program is loaded The Monitor also prompts the programmer when insuf c ficient information has been given in a command For example if the programmer types MNT cr the computer prints ENTER DEVICE NUMBER Typing the number and a carriage return causes the command to be executed i 005 June 1977 SS ae HERR 1 5 DOS Input Conventions All input to DOS as from a terminal is handled through the Monitor s input routine This routine has several properties which set constraints on the form of input All 128 ASCII characters are accepted by the input routine except characters of the form Control x where x is any letter Some Control characters are used to control the input routine and the rest are ignored cr terminates a line The input buffer is cleared and subsequent input is taken as a new line line feed is considered an input character The input buffer accepts the first 72 characters as one line of input If more than 72 characters are input in a line the contents of the buffer are discarded and a new line is begun i f Special characters include the following a Rubout deletes the last character in the buffer When Rubout is typed a backslash and the last character in the buffer are printed Each successive Rub
97. ode the input to the Assembler along with other pertinent information The Assembler listing of our sample program appears as follows SAMP LISTING 88960 072 009033 96189 LDA TER LOAD MULTIPLIER pnpos p52 pppps4 popup LHLD CAND LOAD MULTIPLICAND 800996 237 00129 SHFTR RAR SHIFT ER RIGHT DODOD7 322 gppp2s 990139 JNC SCAN JUMP IF NO CARRY Bpppi2 77 909135 cmc TURN OFF CARRY J PD903353 900149 XCHG SAVE CAND IN C D 900014 252 209036 0006150 LHLD PROD LOAD PROD IN H L j 800017 931 200160 DAD D ADD CAND TO PROD 099029 042 1209936 9006170 SHLD PROD STORE PROD 000923 353 000180 XCHG RESTORE CAND 200024 051 299190 SCAN DAD H SHIFT LEFT popp2s 322 poppps papenp JNC SHFTR REPEAT IF NOT FINISHED 900030 323 0006000 229225 JMP 909 JUMP TO MONITOR WHEN 000033 100228 FINISHED 000033 249 DOP230 IER 0B 32 000034 200 opp 209240 CAND 0B 128 0 DODA3S pop 200 DOP259 PROD DB 2 900949 90269 END The rightmost four columns are the source listing Note that there is not much room for comments at the end of the line If the comments are too long for the allotted space the excess is printed on the next line and operation is not affected Dos 12 i June 1977 C cos June 1977 The next column to the left is the Text Editor s line number The next two columns are the octal representation of the object code the output of the Assembler If the source instruction does not produce a machine
98. ogically anded with the content of the accumulator The resuit is placed in the accumulator The CY flag is cleared 1 0 1 0 0 S S S Cycles 1 States 4 Addressing register Flags Z S P CY AC ANA M AND memory A lt A A H L The contents of the memory location whose address is contained in the H and L registers is logically anded with the content of the accumulator The result is placed in the accumulator The CY flag is cleared 1 0 1 0 0 1 1 0 Cycles 2 States 7 Addressing reg indirect Flag Z S P CY AC cos June 1977 C ANI data AND immediate A A A byte 2 The content of the second byte of the instruction is logically anded with the contents of the accumulator The result is placed in the accumulator The CY and AC flags are cleared Cycles 2 States 7 Addressing immediate Flags Z S P CY AC XRAr Exclusive OR Register A e A Y r The content of register r is exclusive or d with the content of the accumulator The result is placed in the accumulator The CY and AC flags are cleared 1 0 1 0 1 S S S Cycles 1 States 4 Addressing register Flags ZS P CY AC XRA M Exclusive OR Memory A lt A Y H L The content of the memory location whose address is contained in the H and L registers is exclusive OR d with the content of the accumulator The result is placed in the accumulator The CY and AC flags ara cleared
99. ommand Execution can be started at any location by the G command lt address gt G where the address is the location where execution is to start The P Command Execution can be made to proceed from a break point by means of the P command lt number gt P If the number is typed execution proceeds from the specified breakpoint If the number is omitted the most recently encountered breakpoint is specified The P command cannot be used if no breakpoint has been encountered or if the break point with the specified number has not been assigned Breakpoints and Execution Commands When a G or P command is executed Debug replaces the bytes at the breakpoint addresses with RST instructions These instructions cause control to be transferred to locations 0 7 17 27 37 77 At these locations JMP instructions branch to a breakpoint handling routine in Debug The bytes that were replaced are saved in a table and stored after the breakpoint is executed l 89 When a P command is executed Debug reconstructs the instruction at the breakpoint by referring to the table and executes that instruction d before branching to the instruction after the breakpoint If the instruc tion at the breakpoint is itself a CALL JMP or RST instruction Debug branches to the proper location When a breakpoint RST is executed the breakpoint routine saves all registers and condition flags and restores the original byte in the instruction stri
100. on proceeds normally in order from the lowest memory location to the highest statements that need to be executed in normal sequence need not carry labels If on the other hand a statement needs to be executed out of normal order it must carry a label Such aut of order execution is called branching and it is particularly important in programmed decision making and loops Labels can also be used to refer cos 46 f June 1977 C to memory locations for storing data This use will be discussed more fully in section 4 2B below The op code is the mnemonic of the machine instruction or Assembler pseudo operation to be performed by the statement Machine instruction Op codes are translated by the Assembler into machine language instruc tions Assembler pseudo ops are not translated but direct the Assembler itself to allocate storage areas set up special addresses etc The op code is followed by one or more operands depending upon the nature of the instruction An coerand is an address specified in any one of several manners where the computer is to find the data to be operated upon In the case of an ADC add with carry instruction for example the operand is the address of the location whose contents are to be added to the accumulator In the MOV above instruction the two operands are the addresses of the location from which a data byte is to be taken and to which it is to be moved Comment may be added to the end of a
101. or the name of the program the sign is added auto matically and the device number of the disk on which the listing file resides The listing is then printed on the system line printer C 20S June 1977 95 96 Blank ALTAIR DOS DOCUMENTATION APPENDICES 97 98 Blank V C DOS June 1977 DECIMAL pop 201 292 203 204 pps ppe 997 Ape 299 219 211 212 213 214 215 916 917 218 219 922 g21 22 923 924 p25 926 927 928 923 238 an 932 APPENDIX A CHAR DECIMAL NUL 243 SOH p44 STX p45 ETX p46 EOT 947 ENQ 948 ACK p49 BEL 050 BS p51 HT 952 LF 053 VT 254 FF 055 CR 256 so 057 SI 958 DLE p59 pci 269 DC2 961 DC3 062 DC4 p63 NAK 264 SYN 265 ETB 266 CAN 067 EM p68 SUB p69 ESCAPE 070 FS 071 GS 072 RS 973 US 274 SPACE 975 CHAR gt 0 00 Y O Qi gt py SD c ww Aor TIO nm oo vo YF vv ASCII CHARACTER CODES DECIMAL 986 887 283 239 p99 91 292 293 294 895 296 097 098 099 199 191 192 193 194 195 196 197 198 199 119 11 112 113 114 115 116 117 118 CHAR LAA TAN x Se E X A lt C ct 0030 O O 23 ES x C zc 4 hem QQ QQ Uc mv 99 DECIMAL CHAR DECIMAL CHAR DECIMAL CHAR 33 i 076 L 119 w 234 n 877 M 129 x 935 078 N 12 y 236 S p 0 122 z 037 4 p8p p 123 238 amp 981 Q 124 039 i 282 R 125 249 983 S 126 241 284 T 127 DEL p42 85 U
102. osed in paren thesis on the right side of the first line The next line s contain a symbolic description of the operation of the instruction This is followed by a narative description of the operation of the instruction The following line s contain the binary fields and patterns that comprise the machine instruction 55 B The last four lines contain incidental information about the execution of the instruction The num ber of machine cycles and states required to exe cute the instruction are listed first If the instruc tion has two possible execution times as in a Conditional Jump both times will be listed sep arated by a slash Next any significant data ad dressing modes see Page 4 2 are listed The last line lists any of the five Flags that are affected by the execution of the instruction Data Transfer Group This group of instructions transfers data to and from registers and memory Condition flags are not affected by any instruction in this group MOV r1 72 Move Register r1 r2 The content of register r2 is moved to register r1 Lo illo o ojs ss Cycles 1 States 5 Addressing register Flags none MOV LM Move from memory 1 lt H C The content of the memory location whose address is in registers H and L is moved to register r Cycles 2 States 7 Addressing reg indirect Flags none MOVM r Move to memory HY U
103. out prints the previous char acter Typing another character prints another backslash and the character AIT of the characters between the backslashes Es are deleted If Rubout is typed with no characters in the buffer a lt cr gt is printed Control U deletes the current contents of the input buffer c Control R displays the current contents of the input buffer o Example EXAMPLE LENENENENINE Control R EXAMPLE LINE Typing three rubouts deleted the characters between the back Slashes Typing Control R displayed the final appearance of the line d Control I is a tab character When a tab is printed spaces are printed so that the next character is printed at the start of the next 8 space column The following special characters are recognized if input interrupts are enabled see p 22 508 2 June 1977 17 Control S Control Q Contro1 C Control 0 Causes execution of a program to pause until Contro1 Q is typed This can be used to pause during a listing or to pause during execution of a program to examine intermediate values causes execution to resume after a Control S Con trol Q has no effect if no Control S has been typed causes execution of a program to be suspended and control to be passed to the Monitor During the execution of certain 1 0 operations Mount Open Kill etc Control C does not terminate execution until the operation is completed prevents output fro
104. paper tape or cassette A Systems with a Disk Boot Loader PROM mounted in the proper slot of a PROM Memory Card have the loader program readily available in non volatile memory Use the following procedure to load DOS with the OBL PROM 905 June 1377 3 1 Turn on the power to the computer disk drives and peri pherals Raise STOP and RESET simultaneously and then release them Raise switches A15 A8 and lower switches A7 AQ Actuate EXAMINE Make sure the DOS diskette is mounted in disk drive O that the door is closed and the disk has come up to speed approximately 5 seconds 6 Enter sense switch settings for the terminal I 0 board from Table 1 A 7 Press RUN l DOS should start up and print MEMORY SIZE For the remainder of the initialization procedure see Section C below For systems without the DBL PROM the loading procedure involves entering a bootstrap loader from the computer front panel running it to load a disk loader program from paper tape or cassette and then running that loader to load the Monitor from disk The procedure for doing this is as follows 1 Turn on the power to the computer and peripheral devices 2 Raise the STOP and RESET switches simultaneously and then release them 3 Make sure the terminal is on line on a Teletype means the mode switch is set to LINE Now enter the proper loader program for the device through which the loader tape is to be entered The bootstrap loaders are in App
105. peration to be performed Relative An address may be specified in the follow ing form address offset For example 100 10 the location whose address is 100 10g or 2 refers to the location whose address is that of the current location minus 2g Two special cases of indirect addressing involve the line feed and commands line feed increments the address pointer and displays the contents of the result ing location lt t gt lt A gt on some terminals decrements the address pointer and displays the contents of the resulting location In both cases the increment in the symbolic 1 0 mode see Section 2 1 is the length of the current instruc tion 1 so that the next location displayed is that of the next instruction In the W mode the increment is 2 bytes and in all other modes the increment is one byte Typing an equal sign after a relative address specification causes Debug to print the resultant address Indirect Typing tab Control I refers to the location whose address is the contents of the current cos June 1977 Ey 208 June 1977 ee location For example 70 JMP 5000 tab 5000 SHLD 4750 Typing 70 in the symbolic 1 0 mode W causes Debug to display the instruction at 70 which is a JMP to loca tion 5000 Typing tab which is equivalent to tab causes Debug to reference the instruction at location 5000 Subsequently typing causes
106. program Each file data block allocated in this fashion re quires 166 bytes of memory If the F option is omitted the number of files defaults to 3 The M lt highest memory location gt option sets the highest memory location that will be used by MBASIC In some cases it is desirable to set the amount of memory well below the CP M s FDOS to reserve space for assembly language subroutines n all cases highest memory location should be below the start of FDOS whose address is contained in locations 6 and 7 If the M option is omitted all memory up to the start of FDOS is used NOTE Both number of files and highest memory location are numbers that may be either decimal octal pre ceded by amp 0 or hexadecimal preceded by amp H Examples A gt MBASIC PAYROLL BAS Use all memory and 3 files load and execute PAYROLL BAS A gt MBASIC INVENT F 6 Use all memory and 6 files load and execute INVENT BAS A gt MBASIC M 32768 Use first 32K of memory and 3 files A gt MBASIC DATACK F 2 M 6H9000 Use first 36K of memory 2 files and execute DATACK BAS The DSKF function is not supported by MBASIC Use CP M STAT The FILES statement in MBASIC takes the form FILESI lt filename gt If filename is omitted all the files on the currently selected drive will be listed filename is a string formula which may contain question marks to match any character In the filename or extension An
107. r and prints all characters up to but not including the nth occurrence of character If no such character exists or if there are fewer than n of them the sub command does nothing Typing SN displays 0100 SOME LI X lt string gt skips to the end of the line and inserts the string at that point The string is terminated with lt Escape gt or lt cr gt lt Escape gt allows further L oos June 1977 39 40 subcommands to be issued lt cr gt exits Alter mode Typing X THAT lt cr gt displays l 0100 SOME LINE THAT When all of the desired changes have been ordered Alter command mode is exited with one of the following subcommands lt cr gt replaces the existing line with the line as modified and exits Alter mode exits Alter mode but makes none of the ordered changes The changes are lost Paging commands The amount of memory used by the Text Editor may be minimized by dividing the file to be edited into pages and loading one page into memory at a time Pages are mani pulated by the following commands 8 W number Miscellaneous commands N increment Loads the first page of the file into memory Note that after a B command is issued the line number is unpredictable An additional command such as P number is needed to refer to any specific line on the page Loads the next page of the file into memory and saves the current page on disk Loads the nex
108. r gt 00119 INSERT FOUR lt cr gt 35 D 1st number 2nd numbers cr R 1st number 2nd number cr In each case the increment was halved until it was not possible to insert another line Deletes all lines from 1st number to 2nd number inclu Sive If 2nd number is omitted one line is deleted Replaces the lines from Ist number to 2nd number inclu Sive with input from the con Sole After the cr EDIT displays the number of the first line to be replaced All input to the next cr replaces the line After the next cr the number of the next line to be replaced is displayed Typ ing a null line causes that line and the remaining lines in the range to be deleted If 2nd number is omitted one line is replaced B Finding a String The following commands display the next occurrence of a character string F string cr S lt string gt cr 36 Finds the next occurrence of string on the current page If string is found the line in which it appears is printed If it is not found an asterisk is printed and EDIT is ready for further commands The Search begins on the line immediately after the current line The same as F except the Search can extend over page boundaries pas June 1977 U C 00 June 1977 In Line Editing the Alter Command The Alter command allows adding deleting or modifying characte
109. rectory of disk files is listed by the DIR command the file names are preceded by special characters that denote the file type These characters and their meanings are as follows absolute binary files Files with this character are produced by the Monitor s SAV command and are used as input by the LOA and RUN commands System program names appear in the directory with a pound sign 4 relocatable load module These files are output by the Assembler and used as input by the Linking Loader listing file The optional source listing from ASM carries this designation amp Editor source file The output of the Editor carries this designation Editor backup file When a file is modified by the Editor the old unmodified file is renamed to have this designation 005 28 June 1977 U These characters are supplied automatically by the system programs and Monitor commands which create the files Therefore they need not be supplied by the programmer For example the command ASM MULTI 0 is used to assemble the file which appears in the directory as amp MULTI Similarly the command EDIT TEXT O creates a source file called amp TEXT File names in the DEL and REN commands must appear exactly as they do in the directory For example the Editor backup file LETTER may be deleted by DEL LETTER without affecting the source file amp LETTER or any other file 208 June 1977 29
110. required Block Name error A Common or Data block name was invalid Too many Common blocks Only 17Common blocks are allowed Digit invalid Valid digits are 0 9 in decimal 0 7 in octal and 0 9 and A F in hexadecimal E Expression error Error in the syntax symbols or position of an address expression F Operand field too long Label error L M Multiply defined name 008 June 1977 71 Name too long Six characters is maximum Op code invalid An Op code was encountered which is not in the list of op codes recognized by the Assembler Phase error Probably an error in the Assembler Please report errors to the MITS Inc Software Department Quoted string error The ending quotation mark was missing from a character string Field or line terminated too soon Undefined name Value invalid An address expression value was negative too large or otherwise unusable E 005 June 1977 AWAR DOS DOCUMENTATION SECTION V WINING LOADER u 5 THE LINKING LOADER 5 1 Introduction The output file of the Assembler is a relocatable object code module That is it is a machine language program module object code that can be loaded by the appropriate loading program anywhere in memory and executed relocatable Moreover the Assembler allows the module produced by an assembly to refer symbolically to addresses in other modules as long as all of the modules that refer to each other
111. reset 005 June 1977 Auxiliary Carry If the instruction caused a carry out of bit 3 and into bit 4 of the resulting value the auxiliary carry is set otherwise it is reset This flag is affected by single precision additions subtractions incre ments decrements comparisons and log ical operations but is principally used with additions and increments preceding a DAA Decimal Adjust Accumulator instruction Symbols and Abbreviations The following symbols and abbreviations are used in the subsequent description of the 8080 instructions SYMBOLS accumulator addr data data 16 byte 2 byte 3 port rrr DDD SSS rp RP DOS MEANING Register A 16 bit addrass quantity 8 bit data quantity 16 bit data quantity The second byte of the instruction The third byte of the instruction 8 bit address of an 170 device One of the registers A 8 C D E H L The bit pattern designating one of the regis ters A B C D E H L DDD destination SSS source DDD or SSS REGISTER NAME 111 000 001 010 011 100 101 One of the register pairs rzimonu B represents the 8 C pair with B as the high order register and C as the low order register D represents the D E pair with D as the high order register and E as the low order register H represents the H L pair with H as the high order register and L as the low order register SP represents the register 16 bit stack pointer T
112. rformed when the CPU control logic decodes a particular instruction Consequently the operations that can be performed by a CPU define the computer s Instruction Set Each computer instruction allows the programmer to initiate the performance of a specific operation All com puters implement certain arithmetic operations in their in struction set such as an instruction to add the contents of two registers Often logical operations e g OR the con tents of two registers and register operate instructions e g increment a register are included in the instruction set A computer s instruction set will also have instructions that move data between ragisters between aregister and memory and between a register and an O device Most instruction sets also provide Conditional Instructions A conditional instruction specifies an operation to be performed only if certain conditions have been met for example jump to a particular instruction if the resuit of the last operation was zero Conditional instructions provide a program with a decision making capability By logicaily organizing a sequence of instructions into a coherent program the programmer can tell the com puter to perform a very specific and useful function The computer however can only execute programs whose instructions are in a binary coded form i e a series of 1 s and 0 s that is called Machine Code Because it would be extremely cumbersome to program in machine
113. rs within a line without affecting the other lines in the file The format of the Alter command is as follows A number cr where number is the number of the line to be altered The Alter command allows the use of several subcommands which order changes to be made The subcommand action begins with the next character to the right of the current position Changes are made from left to right In the listing of subcommands below n preceding the Subcommand letter means the subcommand may be preceded by a number which indicates the number of times the subcommand is to be repeated For example l 3CABC is equivalent to three subcommands CA CB cc in sequence The Alter subcommands are not echoed When they are used the only output from the computer is a display of the line as modified In the examples that follow assume the following command has been executed A 100 where line 100 is in file TEST on page 35 The Alter subcom mands are as follows 37 Command n lt space gt nC lt characters gt nD H lt string gt I lt string gt 38 Explanation skips over and prints the next n characters in the line Typing space displays 00100 T changes the next n characters in the line to the specified characters Typing 3CHAT displays 00100 THAT deletes the next n characters Typing D displays 00100 THAT and deletes the following space The effect of the subcommand is not apparent until
114. sert mode the Editor automatically assigns numbers to the lines as they are entered If increment is not specified the line number increment is that last used in an N command If there has been no previous N command the default increment is 10 After a line is typed and a carriage return entered EDIT adds the increment and checks to see that the new line number is less than the next existing line number If it is not the increment is reduced to half the difference between zos 34 June oO EC C 908 June 1977 the previous line number and the next existing line number This process is repeated until no new line numbers are possible Then the Insert mode is exited and an asterisk is printed When a file is being created by the Editor there are no exist ing lines so each line is numbered with the specified or default increment Example EDIT TEST 0 DOS EDITOR VER 0 1 CREATING TEST 00100 THIS IS A TEST lt cr gt 00110 FILE SHOWING LINE lt cr gt 00120 NUMBER INCREMENTS lt cr gt 00130 lt cr gt pe In this example new line num bers were generated after every carriage return until a null line a line with no characters before the carriage return was typed Then Insert mode was terminated and the prompt aster isk printed In the following example insertions are made into file TEST I 110 00115 INSERT ONE cr 00117 INSERT TWO lt cr gt 00118 INSERT THREE lt c
115. session without damaging any files The file name and device num ber may be specified as in the E command to edit another file wit ut having to reload the Editor 41 42 Blank AMAR DOS DOCUMENTATION SECTION IV ASSEMBLEA 43 44 Blank ee 4 THE ASSEMBLER The Assembler is a system program that translates programs from C Assembly Language into machine language In principle machine language can be used to write programs for the computer A machine language pro gram is one in which the instructions to the computer are represented by binary numbers one two or three bytes long The practical problems of machine language programming however make its use virtually impos sible for all but the simplest programs First it is difficult to remember all of the binary machine language codes and enter them into the computer without error Second machine language requ res the pro grammer ta remember all of the addresses in the program a t refer to them explicitly Finally if a machine language program does not work a desired it is extremely difficult to determine what went wrong Assembly language programming is preferable to machine language pro gramming because it avoids all of these difficulties Machine instruc tions are referred to in Assembly language by nnemonics that are des criptive of the operation and that are relatively easy to remember Addresses can be specified explicitly but they can als
116. statement if they are separated from the rest of the statement by a semicolon Comments are ignored by the Assembler but they do appear in the Assembler listing and may thus be used by the programmer for documentation and explanation 4 2 Addresses A program is a series of statements that are stored in memory and executed either in the order in which they are stored or in sequence directed by statements in the program itself The data operated upon by the program or used to direct the program s actions is stored in memory and referred to by the addresses of the locations in which it is stored Therefore addresses are used both to control execution of the program and to manipulate data Much of the versatility of the Assembly Language programming system in DOS results from the various ways in which addresses may be represented and modified The DOS Assembler recognizes addresses in three major forms constants labels and address expressions A Constants A constant is an address that is stated explicitly as a number For example the instruction JMP 23000 005 June 1977 47 causes execution to proceed from the location whose address is 23000 decimal A constant address may be expressed in octal decimal or hexadecimal notation 1 Octal address constants are strings of octal characters 0 7 whose first character is zero The allowable range of values is 01777777 to 01777777 Examples 0377 01345 017740 2 Decimal addr
117. ster pair rp is decremented by one Note No condition flags ara affected Cycles 1 States 5 Addressing register Flag none DAD rp Add register pair to H and L H L lt H U rh ri The content of the register pair rp is added to the content of the register pair H and L The result is placed in the register pair H and L Note Only the CY flag is affected It is set if there is a carry out of the double precision add otherwise it is reset Cycles 3 States 10 Addressing register Flags CY 60 DAA Decimal Adjust Accumulator The eight bit number in the accumulator is adjusted to form two four bit Binary Coded Decimai digits by the following process 1 if the value of the least significant 4 bits of the accumulator is greater than 9 or if the AC flag is set 6 is added to the accumulator 2 tf the value of the most significant 4 bits of the accumulator is now greater than 9 or if the CY flag is set 6 is added to the most significant 4 bits of the accumulator NOTE Alt flags are affected Cycles 1 States 4 Flags Z S P CY AC Logical Group This group of instructions performs ogical Boolean operations on data in registers and memory and on condi tion flags Unless indicated otherwise all instructions in this group affect the Zaro Sign Parity Auxiliary Carry and Carry flags according to the standard rules ANAr AND Register A A A r The content of register r is l
118. t 5 0408 Add B amp CtoH Sl 900 0 9 000 10 DADO Add Q amp EtoH amp pu 4r 100 8 10 JAO H Add H amp LtOK SL o 0 food ovo 40 10 DAD SP Add stack pointer to H amp L 9 80 tT 1700 19 STAX 9 Store A indirect 0 0 00830 0 T STAX O Store A indirect 090 0 1 0 1 0 7 LDAX 8 Load A indirect 903 0 0 10 1 0 7 LOAXO Load A indirect 39 0 0 1 10 0 7 INX 8 increment 8 C registers 90 9 000 17 5 INX O incremente D amp E registers 9 0 0 t 0 0 5 INX M increment H amp L registers 0 0 pot d 8 T 4 5 INX SP increment stack pointer 0 Q0 1 too 7 s 0cx8 Decrement 8 amp C 0 0 0 0 9 5 acx o Decrement D amp 0 0 0 1 T0 d 1 5 OCX H Decrement H amp L 0 0 1 0 t o0 od on 5 ocx SP Dacrement stack pointer 9 89 tf 1 t 41 5 CMA Comgtement A 9 0 1090101011 4 STC Set carry o 0 1 1 9 3 L 4 4 CMC Comniement carry 9 0 rJ tT t 1 1 8 4 DAA Decimal adjust A 0 0 1 00 1 1 1 4 SHLO Store H amp L direet 0 9 10003 9 18 LHLD Load H L direct 0 0 f dn gs 3 9 18 El Enable interrupts eta Xe E he geo 4 Di Disable interrupt p 4 1 199 4 NOP No operation 983 0023 00 0 4 instruction Code Clack Maemanic Deseription Dy Og Os Og 03 0 Oy Oo Cycles MQV 12 Move register 10 register 0 10 005 S 5 MOV M r Move register to memory ort 1608 U MOY r N Mavs memory to register 0 1 8 0 0 r 7 HLT Malt 9 1 1 9 1 1 0 MVir Move immediate register 90 0028 0 Q0 7 MVIM Move immediate memory 90 1 17 0 10 10 INR r tnereme
119. t page into memory and deletes the current page Writes the lines currently in memory from the first to number onto disk as a page Renumbers all of the lines in the file The difference between suc cessive line numbers is increment DOS June 1977 P lt first number second number E file name device number Q file name device number DOS June 1977 The first Tine number is always 100 Prints all lines from the 1st number to the 2nd number inclu Sive If there is no second number 1 line is printed If no line num bers are given the entire current page is printed As the Editor proceeds through the named file making changes it copies the modified file into a temporary file called EDIT TEM When the E command is executed the remaining unmodified lines of the file are copied into EDIT TEM This file is then assigned the name of the editad file The first character of the original file name is changed to This provides a backup file Any previous backup file is deleted If a file name and device number are specified in the E command EDIT proceeds to edit that file Thus another file may be edited without having to reload the Editor If the file and device are not specified control is passed to the Monitor Q exits to the monitor without renam ing any files The changes made by the Editor are ignored The Q com mand allows the user to abort an editing
120. the Editor can go back to the beginning of a multipage file from any point Edit commands are provided to add delete and replace lines find and substitute character strings and modify individual lines The form of an EDIT command is as follows x lt field gt lt fteld gt cr where x stands for the EDIT command letter in use and field is a line number or character string depending upon the command The command letter and fields are separated by delimiters The EDIT commands operate on individual lines or on ranges of lines A line is referenced by stating its number in an EDIT command For example P 150 005 June 1977 33 prints line 150 on the console A range of lines is referenced by stating the beginning and ending lines of the range Thus R 200 230 replaces lines 200 to 230 inclusive All line and range references are to lines on the current page only Before a line or range on another page may be referenced that page must be loaded into memory 3 2 Edit Commands A Inserting Deleting and Replacing lines The following com mands insert delete and replace whole lines I lt number gt lt increment gt lt cr gt Inserts a new line at number or the first available line after number After the cr EDIT prints number or if there is already a line at number the number of the first available line after number All input up to the next cr is inserted as the new line In the In
121. the H register is exchanged with the content of the memory location whose address is one more than the content of register SP 1 1 1 0 0 0 1 1 Cycles 5 States 18 Addressing reg indirect Flag none Move HL to SP SP H L The contents of registers H and L 16 bits are moved to register SP SPHL 1 1 1 1 1 0 0 1 Cycles 1 States 5 Addressing register Flags none IN port Input A data The data placed on the eight bit bi directional data bus by the specified port is moved to register A Cycles 3 States 10 Addressing direct Flags none OUT port Output data A The content of register A is placed on the eight bit bi directional data bus for transmission to the spec ified port Cycles 3 States 10 Addressing direct Flags none 66 El Enable interrupts The interrupt system is enabled following the execu tion of the next instruction Cycles 1 States 4 Flags none DI Disable interrupts The interrupt system is disabled immediately fol lowing the execution af the DI instruction 1 1 1 1 0 0 1 1 Cycles 1 States 4 Flags none HLT Halt The processor is stopped The registers and flags are unaffected D 1 1 1 0 1 1 0 Cycles 1 States 7 Flags none NOP No op No operation is performed The registers and flags are unaffected 0 0 0 9 0 0 0 0 Cycles 1 States 4 Flags none 005 June 1977 4 C C INSTRUCTI
122. tions are used throughout this manual byte eight bits of binary information Memory locations each contain 1 byte of information and the ASCII code uses byte to represent character file set of information accessible to a program by name or number Program modules data blocks and infor mation transferred to or from 1 0 devices may all be considered to be files In this manual files are divided into two broad classes Sequential and idus J cos June 1977 805 June 1977 A Sequential file is organized as a string of bytes of information From any point in a sequential file only the next byte may be accessed directly Data bytes are written after the last existing byte of th file Sequential files can be divided into two types depending upon how the data bytes are inter preted a ASCII files in which each byte represents a char acter according to the American Standard Code for Information Interchange see Appendix A for a table of ASCII codes and b binary files in which the binary data are taken as such with no code conversions applied Two special types of binary files are distinguished from other binary files by their contents Abso lute files are those which conform to the Absolute Tape Dump format in Appendix B The Monitor s SAV command produces absolute files Relocatable files conform to the relocatable object code module format in Section 5 3 The Assembler pro duces relocatable files which t
123. tor for A A string returned by a user s routine should be completely within the bounds of the storage area used by the original string Increasing a string s length in a user routine is guaranteed to cause problems Page 49 last paragraph line 7 leading signs nor can negative numbers be output unless the sign _ as forced to be trailing CHANGE TO leading signs 5 7 10 Page 2 Page 59 last line Dun Icd 20 CLOSE 1 wc Er E CHANGE TO _ 22 SA CLOSE l1 aas o 000 BTS vaa Lx Page 70 CLEAR expression explanation 7 Same as CLEAR but sets string space to the value CHANGE TO i Same as CLEAR but sets string space see 4 1 to the value Page 70 CLOAD string expression explanation second line z Character of STRING expression to be CHANGE T0 v riae tl Gen oat az character of STRING expression to be Page Tl ooo o o oZ i clo SES ee N um CS VE lt arzay name 7 BK cassette Disk an CHANGE TO GSAVE lt array name 8K fcassette Extended Disk Page 75 Insert the following after LET and before LPRINT ADDITION ee Ws Extended Disk Erin toc a ENR LINE INPUT prints the prompt string on the terminal and assigns all input from the end of the prompt string to the carriage return to the named string variable No other prompt is printed if the pro
124. two suc cessive locations This is used primarily to dis play addresses A ASCII The characters displayed have ASCII codes equal to the contents of the location S Symbolic The instruction at the location is C displayed in Assembly Language symbolic form Aj bytes of the instruction are displayed but address bytes are displayed in octal form If no I O mode is specified Debug proceeds as if the mode were specified as octal Typing a semicolon instead of displays the contents of the current location in octal regard less of the current 1 0 mode 8 Displaying a Range of Locations Typing the following command address 1 address 2 gt T displays the contents of all the locations from address 1 to address 2 inclusive in the current 1 0 mode 6 3 Modify The contents of a location may be modified by displaying the cur rent contents of the location and then typing the new contents For example 50 XRA A ORA A cr 2 ORA A DOS gt June 1977 87 The instruction ORA A replaces the original XRA A All input after the display is used to modify the current location until the location is filled or until a delimiter is typed The normal delimiter is cr Other delimiters are as follows line feed displays the next location t displays the previous location or displays the modified contents of the current location tab S l displays contents of the location addressed by
125. ump Data bytes can bear labeis as well For example ADC ADDEND ADDEND DB 255 These instructions add the contents of location ADDEND to the accumulator with carry In this example the contents of ADDEND have the value 255 decimal For the purposes of clarity and ease of use names should be systematically applied That is they should be logically related to the statements or data locations they represent and should be easily distinguishable from other names in the program Sometimes short branches and lcops require statements to be labelled but those labels are not important to the whole program Rather than filling up the symbol table with unique 49 50 names the programmer may prefer to label those statements with program points 2 Program points are special labels with the following form Xx where x is any letter A letter may be used any number of times in a single program Unlike names program points may be referred to in two ways The program point reference x refers to the most recently encountered program point with letter x The program point reference x refers to the next program point in the program with the letter x Therefore while any number of Statements may be labelled with the same program point a statement may only refer to the two program points bracketting it in the program Address Expressions The DOS Assembler allows addresses to be specified relative to other addresses For example to r
126. unconditional 11 60 000 1 10 JL Jump on carey 1 4 0 1 56 v2 10 JNC Jump on no carry 3g 0 00 10 JZ Jump on zero 11 0 10190 10 INZ Jumg on no zero 112000200 10 10 JP Jump an positive 3og 1 pow 0 0 10 JM Jump on minus 1 4 Vr EA 19 JPE Jump on parity even troy 0 10 10 10 Jen Jump on parity add 11 180 00 1 90 10 CALL Cail unconditionat 1 f 508 O 1 17 cc Cali an carry potog toe ob 06 0 n CNC Call on no carry loq t9 01 0 8 n ez Call on ero 1 1 0 0 0700 ni CNZ Cali on no zero Jos go 80015 700 an CP Cail on positive 1 1 i 1 0 100 nn CM Call on minus jae SIS E cogo s d WAT CPE Call an panty even T CI Dile A OD nar cra Cail on parity odd pod 108000 3 nn RET Return d oM 9 0 t 08 t 10 RC Return on carey 01310 1 100848 5 RNC Return on no carry vcr 9g v 076 0 0 511 e NOTES 1 DDO or SSS 000 8 001 C 0100 011 E 100 H 101 L 110 Memory 111 A 2 Two possible cycle times 5 11 indicate instruction cycles dependent on condition flags 008 june 1977 67 Pseudo Ops Pseudo op is the name given to Assembly Language 4 instructions that do not produce any machine code but which direct the Assembler to perform its operations The DOS Assembler provides op codes for reserving storage space defining the contents of memory locations and controlling the parameters of the Assembler s operation The following table is an alphabetical list of pseudo ops along with their
127. une 1977 11 112 APPENDIX E THE FILE COPY UTILITY As an example of the use of the various facilities of DOS to solve a specific problem the listing of a file copying routine is given in this appendix De This program copies a file from one file and device to another Any file on any device in the system may be copied to any other device with this program The program is highly structured with a central routine COP that calls a number of other routines to perform specific actions To copy a file run the copy program by typing the following command to the Monitor COP The program is stored on disk as an absolute binary file so it is loaded and run immediately When the program starts it prints the following messages COPY FILE SET UP INPUT It then asks for the type of device from which the file is to be copied The user answers with FDS for a disk or TTY for the terminal At this point the copy program asks the device number 0 if there is only one device of that type and the name of the file to be copied If the device is TTY no file name need be specified After the input parameters have been entered the program prints SET UP OUTPUT l and asks the device type number and file name for output If the output device is TTY no output file name need be specified When the copy action is complete the program exits This Appendix lists the main routine COP and some of the more impor tant or instructive subrout
128. utput again writes the buffer onto the specified disk file and returns new pointers Calling Block Input again reads another sector of data and returns new pointers f 205 108 June 1977 In addition to these 1 0 Monitor Calls Monitor Calls are available which perform the operations of the Monitor commands These calls allow files to be opened saved and deleted disks to be mounted and dismounted etc without having to return control to the Monitor The first two bytes of each of the command Monitor Calls are the same as the 1 0 Monitor Calls except for the codes The listings below show the rest of the bytes of the Request Control Blocks Operation Code Description Initialize 45 Same as DIN command Byte Function 3 Kind of device disks are the only devices currently supported Byte 6 l Byte Function 4 Device number Rename 44 Same as REN command Byte Function 3 Kind of device 6 for disk 4 Device number 5 6 Address of 8 byte old name field 7 8 Address of 8 byte new name field Delete 43 Same as DEL command Byte Function 3 Kind of device 6 for disk Device number 5 6 Address of 8 byte file name Directory 42 Same as DIR command Byte Funetion 3 Kind of device 6 for disk 4 Device number 5 6 File number where the output of the directory is to be written The file must be open for output Dismount 4 Same as DSM command a os _ 109 E E m Pr n Y Y Function Kind of device
129. vious IFF or IFT statement Define Entry Points The names nl n2 are names of entry points in other programs and are defined as names in the program being assembled The names must appear in an ENTRY statement before they appear as labels Define Equivalence The address expression e is evaluated and assigned to the label of the EQU statement The label is required and may not have appeared pre viously as a label or in a DMN DOS June 1977 or DATA statement All names L f used in e must have been defined previous to the EQU statement EXT nl n2 The names nl n2 are defined to be external refer ences They may not have been used as labels or in a CMN or DATA statement IFF lt e gt i Conditional Assembly False If the value of the address expression e is false 0 absolute then all of the statements until the next ENDIF are assembled If the value is true the statements are not assembled Conditional assem blies may not be nested 4 4 Assembler Error Messages L Assembler error messages are printed in the leftmost column of the source code listing on the line in which the error occurred The error codes are as follows Table 4 B Assembler Error Messages Code Meaning 2 Second operand missing An instruction that requires two operands was only given one A Absolute required Data Common External or Relative address was given where an Absolute value was
130. which contains the address of the next instruction to be exe cuted The high order bits of the address are in the first register of the pair the low order bits in the second The RST instruction is a special one byte call instruc tion usually used during interrupt sequences RST in cludes a three bit field program control is transferred to the instruction whose address is eight times the contents of this three bit field Condition Flags There are five condition flags associated with the exe cution of instructions on the 8080 They are Zero Sign Parity Carry and Auxiliary Carry and are each represented by a 1 bit register in the CPU A flag is set by forcing the bit to 1 reset by forcing the bit to O Unless indicated otherwise when an instruction af fects a flag it affects it in the following manner If the result of an instruction has the value O this flag is set otherwise it is reset Zero If the most significant bit of the result of the operation has the value 1 this flag is set otherwise it is reset Sign If the modulo 2 sum of the bits of the re sult of the operation is 0 i e if the result has even parity this flag is set otherwise it is reset i e if the result has odd parity Parity If the instruction resulted 1 a carry from addition or a borrow from sub Carry traction or a comparison out of the high order bit this flag is set otherwise it is

Download Pdf Manuals

image

Related Search

Related Contents

Télécharger la fiche produit  Boiler Identifier Brochure  anual del usuavio vealizado para el Decannto de AdluiviLstvaci6  12 - Copyplanet  Aerial DH 10 Instruction manual  E.CEROS  M1510/M1515 SoftSkin S40 シリコーンライナー下腿用 カタログ  LOURDEURS DIGESTIVES Pastilles digestives à base de plantes  DS-PFT Humidifier  Elo Touch Solution 1717L Rev B  

Copyright © All rights reserved.
Failed to retrieve file