Atari 400 Скачать руководство пользователя страница 1

Содержание 400

Страница 1: ... TO All PERSONS RECEIVING THIS DOCUMENT Reproduction is forbidden without the specific written permission of ATARI INC Sunnyvale CA 94086 No right to reproduce this document nor the subject matter thereof is granted unless by written agreement with or w ritten permi ssion from the Corporation I ATARI A Warner Communications Company C016555 Rev A ...

Страница 2: ...ATARI HOME COMPUTER SYSTEM OPE RATI NG SYSTEM USER S MANUAL I ATARI A Warner Communications Company ...

Страница 3: ...of is granted unless by written agreement with or written permission from the Corporation Every effort has been made to ensure that this manual accurately documents this product of the ATARI Home Computer Division However due to the ongoing improvement and update of the computer software and hardware ATARI INC cannot guarantee the accuracy of printed material after the date of publication and disc...

Страница 4: ...ION 18 GENERAL DESCRIPTION OF THE ATARI COMPUTER SYSTEM 18 Conventions Used in This Manual 20 HEXADECIMAL NUMBERS 20 MEMORY ADDRESSES 20 KILOBYTES OF MEMORY 20 PASCAL AS AN ALGORITHM SPECIFICATION LANGUAGE 20 MEMORY LAYOUTS 20 BACKUS NAUR FORM BNF 21 OS EQUATE FILENAMES 21 3 ...

Страница 5: ...3 CONFIGURATIONS 25 Program Environments 25 Blackboard Mode 25 Cartridge 26 Diskette Boot 26 Cassette Boot 26 RAM Expansion 27 Peripheral Devices 27 Game Controllers 27 Program Recorder 27 Serial Bus Devices 28 4 SYSTEM MEMORY UTILIZATION 29 RAM Region 29 Page 0 30 Page 1 30 OS Data Base 30 User Workspace 31 Boot eg ion 31 Screen Display List and Data 31 Free Memory Region 31 4 ...

Страница 6: ... MULTIPLE DEVICEIFILE CONCURRENCY UNIFIED ERROR HANDLING DEVICE EXPANSION CIO CALLING MECHANISM HANDLER ID ICHID 0340 DEVICE NUMBER ICDNO 0341 COMMAND BYTE ICCMD 0342J STATUS ICSTA 0343J BUFFER ADDRESS ICBAL 0344J AND ICBAH 0345 PUT ADDRESS ICPTL 0346 AND ICPTH 0347 BUFFER LENGTHIBYTE COUNT ICBLL 0348 and ICBLH 0349 AUXILIARY INFORMATION ICAX1 034AJ and ICAX2 034B REMAINING BYTES ICAX3 ICAX6 31 32...

Страница 7: ... Status Bytes 45 SPECIAL Special Function 45 Device Filename Specification 46 I O Example 47 Device Specific Information 50 Keyboard Handler 50 CIa Function Descriptions 51 Theory of Operation 51 DisPI a y Handier S 54 Screen Modes 54 TEXT MODE 0 54 TEXT MODES 1 AND 2 55 GRAPHICS MODES Modes 3 Through 11 56 SPLIT SCREEN CONFIGURATIONS 56 cto Function Descriptions User Alterable Data Base Variables...

Страница 8: ... FILE SECTOR FORMAT Resident Device Handler Vectors Resident Diskette Handler Diskette Handler Commands Serial Bus 1 0 6 INTERRUPT PROCESSING 76 76 78 78 79 81 82 84 87 89 90 92 93 94 95 96 96 97 99 101 102 Chip Reset 103 Nonmaskable Interrupts 103 Stage 1 VBLANK Process 104 Stage 2 VBLANK Process 105 Maskable Interrupts 107 Interrupt Initialization 108 System Timers 109 Usage Notes 109 POKEY Inte...

Страница 9: ...garithms LOG and LOG10 125 Floating Point Exponentiation EXP and EXP10 126 Floating Point Polynomial Evaluation PLVEVL 126 Clear FRO ZFRO 127 Clear Page Zero Floating Point Number ZF1 127 Load Floating Point Number to FRO FLDOR and FLDOP 127 Load Floating Point Number to FRl FLD1R and FLD1P 128 Store Floating Point Number From FRO FSTOR and FSTOP 128 Move Floating Point Number From FRO to FRl FMOV...

Страница 10: ...RAM ENVIRONMENT AND INITIALIZATION 142 144 144 145 145 147 147 148 148 149 149 150 152 153 153 153 157 Cartridge 157 Cartridge Without Booted Support Package 158 Cartridge With Booted Support Package 158 Diskette Booted Software 159 Diskette Boot File Format 159 Diskette Boot Process 160 Sample Diskette Bootable Program Listing 161 Program to Create Diskette Boot Files 162 Cassette Booted Software...

Страница 11: ... Capabilities 171 Cursor Control 171 Color Control 171 Alternate Character Sets 172 Player Missile Graphics 174 Hardware Capabilities 174 Conflicts With as 174 Reading Game Controllers 174 Keyboard Controller Sensing 174 Front Panel Connectors as 110 Ports 176 Hardware Information 176 Software Information 177 Other Miscellaneous Software Information 179 10 ...

Страница 12: ...Appendix H SCREEN MODE CHARACTERISTICS 188 Appendix I SERIAL BUS ID AND COMMAND SUMMARY 191 Appendix J ROM VECTORS 192 Appendix K DEVICE CHARACTERISTICS 194 Keyboard 194 Display 194 ATARI 410CTMJ Program Recorder 194 ATARI 820CTMJ 40 Column Impact Printer 195 ATARI 810CTMJ Disk Drive 197 Appendix L OS DATA BASE VARIABLE FUNCTIONAL DESCRIPTIONS 200 Central Data Base Description 200 FUNCTIONAL INDEX...

Страница 13: ... 221 Bit Mapped Graphics 221 Internal Working Variables 222 Internal Character Code Conversion 224 C DISKETTE HANDLER 225 D CASSETTE 225 Baud Rate Determination 226 Cassette Mode 227 Cassette Buffer 227 Internal Working Variables 228 E KEYBOARD 229 Key Reading and Debouncing 229 Special Functions 230 Start Stop 230 Autorepeat 231 Inverse Video Control 232 Console Keys SELECT START and OPTION 232 F...

Страница 14: ...um Data Buffering General Buffer Control Command Frame Output Buffer ReceivelTransmit Data Buffering SID Timeout Internal Working Variables ATARI CONTROLLERS Joysticks Paddles Light Pen Driving Controllers K DISK FILE MANAGER L DISK UTILITY POINTER M FLOATING POINT PACKAGE N Power Up and System Reset RAM Sizing Diskette Cassette Boot Environment Control 233 233 233 234 235 235 235 236 237 237 237 ...

Страница 15: ...ectors NMI Interrupt Vectors IRG Interrupt Vectors Hardware Register Updates Internal Working Variables R USER AREAS Alphabetical List of Data Base Variables Memory AddTess Ordered List oT Data Base Variables Floating Point Package Variables INDEX 14 252 253 253 253 254 254 255 255 255 256 258 258 259 266 270 271 ...

Страница 16: ...ing Mechanism An I O Example Keycode to ATASCII Conversion Table Text Modes 1 and 2 Data Form Graphics Modes 3 11 GET Data Form Graphics Modes 3 11 PUT Data Form Screen Display Block Diagram Cassette Handler Record Format Device Filename Syntax File Management Subsystem Diskette Sector Map File Management Subsystem Boot Record Format File Management Subsystem Boot P ocess File Management Subsystem...

Страница 17: ...Diagram 102 108 110 112 133 134 135 146 148 151 Figure 10 1 Cartridge Header Format 157 Figure 10 2 Diskette Boot File Format 159 Figure 10 3 Diskette Boatable Program Listing Example 162 Figure 10 4 Sample Cassette Bootable Program 168 Figure 11 1 User Defined Character Set Bit Memory Address 172 Figure 11 2 User Defined 8 x 8 Character Matrix Bit Table 173 Figure 11 3 Character Base Diagram 173 ...

Страница 18: ... used by the as It would be helpful to have a familiarity with programming concepts and terminology assembly language programming in gene al the Synertek 6502 in particular and digital hardware concepts and terminology you will be provided with the information you need to use the as resources without resorting to trial and error techniques or the as listing Supporting information for tasks that in...

Страница 19: ...of 48K RAM o The ATARI 800 Computer has a monitor Jack the ATARI 400 Computer does not The Hardware Circuit y o Produces both character and point graphics for black and white B W or color television o Produces four independent audio channels frequency controlled which use the television sound system o Provides one bi level audio output in the base unit o Interfaces with up to four Joysticks and ei...

Страница 20: ...30Q D31F IRG pots POKEY c t L ID20Q D21F t IRG audio Ikeyboard I Idata keysl BREAK on off t trigs cassette CTIA I interface t 1 tDOOQ D01F t I I serial I video I O DMA litpen bus t I ANTIC t ID400 D41FI NMI composite audio video TV from console CTIA speaker START SELECT OPTION Figure 1 1 ATARI Home Computer Block Diagram OPERATING SYSTEM C016555 Section 1 19 ...

Страница 21: ...ory Memor sizes are fre uentl expressed in units of kilobytes such as 32K where a kilobyte is 1024 bytes of memor PASCAL As an Algorithm Specification Language The PASCAL language procedure block onl is used as the specification language in the few places where an algorithm is specified in detail PASCAL syntax is similar to any number of other block structured languages and you should have no diff...

Страница 22: ... device specification device name device number device name CtDIEIKIPtR S device number 11213 41516 718 A device specification consists of a mandatory device name followed by an optional device number followed by the mandatory colon character The device name in turn must be one of the characters shown as alternatives The device number if it is present must be a digit 1 through 8 as E uate Filename...

Страница 23: ...which do not deal with character data This RAM data base is periodically updated to show the states of these devices INTERRUPT PROCESSING The interrupt system handles all hardware interrupts in a common and consistent manner By default all interrupts are fielded by the OS At your dis cret ion ind i v i dua lin t err upt s 0 r groups of interrupts can be fielded by the application program INITIALIZ...

Страница 24: ...dge diskette booted program cassette booted program or blackboard program SYSTEM RESETJ Pressing the SYSTEM RESETJ key causes the as to perform these following tasks a Clears the as portion of RAM 0 Rechecks top of RAM a Reestablishes all RAM interrupt vectors a Formats the device tab Ie 0 Initializes the cal tr i dge s a Sets up the screen for 24 x 40 text mode o Transfers contl ol to the cartrid...

Страница 25: ...parts o the as itsel The loating point numbers are stored as 10 BCD digits o mantissa plus a 1 bvte exponent The package contains these routines o ASClI to FP and FP to ASCII conversion o Integer to FP and FP to integer conversion o FP add subtract multiply and divide o FP log exp and polynomial evaluation o FP number clear load store and move OPERATING SYSTEM C016555 Section 2 24 ...

Страница 26: ...ied by the particular device descriptions These bytes will be referred to as ICAX3 ICAX4 ICAX5 and ICAX6 al though there are no e uates for those names in the OS e uate file CIO Functions The CIO supports records and blocks and the handlers support single bytes All of the system handlers support one or more of the eight basic functions subJect to restrictions based upon the direction of data trans...

Страница 27: ...le status codes In general a negative status will indicate a Tailure to open properly PUT ADDRESS pointer to the PUT CHARACTERS routine Tor the device handler Just opened It is recommended that this pointer not be used CLOSE Terminate Access to Device File and Release IOCB You issue a CLOSE command after you are through accessing a give n devic e of i Ie The CLOSE proc e s s c ompIe t esan y pen d...

Страница 28: ...ation BYTE COUNT BUFFER LENGTH number of bytes read to the buffer The BYTE COUNT will always e ual the BUFFER LENGTH except when an error or an end of file condition occurs PUT CHARACTERS Write n Characters Byte Aligned Access The specified number of characters are written from the user supplied buffer to the device file EOL characters have no buffer terminating properties although they have their...

Страница 29: ... IOCB parameters as a result of the GET RECORD operation STATUS result of GET RECORD operation BYTE COUNT BUFFER LENGTH number of bytes read to data buffer this can be less than the maximum buffer length PUT RECORD Write Up To n Characters Record Aligned Access Characters are written from the user supplied bUT fer to the device file until either the buffer is empty or an EOL character is written I...

Страница 30: ...troller SPECIAL Special Function Any command byte value greater than SOD is treated by CIa as a special case Since CIa does not know what the function is CIa transfers control to the device handler for complete processing of the operation The user sets the following IOCB parameters prior to calling CIa COMMAND BYTE SOD BUFFER ADDRESS pointer to a device filename specification if the IOCB is not al...

Страница 31: ...hat is a string of ATASCII characters in the following format specification device number J filename J eol device CIDIEIKIPIRIS number 1 2 314 5 6 718 filename has device dependent characteristics eol 9B The following devices are supported at this writing C Cassette drive 01 through 08 Floppy diskette drives E Screen Editor K Keyboard P 40 column printer P2 SO column printer R1 through R4 RS 232 C...

Страница 32: ...TES EOL 9B END OF LINE CHARACTER IOCB3 30 IOCB 3 OFFSET FROM IOCB 0 ICHID 0340 HANDLER 10 SET BY CIO ICDNO ICHID 1 DEVICE SET BY CIO ICCOM ICDNO 1 COMMAND BYTE ICSTA ICCOM l STATUS BYTE SET BY CIO ICBAL ICSTA 1 BUFFER ADDRESS LOW ICBAH ICBAL 1 BUFFER ADDRESS HIGH ICPTL ICBAH l ICPTH ICPTL 1 ICBLL ICPTH 1 BUFFER LENGTH LOW ICBLH ICBLL 1 BUFFER LENGTH HIGH ICAX1 ICBLH 1 AUX 1 ICAX2 ICAX1 1 AUX 2 OPE...

Страница 33: ...M X BUFF ICBAL X iBUFF 256 ICBAH X iBUFFSZ ICBLL X iBUFFSZ 256 ICBLH X CIOV TP20 SETUP OPEN COMMAND SETUP BUFFER POINTER TO POINT TO FILENAME SETUP FOR OPEN READ CLEAR AUX 2 PERFORM OPEN OPERATION STATUS WAS POSITIVE OK NO OPEN PROBLEM SETUP tlGET RECORD COMMAND SETUP DATA BUFFER POINTER SETUP MAX RECORD SIZE PRIOR TO EVERY READ READ A RECORD MAY BE END OF FILE A RECORD IS NOW IN THE DATA BUFFER B...

Страница 34: ...S ON READ CHECK FOR END OF FILE TP20 CPY EOF END OF FILE STATUS BNE ERROR NO ERROR LDA CLOSE YES CLOSE FILE STA ICCOM X JSR CIOV CLOSE THE FILE JMP END OF PROGRAM DATA REGION OF EXAMPLE PROGRAM NAME BYTE flDl TESTER Cf EOL BUFFSZ 80 80 CHARACTER RECORD MAX INCLUDES EOL BUFF READ BUFFER BUFFSZ END Figure 5 3 An 1 0 Example OPERATING SYSTEM C016555 Section 5 49 ...

Страница 35: ...r is one of the resident handlers It has a set of device vectors starting at location E420 The keyboard can produce any of the 256 codes in the ATASCII chaTacter set see Appendix F Note that a few of the keyboard keys do not generate data at the Keyboard Handler level These keys are described below 50 l J The ATAR key toggles a flag that enables disables the inversion of bit 7 of each data charact...

Страница 36: ...vice number and filename specification if included There are no device dependent option bits in AUXl or AUX2 CLOSE No special handler actions GET CHARACTERS and GET RECORD The handler returns the ATASCII key codes to CIa as they are entered with no facility for editing GET STATUS The handler does nothing but set the status to 01 Theory of Operation PreSSing a keyboard key generates an IRQ interrup...

Страница 37: ...is then converted to ATASCII using the first of the ollowing rules that applies 1 Ignore the code if the C and S bits are both set 2 If the C bit is set process the key as a CTRL code 3 If the S bit is set process the key as a SHIFT code 4 If CTRL lock is in effect process alpha characters as CTRL codes all others as lowercase 5 IF SHIFT lock is in effect process alpha characters as SHIFT codes al...

Страница 38: ... 69 49 09 20 T 74 54 14 OE 2D 5F 1C 2E W 77 57 17 OF 30 7C 1D 2F G 71 51 11 10 V 76 56 16 30 9 39 28 11 31 12 C 63 43 03 32 0 30 29 13 33 7 37 27 14 34 BACKS 7E 9C FE 15 8 62 42 02 35 a 38 40 16 X 78 58 18 36 r 3C 70 7D 17 Z 7A 5A lA 37 3E 9D FF 18 4 34 24 38 F 66 46 06 19 39 H 68 48 08 1A 3 33 23 9B 3A 0 64 44 04 18 6 36 26 3B lC ESC 1B lB is 3C CAPS 10 5 35 25 30 Q 67 47 07 lE 2 32 22 FD 3E S 73...

Страница 39: ...tarting at location E410 Screen Modes You can operate the display screen in any of 20 configurations modes 1 through 8 with or without split screen plus mode 0 and modes 9 through 11 without split screen Mode 0 is the text displaying mode Modes 1 through 11 are all graphics modes although modes 2 and 3 do display a sub set of th e ATASC I I c harac tel set Mod es 9 thr oug h 11 re uire a GTIA chip...

Страница 40: ...creen extends past the right margin or a text line at the bottom row is terminated by an EOL Scrolling removes the entire logical line that starts at the top of the screen and then moves all subsequent lines upward to fill in the void The cursor also moves upward if the logical line deleted exceeds one physical line All data going to or coming from the text screen is represented in a bit ATASCII c...

Страница 41: ... set Figure 5 5 Text Modes 1 and 2 Data Form GRAPHICS MODES Modes 3 Through 11 The screen has varying physical characteristics for each of the graphics modes as shown in Appendix H Depending upon the mode a 1 to 16 color selection is available for each pixel and the screen size varies from 20 by 12 lowest resolution to 320 by 192 highest resolution pixels There is no visible cursor for the graphic...

Страница 42: ...ts read and write AUX2 7 o I mode Where mode is the screen mode 0 through 11 Note I the screen mode selected is 0 then the AUXl C and S options are assumed to be O You share memory utilization with the Displa Handler in ormation Sharing is necessary because the Display Handler dynamically allocates high address memory for use in generating the screen display and because di Terent amounts oT memory...

Страница 43: ...a in the Tollowing screen mode dependent Torms where each byte contains the data for one CUl SOl position pixel thel e is no facility for having the handler return packed graphics data Figure 5 6 7 o ATASCII C D zero D zero D zero D Mode 0 Modes 1 2 C color data set D truncated ATASCII Modes 3 5 7 D color Modes 4 6 8 D color Modes 9 10 11 D data Graphics Mode 3 11 GET Data Form The cursor moves to...

Страница 44: ...n clear character The cursor moves to the next cursor position as each data byte is written For mode 0 the cursor will stay within the specified margins for all other modes the cursor ignores the margins While outputting the Display Handler monitors the keyboard to detect the pressing of the CTRLJ 1 key combination When this occurs the handler loops internally until that key combination is pressed...

Страница 45: ...command byte for DRAW is 11 FILL This special command fills an area of the screen defined by two lines with a specified color The command is set up the same as in DRAW but as each point of the line is drawn the routine scans to the right performing the procedure shown below in PASCAL notation WHILE PIXEL ROW COLJ 0 DO BEGIN PIXEL ROW COLl FILDATi COL COL li IF COL Screen right edge THEN COL 0 END ...

Страница 46: ... cursor can be set outside of the defined text margins with no ill effect You can read and write this region The home position 0 0 for both text and graphics is the upper left corner of the screen ROWCRS is a single byte COLeRS is maintained at 2 bytes with the least significant byte being at the lower address When you alter these variables the screen representation of the cursor will not move unt...

Страница 47: ...1 Playfield 1 COLOR2 COLPF2 PF2 Playfield 2 COLOR3 COLPF3 PF3 Playfield 3 COLOR4 COLBK BAK Playfield bac kground PCOLRO COLPMO PMO Player missile O PCOLR1 COLPMl PM1 Player missile 1 PCOLR2 COLPM2 PM2 Player missile 2 PCOLR3 COLPM3 PM3 Player missile 3 Theory of Operation The Display Handler automatically sets up all memory resources required to create and maintain the screen display at OPEN time ...

Страница 48: ...are registers allow for many other possibilities DATA BASE VARIABLE MEMTOP HARDWARE REGISTER Updated every VBLANK I c c c c Display SDLSTL DLISTL t c t t List SDLSTH Screen Data 1 SAVMSC Graphics and or Text End of RAM memory DLISTH t CHBAS EO 1 1 CHBASE I Specials andt EOOO Numbers Capital El00 1 Letters I Special E200 Graphics I Lowercase E300 I Letters OPERATING SYSTEM C016555 Section 5 63 ...

Страница 49: ...s of the character representations for the character data text modes only 64 The default value for this variable is EO This variable declares that the character representations start at memory address EOOO the character set provided by the OS in ROM Each character is defined as an 8X8 bit matrix requiring 8 bytes per character 1024 bytes are re uired to define the largest set since a character cod...

Страница 50: ...COLORO through COLOR4 contain the current color register assignments Hardware color registers receive these values as part of the stage 1 VBLANK process thus providing synchronized color changes see Appendix H Database variable SAVMSC points to the lowest memory address of the screen data region It corresponds to the data displayed at the upper left corner of the display When the Display Handler r...

Страница 51: ... the Display Handler not the Keyboard Handler or you In act the Keyboard Handler Display Handler and the Screen Editor are all contained in one monolithic hunk of code Most of the behaviors already defined for the Keyboard Handler and the Display Handler apply as well to the Screen Editor The discussions in this Section will be limited to deviations from those behaviors or to additional features t...

Страница 52: ...upports the following option AUX1 7 o IWIRI IFI Where Rand Ware the direction bits read and write CLOSE F 1 indicates that a forced read is desired see GET CHARACTER and GET RECORD for more information No special handler actions GET CHARACTER and GET RECORD Normally the Screen Editor will return data only when you press the RETURNJ key at the keyboard However the forced read OPEN option allows you...

Страница 53: ...current display of all data and the cursor is placed at the home position upper left corner of the screen CURSOR UP lC The cursor moves up by one physical line The cursor will wrap from the top line of the display to the bottom line CURSOR DOWN 10 The cursor moves down by one physical line The cursor will wrap from the bottom line of the display to the top line CURSOR LEFT lE The cursor moves left...

Страница 54: ... current cursor position within the logical line from being a tab point There is no clear all tab points facility provided by the Handler TAB 7F The cursor moves to the next tab point in the current logical line or to the beginning of the next line if no tab point is found This function will not increase the logical line length to accommodate a tab point outside the current length e g the logical ...

Страница 55: ... the deleted character is moved to the left by one pOSition The number of physical lines composing a logical line can decrease as a result of this function ESCAPE 1S The next non EOL character following this code is displayed as data even if it would normally be treated as a control code The se uence ESC ESC will cause the second ESC character to be displayed BELL FD An audible tone is generated t...

Страница 56: ...yte of TXTCOL should always be zero The home position 0 0 for the text window is the upper left corner of the window Enable Inhibit of Control Codes in Text Normally all text mode control codes are operated upon as received but sometimes it is desirable to have the control codes displayed as if they were data characters This is done by setting the variable DSPFLG 02FE to any nonzero value before o...

Страница 57: ...Invalid AUXI b te on OPEN 88 end of file 8A 90 SIO error set see Appendix C The Cassette Handler is one of the resident handlersl and therefore has a set of device vectors starting at location E440 CIO Function Descriptions The device specific characteristics of the standard CIa functions are detailed below OPEN The device name is C and the Handler ignores any device number and filename specificat...

Страница 58: ... the cassette is opened for writing the motor keeps running until the first record 128 data bytes is written If 128 data bytes are written or the cassette is closed within about 30 seconds of the OPEN and no other serial bus I O is performed then there is no problem However if those conditions are not met some noise will be written to the tape prior to the first record and an error will occur when...

Страница 59: ...bytes written a value of 98 EOL causes no special action GET STATUS The Handler does no more than set the status to 01 Theory of Operation The Cassette Handler writes and reads all data in fixed length records of the format shown below Figure 5 9 74 01010 10 1 0 1 0 1 0 1 0 1 t control byte 128 data bytes checksum Speed measurement bytes Managed by SIO not the Hand ler Cassette Handler Record Form...

Страница 60: ...D7 File Structure The Cassette Handler writes a file to the cassette device with a file structure that is totally imposed by the Handler soft format A file consists of the following three elements o A 20 second leader of mark tone o Anq number of data record frames o An end of file frame The cassette data record frames are formatted as shown below frame pre record write tone PRWT data record post ...

Страница 61: ...unctions are detailed below OPEN The device name is P The Handler ignores any device number and filename specification if included CLOSE The Handler writes any data remalnlng in its buffer to the printer device with trailing blanks to fill out the line PUT CHARACTERS and PUT RECORD The Handler accepts print data in the following format 7 o ATASCII The only ATASCII control code of any significance ...

Страница 62: ...sed DVSTAT 0 1 2 3 The command status contains the following status bits and condition indications bit 0 bit 1 bit 7 an invalid command frame was received an invalid data frame was received an intelligent controller normally 0 The next byte contains the AUX2 value from the previous operation The timeout byte contains a controller provided maximum timeout value in seconds Theory of Operation The AT...

Страница 63: ... Version III has all new file directory map structures and can possibly contain changes to your interface as well The File Management Subsystem includes a disk bootable RAM resident Disk File Manager DFM that maintains a collection of named files on diskettes Up to 4 disk drives 01 through 04 can be accessed and up to 64 files per diskette can be accessed The system diskettes supplied by ATARI all...

Страница 64: ...e not found Point invalid file not OPENed for update CIO Function Descriptions The device specific characteristics of the standard CIO functions are detailed below OPEN FILE The device name is D Up to four disk drives can be accessed D1 through D4 The disk filename can be from 1 to 8 characters in length with an optional 1 to 3 character extension The OPEN FILE command supports the following optio...

Страница 65: ...r output can not be opened concurrently for any other access OPEN Append AUXl 09 The indicated file is opened for output starting with the byte after the last byte of the existing file that must already exist if the file is not locked Any wild card characters are used to search for the first match If a file opened for append is not properly closed the appended data will be lost The existing file w...

Страница 66: ...ers it will be padded with blanks if it is greater than 3 characters the extra characters will be ignored terminator EOL blank Figure 5 10 Device Filename Syntax The following are all valid device filenames for the diskette Dl GAME SRC D MANUAL6 D WHY D3 FILE D4 BRIDOE 002 Filename Wildcarding The filename specification can be further generalized to include the use of the uwild card characters and...

Страница 67: ...and allows you read directory information for the selected filename s using normal GET CHARACTERS or GET RECORD commands The information read will be formatted as ATASCII records suitable for printing as shown below Wildcarding can be used to obtain information for multiple files or the entire diskette The OPEN DIRECTORY command uses the same CIO parameters as a standard OPEN FILE command COMMAND ...

Страница 68: ...he opening of another diskette file while the directory read is open will cause subsequent directory reads to malfunction so care must be taken to avoid this situation CLOSE Upon closing a file read the Handler releases all internal resources being used to support that file Upon closing a file write the Handler o writes any residual data from its file buffer for that file to the diskette o updates...

Страница 69: ...the paragraphs that follow NOTE COMMAND BYTE S25 This command returns to the caller the exact diskette location of the next byte to be read or written in the variables shown below ICAX3 LSB of the diskette sector number ICAX4 MSa of the diskette sector number ICAX5 relative sector displacement to byte 0 124 POINT COMMAND BYTE S26 This command allows you to specify the exact diskette location of th...

Страница 70: ...ve the lock status of any number of named files Unlocking a file that is not locked is a valid operation The Handler expects a device filename specification then all occurrences of the filename specified will be unlocked using the wild card rules You set up these following IOCB paramete s prior to calling CIO COMMAND BYTE 24 BUFFER ADDRESS pointer to device filename specification After an UNLOCK o...

Страница 71: ...ard rules No protection is provided against forming duplicate names Once formed duplicate names cannot be separately renamed or deleted however an OPEN FILE command will always select the first file found that matches the filename specification so that file will always be accessible The RENAME command does not alter the content of the files involved merely the name in the directory Examples of som...

Страница 72: ...of the boot file must then be written to sectors 2 n This is accomplished by writing the file named DOS SYS This is a name that is recognized by the FMS even though it is not in the directory initially Theory of Operation The resident as initiates the disk boot process see Section 10 The OS reads diskette sector 1 to memory and then transfers control to the boot continuation address boot address 6...

Страница 73: ...te sectors 0 719 and the disk controller s numbering of diskette sectors 1 720 i as a result onlv sectors 1 719 are used bV the Disk File Manager The Disk File Manager us s the Disk Handler to perform all diskette reads and writes the DFM s function is to support and maintain the directory file bitmap structures as described in the following pages OPERATING SYSTEM C016555 Section 5 88 ...

Страница 74: ... Sector 360 168 Sector 361 169 Sector 368 170 Sector 719 2CF Sector 720 200 1 Figure 5 11 Map File Management Subsystem Diskette Sector Utilization NOTE 1 If the diskette is not a system diskette then your File Area starts at sector 2 and no space is reserved for the FMS BOOT file However DOS DOS SYS and DUP SYS may still be written to a diskette that has already used sectors 2 N II NOTE 2 VTOC st...

Страница 75: ...ess 0700 init address JMP 4B boot read continuation address B jte 0 1 2 4 6 max Piles 3 drive bits 1 ailoc dirc 0 I boot image end address 1 boot flag 0 I sector count DOS SYS starting sector number 9 Note 1 10 Note 2 11 Note 3 FMS configuration data 14 Note 4 15 Note 5 code for second phase of boot Figure 5 12 File Management Subsystem Boot Record Format OPERATING SYSTEM C016555 Section 5 90 ...

Страница 76: ...5 432 1 0 141312111 where a 1 indicates a selected drive NOTE 3 Byte 11 specifies the buffer allocation direction this byte should equal O NOTE 4 Byte 14 must be nonzero for the second phase of the boot process to initiate This flag indicates that the file DOS SYS has been written to the diskette NOTE 5 This byte is assigned as being the sector count for the DOS SYS file It is actually an unused b...

Страница 77: ...ectors are loaded to memory as part of the boot process Figure 5 13 92 dat 3 prom boot sector read by resident OS data prom rest of DOS SYS read by the program in the boot sector Memory address 0700 077C 077D end of boot File Management Subsystem Boot Process Memory Map OPERATING SYSTEM C016555 Section 5 ...

Страница 78: ...ontents The volume bit map organization location follows 7 o 1 2 3 4 5 6 7 8 9 Byte 10 of VTOC 11 99 Figure 5 15 File Management Subsystem Volume Bit Map At each map bit position a 0 indicates the corresponding sector is in use and a 1 indicates that the sector is available NOTE 1 The directory type byte must e ual o NOTE 2 The maximum sector number is not used because it is incorrectly set to 709...

Страница 79: ...serves eight sectors 361 368 for a file directory Each sector containing directory information Tor up to eight filesl thus providing For a maximum of 64 Files for any volume The format of a single 16 byte file entry is shown below flag byte Byte 0 sector lo 1 count hi starting 10 3 sector number hi I 1 5 2 3 file 4 name 5 primary 6 7 8 File 1 13 name 2 extension 3 Figure 5 16 File Directory Format...

Страница 80: ...yte count 127 File Management Subsystem File Sector Format The FHS uses the file to verify file integrity The file is a redundant piece of information The file number field contains the value of the directory position of that file If a mismatch occurs between the file s director position and the file number as contained in each sector then the DFM will generate the error A4 The forward pointer fie...

Страница 81: ...ations that utilize fixed device assignments such as output to the Display Handler For each resident Handler there is a set of vectors ordered as shown below OPEN 0 CLOSE 2 GET BYTE 4 PUT BYTE 6 GET STATUS 8 SPECIAL 10 JMP 12 INIT SPARE BYTE Figure 5 18 Resident Device Handler Vectors See Section 9 for a detailed description of the data interface for each of these Handler entry points Each of the ...

Страница 82: ... E400 E410 E420 E430 E440 The resident diskette Handler is not CIO compatible so its interface does not use a vector set Resident Diskette Handler The resident Diskette Handler not to be confused with the Disk File Manager is responsible Tor all ph sical accesses to the diskette The unit of data transfer for this Handler is a single diskette sector containing 128 data btJtes Communication between ...

Страница 83: ...s BUFFER ADDRESS DBUFLO 0304 and DBUFHI 0305 This 2 byte pointer contains the address of the source or destination of the diskette sector data You need not supply an address for the disk status command The Disk Handler will obtain the status and insert the address of the status buffer into this field DISK TIMEOUT VALUE DTIMLO 0306 The Handler supplies this timeout value in whole seconds for use by...

Страница 84: ...ead Upon return from the sector several of the other DCB parameters will have been altered The STATUS BYTE will be the only parameter of interest to you however PUT SECTOR Command byte 50 Not supported by current Handler But can be accessed through SIO directly The Handler writes the specified sector Tram your buffer and returns the operation status You set the following DCB parameters prior to ca...

Страница 85: ...t 0 1 indicates an invalid command frame was received Bit 1 1 indicates an invalid data frame was received Bit 2 1 indicates that a PUT operation was unsuc c essfu 1 Bit 3 1 indicates that the diskette is write protected Bit 4 1 indicates ac t i ve standb y The hardware status byte contains the status register of the INS1771 1 Floppy Diskette Controller chip used in the diskette controller See the...

Страница 86: ...no bad sectors the count will e ual zero Serial Bus 1 0 InputlOutput to devices other than the keyboard the screen and the ATARI Computer controller port devices must utilize the Serial 110 bus This bus contains data control and clock lines to be used to allow the computer to communicate with external devices on this Ifdaisychained bus Every device on the bus has a unique identifier and will respo...

Страница 87: ...I type cannot be disabled at the processor leveli but the NMI interrupts other than SYSTEM RESET key can be disabled at the ANTIC chip The system events that can cause interrupts are listed below chip reset power up NMI Display list interrupt unused by aS vertical blank 50 60 Hz SYSTEM RESET key IRQ Serial bus output ready Serial bus output complete Serial bus input ready Serial bus proceed line u...

Страница 88: ... the interrupt is determined by examining hardware register NMIST D40Fl The NMI makes a Jump through the global RAM vector VDSLST 0200J if a display list interrupt is pending The OS does not use display list interrupts so VDSLST is initialized to point to an RTI instruction and you must not change it before VDSLST generates a display interrupt If the interrupt is not a display list interrupt then ...

Страница 89: ...or restore original vectors without having to save them The instruction at E45F is a JMP to the stage 1 VBLANK processor the address at E460 2 is the value normall found in VVBLKI The instruction at E462 is a JMP to the VBLANK exit routine the address at E463 2 is the value normall found in VVBLKD These ROM vectors to stage 1 VBLANK processor and to the VBLANK exit routine will accomplish our goal...

Страница 90: ...MACTL D400 CHBAS 02F4 CHBASE D409 CHACT 02F3 CHACTL D401 GPRIOR 026F PRIOR 0018 COLORO 02C4 COLPFO 0016 Attract mode COLOR 1 02C5 COLPFl 0017 COLOR2 02C63 COLPF2 0018 COLOR3 02C7 COLPF3 D019 COLOR4 02CS COLBK DOIA PCOLRO 02CO COLPMO 00123 PCOLRl 02Cl COLPMl D013 PCOLR2 02C2 COLPM2 0014 PCOLR3 02C3 COLPM3 0015 Constant 8 CONSOL DOIF Console speaker off The stage 2 VBLANK process decrements the Syst...

Страница 91: ...ame controller data from the hardware to the RAM data base as shown below Hardware Register PORTA PORTB POT 0 POT 1 POT 2 POT 3 POT 4 POT 5 POT 6 POT 7 TRIGO TRIGl TRIG2 TRIG3 D300 0301 D200 D201 0202 D203 D204 D205 0206 D207 D001 D002 D003 D004 Data Base Function Item STICKO 0278 oysticks and STICKl 0279 PTRIGO 027C Paddle Controllers PTRIGl 027D PTRIG2 027E PTRIG3 027F STICK2 027A STICf 3 0278 P...

Страница 92: ...ector VSEROR 020Cl o If the interrupt is due to serial 1 0 bus input ready then clear the interrupt and Jump through global RAM vector VSERIN 020Al o If the interrupt is due to serial 1 0 bus output complete then clear the interrupt and Jump through global RAM vector VSEROC 020El o If the interrupt is due to POKEY timer 1 then clear the interrupt and Jump through global RAM vector VTIMR1 02101 o I...

Страница 93: ...stem is powered up or the SYSTEM RESET key is pressed The OS clears the hardware registers and sets the interrupt global RAM vectors to the following configurations Vector Type Function VDSLST 0200 NMI RTI ignore interrupt VVBLKI 0222 u System stage 1 VBLANK CDTMAl 0226 II SID timeout timer CDTMA2 0228 u No system function VV13LKD 0224 II System return from interrupt VIMIRG 0216 IRG System IRG pro...

Страница 94: ...ping to zero when it overflows The following table shows the timers and the frame counter characteristics Timer Name Flag Vector Use CDTMV1 0218 CDTMA1 0226J 2 byte vector SID timeout CDTMV2 021A CDTMA2 0228J 2 byte vector CDTMV3 021CJ CDTMF3 022AJ 1 byte flag CDTMV4 021EJ CDTMF4 022CJ 1 byte flag CDTMV5 0220 CDTMF5 022EJ 1 byte flag RTCLOK 0012 3 byte frame counter These two timers are maintained...

Страница 95: ...INTERRUPT DISABLE SEI TO AVOID CONFLICT WITH IRG LDA POKMSK PROCESSOR WHICH ALTERS VAR AND FF xx DISABLE BIT S STA POKMSK STA IRGEN TO HARDWARE REGISTER TOO CLI Figure 6 3 POKEY Interrupt Mask Example Note that the OS IRG service routine uses and alters POKMSK so alterations to the variable must be done with interrupts inhibited IT done at the interrupt level there is no problem as the I bit is al...

Страница 96: ... list interrupt will always be disabled on return even if enabled upon entry It is possible to fully process a vertical blank interrupt during a call to this routine When working with the System Timers the vectors for timers 1 and 2 and the flags for timers 3 4 and 5 should be set while the associated timer is e ual to zero then the timer should be set to its nonzero value Stack Content at Interru...

Страница 97: ...le The OS initializes these entries at power up Improperly changing these vectors will alter system performance Miscellaneous Considerations The following paragraphs list a set of miscellaneous considerations for the writer of an interrupt service routine Restrictions on Clearing of I Bit Display list immediate vertical blank and System Timer 1 routines should not clear the 6502 I bit If the NMI l...

Страница 98: ...uch interrupts will be delayed by one horizontal scan line This condition cannot be prevented You can work around the condition by examining the line count VCOUNT CD40Bl and delaying interrupt processing by one line when no WSYNC delay has occurred FLOWCHARTS The following pages contain process flowcharts showing the main events that occur in the NMI and IRG interrupt processes VIMIRQ PUSH REG A T...

Страница 99: ...114 PULL REG A FROM STACK CLEAR STATUS SET BREAK FLG CLEAR SIS VPRCED VINTER OPERATING SYSTEM C016555 Section 6 ...

Страница 100: ...NMI INTERRUPT PROCESS PUSH REG A TO STACK PUSH X Y CLEAR STATUS RESTORE REGISTERS VDSLST VVBLKD OPERATING SYSTEM C016555 Section 6 115 ...

Страница 101: ...et initializes only the as RAM region In both cases the as calls the outer level software initialization entry points allow the application to initialize its own variables Pressing the SYSTEM RESET key produces an NMI interrupt It does not perform a 6502 chip reset If the processor is locked up the SYSTEM RESET key cannot be sufficient to unlock it and the system must have power cycled to clear th...

Страница 102: ...re DOOO through DOFF D200 through D2FF D300 through D3FF D400 through D4FF 6 The OS clears RAM from location 0008 to the address determined in step 41 above 7 The default value for the noncartridge control vectoT DOSVEC OOOA is set to point to the blackboard routine At the end of initialization control is passed through this vector if a cartridge does not take control 8 The coldstart flag COLDST 0...

Страница 103: ...he cartridge slot addresses for cartridges B and A are examined to determine if cartridges are inserted if RAM does not extend into the cartridge address space If the content of location 9FFC is zero then a JSR is executed through the vector at 9FFE thus initializing cartridge BU The cartridge is expected to return If the content of location BFFC is zero then a JSR is executed through the vector a...

Страница 104: ...nd bit 2 0 f 9FFD i 5 1 then a JMP is executed through the vector at 9FFA Or a Jump is executed through the vector DOSVEC that can point to the blackboard routine default ca5e cassette booted software or diskette booted software DOSVEC can be altered by the booted 50ftware as explained in Section 10 SYSTEM RESET INITIALIZATION WARMSTART PROCEDURE The functions listed below are performed in the ord...

Страница 105: ...ower up steps 19 and 20 Note that the initialization procedures and main entries for all software entities are executed at every system reset as well as at p0 we r up se este ps 14 17 18 20I F and G 1fthe user supplied initialization startup code must behave differently in response to system reset than it does to power up then the warmstart flag WARMSr 0008J should be interrogated WARMST 0 means p...

Страница 106: ...ge provides the following operations ASCII to FP conversion FP to ASCII conversion Integer to FP conversion FP to integer conversion FP add subtract multiply and divide FP logarithm exponentiation and polynomial evaluation FP zero load store and move A floating point operation is performed by calling one of the provided routines each at a fixed address in ROM after having set one or more floating ...

Страница 107: ...tring as input and produces a floating point number in internal form Calling se uence INBUFF pointer to buffer containing the ASCII representation of the number CIX the buffer offset to the first byte of the ASCII number JSR ses FRO CIX AFP D800l first byte of ASCII number is invalid floating point number the buffer offset to the first byte after the ASCII number Algorithm The routine takes bytes ...

Страница 108: ...Function This routine converts a 2 byte unsigned integer 0 to 65535 to floating point internal representation Calling se uence FRO integer FRO O LSB FRO l MSB JSR IFP D9AAl FRO loating point representation of integer Floating Point to Integer Conversion FPI Function This routine converts a positive floating point number rom its internal representation to the nearest 2 byte integer Calling se uence...

Страница 109: ...loating point numbers and checks the result for out of range Calling sequence FRO floating point minuend FRI floating point subtrahend JSR FSUB DA60 BCS out of range result FRO result of FRO FRI FRI is altered Floating Point Multiplication FMUL Function This routine multiplies two floating point numbers and checks the result for out of range Calling sequence 124 FRO floating point multiplier FRI f...

Страница 110: ...LOG DECO for natural logarithm JSR LOG10 DED1 for base 10 logarithm BeS negative number or overflow FRO floating point logarithm FRl is altered Algorithm Both logarithms are first computed as base 10 logarithms using a 10 term polynomial approximation the natural logarithm is computed by dividing the base 10 result by the constant LOG10 e The logarithm of a number Z is computed as follows F 10 Y Z...

Страница 111: ...rm 10 F is evaluated using a polynomial approximation and 10 I is a straightforward modification to the floating point exponent Floating Point Polynomial Evaluation PLYEVL Function This routine performs an n degree polynomial evaluation Calling sequence X Y pointer X LSB to list of FP coefficients A i ordered from high order to low order six bytes per coefficient A number of coeTficients in list F...

Страница 112: ...ce x Zero page address of FP number to clear JSR ZFl DA46J Zero page FP number X zero Load Floating Point Number to FRO FLOOR and FLOOP Function These routines load pseudo register FRO with the floating point number specified by the calling se uence Calling se uence or X V pointer X LSB to FP number JSR FLDOR DD89J FLPTR pointer to FP number JSR FLDOP DD8DJ FRO floating point number in either case...

Страница 113: ...s in prior descriptionsl except the floating point number is stored from FRO rather than loaded to FRO FSTOR DDA71 and FSTOP CDDABJ Move Floating Point Number From FRO to FR1 FMOVE Function This routine moves the floating point number in FRO to pseudo register FR1 Calling sequence JSR FMOVE CDDB6J FRl FRO FRO remains unchanged RESOURCE UTILIZATION The floating point package uses the lollowing RAM ...

Страница 114: ... zero The absolute value of floating point numbers must be greater than 10 98 and less than 10 98 or be equal to zero There is perfect symmetry between positive and negative numbers with the exception that negative zero is never generated The precision of all computations is maintained at 9 or 10 decimal digits but accuracy is somewhat less for those functions involving polynomial approximations l...

Страница 115: ...1 37 100 0 Stored 40 37 00 00 00 00 FP exponent 40 0 Number 4 60312486 10 11 46 03 100 5 Stored C5 46 03 01 24 86 FP exponent 80 40 5 Number 0 0 Stored 00 00 00 00 00 00 special case OPERATING SYSTEM C016555 Section 8 130 ...

Страница 116: ...ler mapping on OPEN 110 Control Block IOCB maintenance Logical record handling User buffer handling The device handlers are below CIO They perform the following functions Device initialization on power up and system reset Device dependent support of OPEN and CLOSE commands Byte at a time data input and output Device dependent special operations Device dependent command support Device data buffer m...

Страница 117: ...control structure is used for communication at each interface as follows User CIO I O Control Block IOCB CIO Handler Zero page IOCB ZIOCB Handler SIO Device Control Block DCS OPERATING SYSTEM C016555 Section 9 132 ...

Страница 118: ...dier Han dIel DCB SIO Utility Where shows a control path shows the data structure re uired for a path Note the following 1 The Keyboard Display Screen Editor handlers don t use SIO 2 The Diskette Handler cannot be called directly from CIa 3 The DCB is shown twice in the diagram Figure 9 1 I O Subsystem Flow Diagram OPERATING SYSTEM C016555 Section 9 133 ...

Страница 119: ...ore entries zero fill to end of table Figure 9 2 Device Table Format This 38 byte table will hold a maximum OT 12 entries with the last 2 bytes being zero CIO scans the table Trom the end to the beginning high to low address so the entry nearest the end oT the table will take precedence in case of multiple occurrences oT a device name The device name Tor each entry is a single ATASCII character an...

Страница 120: ...ndler entries defined in the vector table The vector table provides the handler addresses or certain fixed unctions to be performed to CIa In addition operation parameters also must be passed for most functions Parameter passing is accomplished using the 6502 A X and Y registers and an IaCB in page 0 named ZIOCB 0020J In general register A is used to pass data register X contains the index to the ...

Страница 121: ...ons Supported This section describes the functions associated with the first six vectors from the handler vector table This section also presents a brief device independent description of the CIO handler interface and recbmmended actions for each function vector OPEN This entry is called in response to an OPEN command to CIO The handler is expected to validate the OPEN parameters and perform any r...

Страница 122: ...orm the indicated CLOSE and indicates the status of the operation by the value of the Y register CIa releases the associated IOCB after the handler returns regardless of the operation status value GETBYTE This vector table entry is called in response to a GET CHARACTERS or GET RECORD command to CIO The handler is expected to return a single byte in the A register or return an error status in the Y...

Страница 123: ...information The handler sends the data byte directly to the device or to a handler maintained buffer and returns to CIO with the operation status in the Y register If a handler maintained buffer fills the handler will send the buffered data to the device before returning to CIO CIO checks for WRITEs to device files that have not been opened or have been opened for input only The handler will not b...

Страница 124: ...dler must check where there are restrictions See Section 5 for a discussion of the CIO actions involved with a GET STATUS operation using both open and closed IOCB s and note the impact of this operation on the use of the buffer address parameter SPECIAL This handler entr is used to support all functions not handled by the other entr points such as diskette file RENAME display DRAW etc Sp e c i f ...

Страница 125: ...g the handler to process the remaining errors These errors include out of range parameters BREAK key abort Invalid command Read after end of file The current handlers respond to errors using the following guidelines They keep the recovery simple and therefore predictable and repeatable They Do not interact directly with you for recovery instructions They lose as little data as possible They make a...

Страница 126: ...CRS Y PLA STA COLCRS 1 PLA STA COLCRS utilize the stack for example SAVE ON STACK in a HANDLER S POINTER DO YOUR POINTER THING RESTORE OLD DATA Note that the Display Handler or Screen Editor should not be called before restoring the original value of COLCRS because COLeRS is a variable used by those routines Nonzero Page RAM There is no allocation scheme to support the assignment of fixed regions ...

Страница 127: ... data between the bus and the caller s buffer Calling Mechanism SIO has a single entry point SlaV E459J for all operations The device control block DCB 0300 contains all parameters passed to SID The DCB contains the following bytes DEVICE BUS ID DDEVIC 0300 The bus ID of the device is set by the handler prior to calling SID see Appendix I DEVICE UNIT DUNIT 0301 This byte indicates that of n units ...

Страница 128: ...he handler sets this 2 byte pointer It indicates the source or destination buffer for device data or status information DEVICE TIMEOUT DTIMLO 0306 The handler sets this byte It specifies the device timeout time in units of 64 60 of a second For example a count of 6 specifies a timeout of 6 4 seconds BUFFER LENGTH BVTE COUNT DBVTLO DBVTHI 0308 0309 The handler sets this 2 byte count for the current...

Страница 129: ...e and data frame ACK byte timeout of 1 60 of a second 0 1 1 60 The handler specifies the maximum COMPLETE byte timeout value in DTIMLO Bus errors SIa detects and reports UART overrun and framing errors The sensing of these errors in any received byte will cause the entire associated Trame to be considered bad Data frame checksum error SIO validates the checksum on all received data frames and gene...

Страница 130: ...l communication Hardware Electrical Characteristics The ATARI 400 and the ATARI 800 Home Computers communicate with peripheral devices over a 19 200 baud asynchronous serial port The serial port consists of a serial DATA OUT transmission line a serial DATA IN receiver line and other miscellaneous control lines Data is transmitted and received as 8 bits of serial data LSB sent first preceded by a l...

Страница 131: ...urns to low in the middle oT each bit DATA IN is the serial bus data line to the computer Pin 4 GND is the signal shield ground line DATA OUT is the serial bus data line Trom the computer Pin 6 GND is the signal shield ground line COMMAND is normally high and goes low when a command Trame is being sent Trom the computer MOTOR CONTROL is the cassette motor control line high on low oTT PROCEED is no...

Страница 132: ...with external lOOKohm pull up Vec READY input VIH 2 0v min IIH 1ma max VIL O 4v max Input goes to logic zero when open Bus Commands The bus protocol specifies that all commands must originate from the computer and that peripherals will resent data on the bus only when commanded to Every bus operation will go to completion before another bus operation is initiated no overlap An error detected at an...

Страница 133: ...e ID specifies that of the serial bus devices is being addressed see Appendix I for a list of device IDs The command byte contains a device dependent command see Appendix I for a list of device commands The auxiliary bytes contain more device dependent information The checksum byte contains the arithmetic sum of the first four bytes with the carry added back after every addition Command Frame Ackn...

Страница 134: ...ion being added back the same as for the command frame In the case of the computer sending a data frame to a peripheral the peripheral is expected to send an ACK if the data frame is acceptable and send a NAK 4E or do nothing if the data frame is unacceptable See the first flowchart in Section 9 Operation Complete A peripheral is also expected to send an operation COMPLETE byte 43 at the time the ...

Страница 135: ...nd data receive and immediate DATA SEND se uence COMMAND DATA OUT DATA IN cmnd data rame rame I I I I I I I I I ACK ACK CMPL I I I I e to t1 t2 t3 t4 t5 DATA RECEIVE se uence COMMAND DATA OUT DATA IN 150 cmnd rame I I t I I data rame ACK CMPL I I t f to t1 t2 t5 OPERATING SYSTEM C016555 Section 9 ...

Страница 136: ...osec peripheral to min peripheral to max The computer generates a delay t1 between the transmission of the last bit of the command frame and the raising of the COMMAND line computer t1 min 650 microsec computer tl max 950 microsec peripheral tl min peripheral tl max The peripheral generates a delay t2 between the raIsIng of COMMAND and the transmission of the ACK byte by the peripheral computer t2...

Страница 137: ...f the COMPLETE byte by the computer computer t5 min 250 microsec computer t5 max 255 sec handler dependent peripheral t5 min peripheral t5 max N A HANDLER ENVIRONMENT Nonresident handlers can be installed in at least three different manners 1 As booted software from diskette or cassette 2 Resident in a cartridge A or B 3 Downloaded from a serial bus device This section will discuss the basic mecha...

Страница 138: ...e cartridge software will insert the handler S vector table pointer and name to the device table whenever the cartridge s initialization entry point is entered on power up and system reset Remember that both power up and s stem reset clear the device table of all but the resident handler entries therefore the device table must be reestablished b the handler initialization procedure upon ever entry...

Страница 139: ...154 PERIPHERAL S COMMAND FRAME PROCESSING WAIT FOR HIGH TO LOW TRANSITION ON COMMAND GET NEXT 5 BYTES ON THE BUS WAIT FOR COMMAND TO GO HIGH SEND ACK TIMEOUT SEND NAK OPERATING SYSTEM C016555 Section 9 ...

Страница 140: ...DATA FRAME TO PERIPHERAL SETUP TO READ DATA FRAME GET N BYTES FROM BUS SEND NAK ATTEMPT TO PERFORM INDICATED OPERATION SEND COMPLETE TIMEOUT NO SEND ACK SEND ERR OPERATING SYSTEM C016555 Section 9 155 ...

Страница 141: ... FRAME TO COMPUTER ATTEMPT TO PERFORM INDICATED OPERATION SEND COMPLETE SEND DATA FRAME ATTEMPT TO PERFORM INDICATED OPERATION SEND COMPLETE NO SEND ERR IMMEDIATE NO SEND ERR OPERATING SYSTEM C016555 Section 9 ...

Страница 142: ...not A cartridge can specify whether the diskette is to be booted at power up time whether the cartridge is to provide the controlling software or whether the cartridge is a special diagnostic cartridge These options are specified by bits in the cartridge header as shown below cartridge BFFA 9FFA for cartridge B start address 00 option byte cartridge init address BFFF 9FFF for cartridge B Figure 10...

Страница 143: ...byte is 1 The application should examine the variable WARMST 0008J if system reset action is to be different than power up WARMST will be zero on power up and nonzero thereafter Cartridge Without Booted Support Package A cartridge that does not specify the diskette boot option and does not support the cassette boot possibility can use lower memory from 0480 to the address in MEMTOP 02E5J in any wa...

Страница 144: ...on Diskette Boot File Format The key region of a diskette boot file is the first six bytes which are formatted as shown below Figure 10 2 flags first byte of sectors t memory address t t to start load init address boot continuation code sixth byte Diskette Boot File Format The first byte is stored in DFLAGS 0240l but is otherwise unused It should equal zero The second byte contains the number of 1...

Страница 145: ...itialization address in DOSINI 000C 21 3 Move the record Just read to the load address specified 4 Read the remaining records directly to the load area 5 JSR to the load address 6 where a multistage boot process can continue The carry bit indicates the success of this operation carry set error carry reset success NOTE During step 5 after the initial boot process is complete the booter will transfe...

Страница 146: ...itialization can also be deferred until Step 7 for controlling applications 7 JMP indirectly through DOSVEC to transfer control to the app I ication NOTE PreSSing the SYSTEM RESET key after the application is fully booted will cause steps 6 and 7 to be repeated Sample Diskette Bootable Program Listing This skeletal program can be booted from the diskette It retains control when it is entered THIS ...

Страница 147: ... POINT PINIT RTS NOTHING TO DO HERE FOR CONTROLLING APPLICATION THE MAIN BODY OF THE PROGRAM FOLLOWS RESTRT THE MAIN BODY OF THE PROGRAM ENDS HERE PND PND NEXT FREE LOCATION END Figure 10 3 Diskette Bootable Program Listing Example Program to Create Diskette Boot Files This section provides a program that can be used to make bootable files on diskettes The program given is not the only one possibl...

Страница 148: ...M PND PROGRAM END ADDRESS SEE SAMPLE PROGRAM SECSIZ 128 DISKETTE SECTOR SIZE PST 0700 PND 1324 FLEN PND PST SECSIZ l SECSIZ OF SECTORS IN FILE 8000 THIS PROGRAM S ORIGIN BOOTB BRK LOAD APPLICATION SET UP DEVICE CONTROL BLOCK FOR DISKETTE HANDLER CALL LDA FLEN OF SECTORS TO WRITE STA COUNT LDA 1 DISK DRIVE 1 STA DUNIT LDA W SET UP FOR WRITE WITH CHECK STA DCOMND LDA PST POINT TO START OF APPLIC PRO...

Страница 149: ...COUNT 1 SECTOR COUNT i THIS IS THE CARTRIDGE HEADER BFF9 An CARTRIDGE INIT RTS WORD BOOTB BYTE 0 4 WORD INIT END CASSETTE BOOTED SOFTWARE You can boot software from the cassette as well as from the diskette at power up The following re uirements must be met in order to boot from the cassette o You must be pressing the START key as power is applied to the system o A cassette tape with a proper boot...

Страница 150: ...oot process The second byte contains the number of 128 byte cassette records to be read as part of the boot process including the record containing this information This number can range from 1 to 255 with 0 meaning 256 The third and fourth bytes contain the address lo hi to which the booter will transfer control after the boot process is complete and whenever the SYSTEM RESET key is pressed Casse...

Страница 151: ...rst record at this point the software should continue the boot process if it is a multistage boot and then stop the cassette drive which due to a system bug will still be running using the following instruction se uence LOA 3C STA PACTL 0302 The application should then set a value in MEMLO 0237 that points to the first free RAM location beyond the software Just booted as shown below LOA IENO l STA...

Страница 152: ... 128 NUMBER OF RECORDS WORD PST MEMORY ADDRESS TO START LOAD WORD PINIT PROGRAM INIT THIS IS THE START OF THE BOOT CONTINUATION LDA 1 3C STOP THE CASSETTE STA PACTL LDA IPND ESTABLISH LOW MEMORY LIMITS STA MEMLO STA APPMHI LDA IPND 256 STA MEMLO l STA APPMHI l LDA IRESTRT ESTABLISH RESTART VECTOR STA DOSVEC LDA IRESTRT 256 STA DOSVEC l CLC i SET FLAG FOR SUCCESSFUL BOOT RTS APPLICATION INITIALIZAT...

Страница 153: ...BLE FILES THE FOLLOWING TWO SYMBOLS MUST BE EGUATED USING THE MEMORY LIMITS OF THE PROGRAM TO BE COPIED PST PND FLEN PST PROGRAM START ADDRESS SEE SAMPLE PROGRAM PND PROGRAM END ADDRESS SEE SAMPLE PROGRAM 0700 1324 PND PST 127 128 128 8000 ROUND UP TO MULTIPLE OF 128 THIS PROGRAM S ORIGIN BOOTB LDX 10 USE IOCB 1 FIRST OPEN THE CASSETTE FILE FOR WRITING LDA STA LDA STA LDA STA LDA STA LDA STA JSR B...

Страница 154: ...PPLIC PROG SET UP OF BYTES TO WRITE WRITE ENTIRE FILE ERROR NOW CLOSE THE FILE AFTER SUCCESSFUL WRITE CERR LDA STA JSR BMI BRK BRK ftCLOSE ICCOM X CIOV CERR CFILE BYTE IIC CR THIS IS THE CARTRIDGE HEADER SET UP FOR If CLOSE II CLOSE THE FILE ERROR STOP WHEN DONE STOP ON ERROR FILE NAME BFF9 AU CARTR IDGE INIT RTS WORD BOOTB BVTE 0 4 WORD INIT END OPERATING SYSTEM C016555 Section 10 169 ...

Страница 155: ...The POKEY registers shown below are all concerned with sound control as described in the ATARI Home Computer Hardware Manual AUDCTL AUDC1 AUDC2 AUDC3 AUDC4 D208J D201J and AUOF1 D200J D203J and AUOF2 D202J D205 and AUOF3 0204 D207 and AUOF4 0206 Audio control Channel 1 control Channel 2 control Channel 3 control Channel 4 control Conflicts With OS There are two potential conflicts with the as invo...

Страница 156: ... modes 11 of 14 modes if the GTIA chip is used in place of the CTIA The resident Display Handler allows for an optional split screen text window of fixed size The hardware allows for many more options than the Display Handler supportsl as will be seen by reading the ATARI Home Computer Hardware Manual Cursor Control You can control the Display Handler text and graphics cursors directly see Section...

Страница 157: ...l character graphics set corresponding to display codes 60 through 7F and 00 through lF in Appendix E User defined character sets can also be obtained for text modes 0 1 and 2 by providing the character matrix definitions in RAM and setting CHBAS to point to those definitions CHBAS always contains the most significant bits of the memory address of the start of the character definitions as shown be...

Страница 158: ...olves eight consecutive bytes for each character with characters ordered consecutively by their internal code value see the discussion in Appendix L relating to 955 Character base Character for 1 Figure 11 3 code 00 8 bytes 1 Character for code 01 increasing addresses Character for 1 code 7E 1 Character for code 7F Character Base Diagram PLAYER MISSILE GRAPHICS The as makes no use of the player mi...

Страница 159: ...addle controllers triggers 1 8 Driving controllers triggers 1 4 Light pen trigger In addition to these controllers other information can be sensed or sent using the PIA chip to that the console connectors are interfaced Keyboard Controller Sensing Data can be read from an ATARI keyboard controller connected to the first port This program alters registers on a chip called a PIA To set these back to...

Страница 160: ...R BUTTON WHICH HAS BEEN PRESSED ON CONTROLLER CNT 1 4 7001 REM NOTE A 1 WILL BE RETURNED IF NO CONTROLLER IS CONNECTED 7002 REM A SPACE WILL BE RETURNED IF THE CONTROLLER IS CONNECTED BUT NO KEY HAS BEEN PRESSED 7003 PORT PORTA IF CNT 2 THEN PORT PORTB 7005 P l 7008 PAO CNT CNT 2 7010 FOR J O TO 3 7020 POKE PORT ROWCJ 7030 FOR 1 1 TO 10 NEXT I 7050 IF PADDLECPAO l 10 THEN P J J J 2 GOTO 7090 7060 ...

Страница 161: ...1PADDL1 IPADDL3 IPADDL5 IPADDL7 Sense Column 21PADDLO IPADDL2 IPADDL4 IPADDL6 Sense I Column 31STRIGO ISTRIG1 STRIG2 ISTRIG3 Sense Figure 11 5 ATARI Keyboard Controller Variable Register Value Table Front Panel Connectors as I O Ports The three pages that follow show how some of the pins in the front panel game controller connectors can be used as general I O pins Hardware Information PIA 6520 682...

Страница 162: ..._ _ _ _ _ _ 1 001 Software Information 6520 PIA This also pertains to all of the following Port A control address D302 7 6 5 432 1 0 o I0 I 1 I 1 I 1 IX I0 I0 IWr i t e t his in tot his reg is t er port A Data Data direction addres ing control o Data Direction is at 0300 1 data is at 0300 Port A data direction address 0300 7 6 5 432 1 0 X IX IX IX IX IX IX IX I t t t t t t t t Write this into this...

Страница 163: ...ection addressing control o 0301 contains data direction 1 0301 contains Port B data direction address 0301 7 6 5 432 1 write this into this register x Ixl xlxl xl Xl X f t__ t t__ t__ f__t _______ data direction control for Port B 1 Out o In Port B data address 0301 178 7 6 5 4 3 2 1 o I I 432 143 2 1 Jack 4 Jack 3 Pin Numbers Four Trigger ports 0010 0011 0012 0013 7 6 5 432 1 0 10101 01010 0101 ...

Страница 164: ...k 2 Pins 4 3 2 1 027A Jack 3 Pins 4 3 2 1 027B Jack 4 Pins 4 3 2 1 0284 Jack 1 Pin 6 7 6 5 4 3 2 1 0 0285 101010101010101 IJack 2 Pin 6 0286 Jack 3 Pin 6 0287 Jack 4 Pin 6 0270 7 6 5 4 3 2 1 0 IX IX IXIxl xl xl xl xl Jack 1 Pin 5 0272 Jack 2 Pin 5 0274 Jack 3 Pin 5 0276 Jack 4 Pin 5 0271 Jack 1 Pin 9 0273 Jack 2 Pin 9 0275 Jack 3 Pin 9 0277 Jack 4 Pin 9 Using Front Panel Connectors As 1 0 Ports Pi...

Страница 165: ...Ia commands Most handlers 03 OPEN 05 GET RECORD 07 GET CHARACTERS 09 PUT RECORD 08 PUT CHARACTERS OC CLOSE OD GET STATUS Display Handler only 11 FILL 12 DRAW Diskette File Manager only 20 RENAME 21 DELETE 22 FORMAT 23 LOCK 24 UNLOCK 25 POINT 26 NOTE OPERATING SYSTEM C016555 Appendix A 180 ...

Страница 166: ...D DEVICE OR FILE NOT OPEN INVALID IOCB NUMBER Y reg only OPENED FOR READ ONLY END OF FILE TRUNCATED RECORD DEVICE TIMEOUT DOESN T RESPOND DEVICE NAK SERIAL BUS INPUT FRAMING ERROR CURSOR out of range SERIAL BUS DATA FRAME OVERRUN ERROR SERIAL BUS DATA FRAME CHECKSUM ERROR DEVICE DONE ERROR BAD SCREEN MODE FUNCTION NOT SUPPORTED BY HANDLER INSUFFICIENT MEMORY FOR SCREEN MODE DISK DRIVE ERROR TOO MA...

Страница 167: ... values 01 001 SA 13S SB 139 SC 140 SE 142 SF 143 90 144 182 OPERATION COMPLETE NO ERRORS DEVICE TIMEOUT DOESN T RESPOND DEVICE NAK SERIAL BUS INPUT FRAMING ERROR SERIAL BUS DATA FRAME OVERRUN ERROR SERIAL BUS DATA FRAME CHECKSUM ERROR DEVICE DONE ERROR OPERATING SYSTEM C016555 Appendix C ...

Страница 168: ... 7 I G g 8 H h 9 I i A J j B K k r 1e iii L 1 J 1D iii M m f 1E N n F fI 0 0 IJ 1 g p P 11 C 1 Q q 12 2 R r 13 D 3 S s 14 a 4 T t 15 5 U u 16 II 6 V v 17 7 W w 18 g 8 X x 19 J 9 y Y lA g Z z IB ESC D EOL lC 0 I E kE ID 0 J CLEAR t E BELL IE A BACKSP k 8 kR IF TAB a C R OPERATING SYSTEM C016555 Appendix D 183 ...

Страница 169: ... 6 P i F f fJ7 I G g 8 H h 9 rI I i A J j 0B K k flC a L 1 flD iii M m fiE IX n 0F a 0 CODES 8 FF SHOW AS THE INVEHSE VIDEO IfJ g p P OF CODES 7F 11 In 1 Q q 12 2 R r 13 C 3 S s 14 C 4 T t 15 5 U u 16 III 6 V v 17 7 W w 18 8 X x 19 J 9 y y lA g Z z IB D lC 0 I ID 0 IE A J IF C D 184 OPERATING SYSTEM C016555 Appendix E ...

Страница 170: ...1E 52 R 28 72 r 28 13 S 3E 33 3 1A 53 S 3E 73 s 3E 14 T 2D 34 4 18 54 T 2D 74 t 2D 15 U OB 35 5 10 55 U OB 75 u OB 16 V 10 36 6 1B 56 V 10 76 v 10 17 W 2E 37 7 33 57 W 2E 77 w 2E 18 X 16 38 8 35 58 X 16 78 x 16 19 Y 2B 39 9 30 59 V 2B 79 Y 2B 1A Z 17 3A 02 5A Z 17 7A z 17 1B esc 1C 3B 00 5B 20 7B 02 lC up OE 3C 36 5C 06 7C OF 1D d own OF 3D OF 50 1 22 70 clear 36 1E 1eft 06 3E 37 5E 07 7E back 34 ...

Страница 171: ...P 31 1 51 G 71 q 32 2 52 R 72 l 33 3 53 S 73 s 34 4 54 T 74 t 35 5 55 U 75 u 36 6 56 V 76 v 37 7 57 W 77 w 38 8 58 X 78 x 39 9 59 Y 79 y 3A 5A Z 7A z 38 58 7B 3C ot 5C 7C 3D 5D 7D 3E SE 7E 3F SF 7F space Note The following codes print differently than defined by the ATASCII definition 00 through iF print b Ian k 60 prints instead of d iamond 78 prints instead of spade 7D prints instead of clear 7E...

Страница 172: ... S 73 S 34 4 54 T 74 T 35 5 55 U 75 U 36 6 56 V 76 V 37 7 57 W 77 W 38 8 58 X 78 X 39 9 59 Y 79 Y 3A 5A Z 7A Z 38 58 7B 3C 5C 7C 30 50 7D 3E 5E up 7E up 3F 5F left 7F left Note the following codes print difTerently than deTined by the ATASCI I definition 00 through 2F print blank 5E prints II up arT awI instead oT 5F prints ClIeTt arrow Cl instead of 60 through 7F repeats 40 through 5F instead of ...

Страница 173: ... 3 2 20 12 10 5 backgd BAK 424 420 0O 3F PF 0 40 7F PF 1 eO BF PF 2 CO FF PF 3 3 40 24 20 4 0 BAK 434 432 1 PF 0 2 PF 1 3 PF 2 4 eo 48 40 2 0 BAK 694 696 1 PF 0 5 eo 48 40 4 0 BAK 1174 1176 1 PF 0 2 PF 1 3 PF 2 6 160 96 80 2 0 BAK 2174 2184 1 PF 0 7 160 96 80 4 0 BAK 4190 4200 1 PF 0 2 PF 1 3 PF 2 8 320 192 160 2 0 PF 2 8112 8138 1 PF 1 9 80 192 1 Note 2 8138 10 80 192 9 0 PM 0 8138 1 PM 1 2 PM 2 ...

Страница 174: ...lor of BAK lum of data value SO F 3 U Se S color of data value SO F lum of BAK PF x Playfield color register x PM x Player Mis Sile Graphic S color register x BAK Background color regi Ster a So known a S PF 4 The default values for the color regi Ster S are shoUln below BAI SOO PFO S28 PF1 SCA PF2 S94 PF3 S46 OPERATING SYSTEM C016555 Appendix H 189 ...

Страница 175: ...alues lum 0 gT ay 0 minimum luminance 1 light orange 1 2 orange 2 3 red orange 3 increasing 4 pink 4 luminance 5 purple 5 6 purple blue 6 7 blue 7 max imum luminance 8 blue 9 light blue A turq uoise B green blue C green D yellow green E orange green F light orange OPERATING SYSTEM C016555 Appendix H ...

Страница 176: ...control codes ACt NAt COMPLETE ERR 41 A I 4E N I 43 C 45 E I Serial bus command codes READ 52 WRITE 57 STATUS 53 PUT no check 50 FORMAT 21 READ ADDRESS 54 READ SPIN 51 MOTOR ON 55 VERIFY SECTOR 56 R W S Ip I T G I U V 31 34 40 50 53 Disk Printer Disk Printer Disk Disk Disk Disk Disk Disk OPERATING SYSTEM C016555 Appendix I 191 ...

Страница 177: ...er up entry Cassette read blo k entry Cassette OPEN input entry These vectors are for as internal use only The fixed address Floating Point Package ROM routine entry point addresses are shown below complete descriptions of the corT esponding routine are provided in Section S AFP FASC IFP FPI FADD FSUB FMUL FDIV LOG LOG10 EXP EXP10 PLVEVL ZFRO ZFl FLDOR FLDOP FL01R FL01P FSTOR FSTOP FMOVE 192 0800 ...

Страница 178: ...ndler 5 Keyboard Handler K Printer Handler P Cassette Handler C E400 E410 E420 E430 E440 See Section 5 for the format of the entry for each Handler The 6502 Computer interrupt vector values are shown below Function Address Value NMI FFFA E7B4 RESET FFAC E477 IRG FFFE E6FE OPERATING SYSTEM C016555 Appendix J 193 ...

Страница 179: ...display modes obJect generators hardware display scrolling and many other features that are described in the ATARI Home Computer Hardware Manual Since all display data is stored in RAM the display data update rate is limited primarily by the software routines that generate and format the data and access the RAM The generation of the display from the RAM is accomplished by the ANTIC and CTIA or GTI...

Страница 180: ...n the following order 1 start bit SPACE data bit 0 data bit 1 0 SPACE 1 MARK data bit 6 data bit 7 1 stop bit MARK The only control the computer has over tape motion is motor start stop and this only if the PLAY button is pressed by the user In order for recording to take place the user must press both the REC and PLAY buttons on the cassette The computer has no way to sense the position of these ...

Страница 181: ...D is 40 The controller supports the following SIO commands see Section 5 for more information Tegarding the Handler and Section 9 for a general discussion of bus commands GET STATUS The computer sends a command frame of the format shown below Device ID 40 Command byte 53 auxiliary 1 doe n t matter auxiliary 2 doe n t matter Checksum checksum of bytes above The printer control leT responds with a d...

Страница 182: ...s the following Characteristics DATA CAPACITY 720 sectors of 128 bytes each Disk Handler format 709 sectors of 125 data bytes each Disk File Manager format DATA TRANSFER RATES Bus rate 1920 characters per second Seek time 5 25 msec per track 10 to 210 msec Rotational latency 104 msec maximum 288 rpm STORAGE FORMAT 5 1 4 inch diskette soft sectored by the controller 40 tracks per diskette 18 sector...

Страница 183: ...at shown below Device 10 31 34 Command byte 57 auxiliary 1 low byte of sector number auxiliary 2 high byte of sector number 1 720 Checksum checksum of bytes above The computer sends a data frame of the format shown below 128 data bytes Checksum byte The diskette controller writes the frame data to the specified sector then reads the sector and compares the content with the frame data The COMPLETE ...

Страница 184: ...AT DISKETTE The computer sends a command frame oT the format shown below Device 10 31 34 Command byte 21 auxiliary 1 doesn t matter auxiliary 2 doesn t matter Checksum checksum oT byt s above The diskette controller completel Tormats the diskette generates 40 tracks oT 18 soft sectors per track with the data portion of each sector e ual to all zeros and then reads each sector to veriTY its integri...

Страница 185: ...omprises a single letter followed by a number A different letter is assigned for each maJor functional area being described and the numbers are assigned se uentially within each functional area Those variables that are not considered to be of interest to any user are flagged with an asterisk after their names The data base lookup tables provided are 1 Functional grouping index to the function narr...

Страница 186: ...en Cursor control Bl CRSINH B2 ROWCRS CQLCRS B3 OLDROW OLDCOL B4 TXTROW TXTCOL Screen margins B5 LMARGN B6 RMARGN Color control B7 PCOLRO PCOLR3 B8 COLORO COLOR4 Text scrolling B9 SCRFLG Attract mode Bl0 ATRACT Bll COLRSH B12 DRKMSK Tabbing B13 TABMAP Logical text lines B14 LOGMAP B15 LOGCOL Split screen OPERATING SYSTEM C016555 Appendix L 201 ...

Страница 187: ...LD4 B21 ROWINC COLINC B22 DELTAR DELTAC 823 COUNTR 824 ROWAC COLAC 825 ENDPT Displaying control characters Escape display following control char B26 ESCFLO Display control characters mode B27 DSPFLO Bit mapped graphics B28 DMASK B29 SHFAMT OPERATING SYSTEM C016555 Append ix L 202 ...

Страница 188: ...T B35 DINDEX B36 SAVMSC B37 OLDCHR B38 OLDADR B39 ADRESS B40 MLTTMP OPNTMP TOADR B41 SAVADR FRMADR B42 BUFCNT B43 BUFSTR B44 SWPFLG B45 INSDAT B46 TMPROW TMPCOL B47 TMPLBT B48 SUBTMP B49 TINDEX B50 BITMSK B51 LINBUF B52 TXTMSC B53 TXTOLD OPERATING SYSTEM C016555 Appendix L 203 ...

Страница 189: ...ination D1 CBAUDL CBAUDH D2 TIMFLG D3 TIMER1 TIMER2 D4 ADDCOR D5 TEMP 1 D6 TEMP3 D7 SAVIO Cassette mode D8 CASFLG Cassette buffer D9 CAS8UF Dl0 BLIM Dll BPTR Internal working variables D12 FEOF D13 FTYPE D14 WMODE D15 FREG E Ke lboard Ke l reading and debouncing E1 CH1 E2 KEVDEL E3 CH in Handler OPERATING SYSTEM C016555 Appendix L 204 ...

Страница 190: ...STARTl and OPTIONl F Printer printer buffer Fl PRNBUF F2 PBUFSZ F3 PBPNT Internal working variables F4 PTEMP F5 PTIMOT G Central I O routine CIO User call parameters Gl 10CB G2 ICHID G3 leDNO G4 ICCOM G5 ICSTA G6 ICBAL ICBAH G7 ICPTL ICPTH G8 ICBLL ICBLH G9 ICAX1 ICAX2 Gl0 ICSPR Device status Gll DVSTAT device table G12 HATABS OPERATING SYSTEM C016555 Appendix L 205 ...

Страница 191: ...R Internal working variables G23 ICCOMT G24 ICIDNO Q25 CIOCHR H Serial I O routine SID User call parameters Hl DCB control block H2 DDEVIC H3 DUNIT H4 DCOMND H5 DSTATS H6 DBUFLO DBUFHI H7 DTIMLO H8 DBVTLO DBVTHI H9 DAUX1 DAUX2 Bus sound control Hl0 SOUNDR Serial bus control 206 Retry logic Hll CRETRV H12 DRETRV Checksum H13 CHKSUM H14 CHKSNT H15 NOCKSM OPERATING SYSTEM C016555 Appendix L ...

Страница 192: ... H24 XMTDON SID timeout H25 TIMFLG H26 CDTMV1 H27 CDTMA1 InteT nal wOT king vaT iables H2S STACKP H29 TSTAT H30 ERRFLG H31 STATUS H32 SSKCTL J ATARI controllers Joysticks Jl STICKO STICK3 J2 STRIGO STRIG3 Paddles J3 PADDLO PADDL7 J4 PTRIGO PTRIG7 Paddle contT ollers J8 STICKO STICK3 J9 STRIGO STRIG3 K Disk file manageT Kl FMSZPG K2 ZBUFP 1 3 ZDRVA 1 4 ZSBA I 1 5 ERRNO OPERATING SYSTEM C016555 Appe...

Страница 193: ... ZTEMP4 M15 ZTEMP3 M16 FLPTR M17 FPTR2 M18 LBPR1 M19 LBPR2 H20 LBUFF H21 PLVARG M22 FPSCR FSCR H23 FPSCR1 FSCR1 M24 DEGFLG RADFLG N Powe Up and System Reset RAM sizing 208 Nl RAMLO TRAMSZ N2 TSTDAT Diskette cassette boot N3 DOSINI N4 CKEV N5 CASSBT N6 CASINI N7 BOOT N8 DFLAGS N9 DBSECT Nl0 BOOTAD Environmental cont ol Nil COLDST N12 DOSVEC OPERATING SYSTEM C016555 Appendix L ...

Страница 194: ... CDTMV4 CDTMV5 P9 CDTMF3 CDTMF4 CDTMF5 RAM interrupt vectors NMI interrupt vectors Pl0 VDSLST Pll VVBLKI P12 VVBLKD IRQ interrupt vectors P13 VIMIRQ P14 VPRCED P1S VINTER P16 VBREAK P17 VKEYBD P18 VSERIN P19 VSEROR P20 VSEROC P21 VTIMR1 VTIMR2 VTIMR4 Hardware register updates P22 SDMCTL P23 SDLSTL SDLSTH P24 GPRIOR P25 CHACT P26 CHBAS P27 PCOLRx COLORx OPERATING SYSTEM C016555 Appendix L 209 ...

Страница 195: ...s the other variables can be of interest to one or more of the following classes o users o End user o Game developer o Applications programmer o System utility writer o Language processor developer o Device Handler Writer Each variable is specified by its system e uate ile name followed by its address in hex and the number of bytes reserved in the data base in decimal in the following form name C ...

Страница 196: ...nd then is re established whenever the display is opened based upon the re uirements of the selected graphics mode A3 APPMHI OOOE 2l User free memory screen lower limit APPMHI is a user controlled variable that contains the address within the free memory region below which the Display Handler cannot go in setting up a display screen This variable is initialized to zero by the OS at power up A4 RAM...

Страница 197: ...ower up the SYSTEM RESET or BREAK keys or an OPEN command to the Display Handler or Screen Editor Note that altering CRSINH does not cause the visible cursor to change states until the next output to the screen if an immediate change to the cursor state is desired without altering the screen data follow the CRSINH change with the output of CURSOR UP CURSOR DOWN or some other innocuous sequence 92 ...

Страница 198: ... user alterable left and right margins that define the normal domain of the text cursor 85 LMARGN 0052 lJ Text column left margin LMARGN contains the column number 0 39 of the text screen left margin the text cursor will remain on or to the right of the left margin as a result of all operations unless the cursor column variable is directly updated by the user see 82 and 84 above The default value ...

Страница 199: ...ing hardware register as shown below PCOLRO 02CO PCOLRl 02Cl PCOLR2 02C2 PCOLR3 02C3 COLPMO D012 COLPMl D013 COLPM2 D014 COLPM3 D01S Each color variable has the format shown below 7 6 S 4 3 2 1 0 I color I lum Ixl See Appendix H for information regarding the color and luminance field values B8 COLORO COLOR4 02CS S Playfield colors Each color variable is stored in the corresponding hardware registe...

Страница 200: ...the phospho s due to a fixed display being left on the screen for extended periods of time When the computer is left unattended for more than 9 minutes the color intensities are limited to 50 percent of maximum and the hues are continually varied every 8 3 seconds Pressing any keyboard data key will be sufficient to emove the attract mode for 9 more minutes As part of the stage 2 V9LANK process th...

Страница 201: ...ser controlled Serial 1 0 bus activity or any other signs of life Bll COLRSH 004F lJ Color shift mask COLRSH has the value 00 when attract mode is inactive thus effecting no change to the screen colors when attract mode is active COLRSH contains the current value of the timer variable middle digit RTCLOK 1 B12 DRKMSK 004E 1 Dark luminance mask DRKMSK has the value FE when attract mode is inactive ...

Страница 202: ...nd or data insertion can increase the size of a logical line to two or three physical lines B14 LOGMAP 02B2 4 Logical line starting row map The beginning physical line number for each logical line on the screen is retained in a four byte 32 bit map where a bit value of one indicates the start of a logical line the diagram below shows the mapping of the individual bits to physical line row numbers ...

Страница 203: ...the Screen Editor B16 BOTSCR 02BF lJ Text screen lines count BOTSCR contains the number of lines of text for the current screen 24 for mode 0 or 4 for a split screen mode The Handler also uses this variable as an indication of the split screen status tests are made for the specific values 4 and 24 DRAW FILL Function The DRAW function line drawing algorithm is shown below translated to the PASCAL l...

Страница 204: ...ll region data value as part of the calling sequence for a FILL command as described in Section 5 818 FILFLG 02B7 1 Fill flag FILFLQ indicates to the shared code within the Display Handler whether the current operation is FILL FILFLG 0 or DRAW FILFLG 0 919 NEWROW 0060 1 and NEWCOL 0061 2 Destination point NEWROW and NEWCOL are initialized to the values in ROWCRS and COLeRS which represent the dest...

Страница 205: ...AR and DELTAC that is the number of iterations required to generate the desired line COUNTR is then decremented after every point on the line is plotted until it reaches a value of zero B24 ROWAC 0070 2J and COLAC 0072 2J Accumulators ROWAC and COLAC are working accumulators that control the row and column point plotting and increment or decrement function B25 ENDPT 0074 2J Line length ENDPT conta...

Страница 206: ...ontrol code a display mode can be established by setting a flag in the data base This capability is used by language processors when displaying high level language statements that can contain control codes as data elements 827 DSPFLG 02FE 1 Display control characters flag When DSPFLG is nonzero ATASCII control codes other than EOL are treated as data and displayed on the screen when output to the ...

Страница 207: ...ft the right Justified pixel data on output or the amount to shift the input data to right Justify it on input The value is always the same as for DMASK prior to the Justification process Internal Working Variables B30 HOLD1 0051 ll Temporary storage B31 HOLD2 029F ll Temporary storage 832 HOLD3 029D 11 Temporary storage B33 TMPCHR 0050 ll Temporary storage B34 DSTAT 004C 11 Display status 935 DIN...

Страница 208: ...2 BUFCNT 0068 1J Screen Editor current logical line size B43 BUFSTR 006C 2J Temporary storage B44 SWPFLG 007B 13 Split screen cursor control In spli screen mode the graphics cursor data and the text window cursor data are frequently swapped as shown below in order to get the variables associated with the region being accessed into the ROWCRS OLDADR variables ROWCRS B2 COLCRS 82 DINDEX 835 SAVMSC B...

Страница 209: ...plit screen memory address TXTMSC is the split screen text window version of SAVMSC 836 See 844 for more information B53 TXTOLD 0296 6J Split screen cursor data See B44 for more information Internal Character Code Conversion Two variables are used to retain the current character being processed for both reading and writing ATACHR contains the value passed to or from CIQ and CHAR contains the inter...

Страница 210: ...a buffer pointer BUFADR acts as temporary page zero pointer to the current diskette buffer C2 DSKTIM 024b 1 Disk format operation timeout time DSKTIM contains the timeout value for SIO calling se uence variable DTIMLO see Section 9 DSKTIM is set to 160 which represents a 171 second timeout at initialization time and is updated after each diskette status re uest operation It contains the value retu...

Страница 211: ...inal 600 baud After baud rate calculation these variables will contain POKEY counter values for the corrected baud rate 02 TIMFLG 0311 1 Baud rate determination timeout flag TIMFLQ is used by SIO to timeout an unsuccessful baud rate determination The flag is initially set to 1 and if it attains a value of zero after 2 seconds before the first byte of the cassette record has been read the operation...

Страница 212: ...ough shared code A value of zero indicates that the current operation is a standard Serial 1 0 bus operation and a nonzero value indicates a cassette operation Cassette Buffer 09 CASBUF 03FO 131J Cassette record buffer CASBUF is the buffer used by the Cassette Handler for the packing and unpacking of cassette record data and by the initialization cassette boot logic The format for the standard cas...

Страница 213: ... end of file condition control byte FE FEOF e ual to zero indicates that an EOF has not yet been detected and a nonzero value indicates that an EOF has been detected The flag is reset at every OPEN 013 FTVPE 003E 1l Interrecord gap t pe FTVPE is a copy of ICAX2Z from the OPEN command and indicates the type of interrecord gap selected a positive value indicates normal record gaps and a negative val...

Страница 214: ...o 0 whenever a new code is accepted see Bl0 The Keyboard Handler obtains all key data from CHi whenever a code is extracted from that l byte FIFO the Handler stores a value of FF to the FIFO to indicate that the code has been read See Section 5 for fUrther discussion of the Keyboard Handler s processing of the key codes El CH1 02F2 lJ Prior keyboard character code CH1 contains the key code value o...

Страница 215: ...KJ key processing BREAKl KeV E5 BRKKEY 0011 1l BREAKl key flag BRKKEY is used to indicate that the BREAKl key has been pressed The value is normally nonzero and is set to zero whenever the BREAKl key is pressed The code that detects and processes the BREAKl condition flag 0 should set the flag nonzero again BRKKEY is monitored by the following OS routines Keyboard Handler Display Handler Screen Ed...

Страница 216: ...ssed either by itself or in conJunction with the SHIFT or CTRLl key E7 HOLDCH 007C 1 Character holding variable HOLDCH is used to retain the current character value prior to the SHIFT1 CONTROLl logic process Autorepeat The Autorepeat feature responds to the continuous depression of a keyboard key by replicating the key code 10 times per second after an initial 1 2 second delay The timer variable S...

Страница 217: ...ion INVFLG is set to zero by power up and system reset The Keyboard Handler inverts bit 7 of INVFLG whenever the ATARI key is pressed the lower order bits are not altered and are assumed to be zero The Keyboard Handler s exclusive 01 5 XOR s the ATASCII key data with the value in INVFLG at all times the normal values of 00 and 80 thus lead to control of the inverse video bit bit 7 Console Keys SEL...

Страница 218: ...ing Variables F4 PTEMP OOlF lJ Printer Handler temporary data save PTEMP is used by the Printer Handler to temporarily save the value of a character to be output to the printer F5 PTIMOT OOlC lJ Printer timeout value PTIMOT contains the timeout value for SID calling se uence variable DTIMLO see Section 9 PTIMOT is set to 30 which represents a 32 second timeout at intialization time and is updated ...

Страница 219: ...cation of the first bVte of the first IOCB in the data base For VIDs G2 through G10 the addresses given are far IOCB 0 only the addresses for all of the IOCB s are shown below 0340 034F 0350 035F 0360 036F 0370 037F 0380 038F 0390 039F 03AO 03AF 03BO 03BF IOCB 0 IOCB 1 IOCB 2 IOCB 3 IOCB 4 IOCB 5 IOCB 6 IOCB 7 G2 ICHID 0340 1 Handler ID See Section 5 Initialized to FF at power up and system reset ...

Страница 220: ...associated with n IOCB can or may not use these bytes Device status Gil DVSTAT 02EA 4 Device status See Section 5 for a discussion of the GET STATUS command Device Table G12 HATABS 031A 38 Device table See Section 9 for a description of the device table CIC Handler Interface Parameters Communication between CIa and a Handler is accomplished using the 6502 machine regis ers and a data structure cal...

Страница 221: ...O G14 ICHIDZ 0020 lJ Handler index number See Section 5 Set to FF on CLOSE G15 ICDNOZ 0021 1J Device drive number See Section 5 016 ICCOMZ 0022 1 Command byte See Section 5 017 ICSTAZ 0023 1 Status byte See Section 5 G1S ICBALZ ICBALH 0024 2 Buffer address See Section 5 This pointer variable is modified by CIa in the course of processing some commands however the original value is restored before ...

Страница 222: ...ue of the 6502 A register from CIa entry except for data reading type commands in which case the most recent data byte read is stored in CIOCHR The 6502 A register is loaded from CIOCHR as CIO returns to the caller Internal Working Variables G23 ICCOMT 0017 1 Command table index ICCOMT is used as an index to CIO s internal command table which maps command byte values to Handler entry offsets see S...

Страница 223: ...ns 0300 030B These bytes provide the parameter passing mechanism for SIO and are described individually below H2 DDEVIC 0300 1 Device bus ID See Section 9 H3 DUNIT 0301 1 Device unit number See Sec tion 9 H4 DCOMND 0302 1 Device command See Section 9 H5 DSTATS 0303 1 Device status See Sec tion 9 H6 DBUFLO DBUFHI 0304 2 Handler buffer address See Section 9 H7 DTIMLO 0306 1 Device timeout See Sectio...

Страница 224: ...to 14 attempts to send and acknowledge a command frame followed by a single attempt to receive COMPLETE and possibly a data frame H11 CRETRY 0036 1 Command frame retry counter CRETRY controls the inner loop of the retry logic that associated with sending and receiving an acknowledgement of the command frame CRETRY is set to 13 by SIO at the beginning of every command initiation thus allowing for a...

Страница 225: ...bus receive interrupt service routine that the next input will not be followed by a checksum byte A value of zero specifies that a checksum byte will follow nonzero specifies that a checksum byte will not follow Data Buffering General Buffer Control H16 BUFRLO 0032 1l and BUFRHI 0033 1l Next byte address BUFRLO and BUFRHI comprise a pointer to the next buffer location to be read from or written to...

Страница 226: ...eceive Transmit Data Buffering H21 BUFRFL 0038 1 Buffer full flag BUFRFL is a flag used by the serial bus receive interrupt service routine to indicate when the main portion of a bus frame has been received all but the checksum byte BUFRFL equal to zero indicates that the main portion has not been completely received a nonzero value indicates that the main portion has been received H22 RECVDN 0039...

Страница 227: ... to communicate between SIO and the timer initiated code pointed to by CDTMA1 H25 TIMFLG 0317 1 SIO operation timeout flag TIMFLG is used to indicate a timeout situation for a bus operation The flag is ini tially set to 1 and if it attains a value of zero after the timeout period before the current operation is complete the operation will be aborted See also D2 H26 CDTMV1 0218 2J System Timer 1 va...

Страница 228: ... responds with an invalid response byte H31 STATUS 0030 1 SIO operation status STATUS is a zero page variable that is used within SIO to contain the operation status that will be stored to the calling se uence parameter variable DSTATS when SIO returns to the caller H32 SSKCTL 0232 1 SKCTL copy SSKCTL is utilized by SIO to keep track of the content of the SKCTL D20F register which is a write only ...

Страница 229: ...P OE UP RIGHT 06 RIGHT 07 DOWN RIGHT 05 DOWN SOD DOWN LEFT 09 LEFT SOB UP LEFT OA J2 STRIGO STRIG3 0284 4J Joystick trigger sense The four Joystick trigger sense variables each contain a single bit indicating the position of the Joystick trigger as shown below 7 6 5 432 1 0 10 0 0 0 0 0 olr where T 0 indicates trigger pressed Paddles Up to eight paddle controllers can be connected to the computer ...

Страница 230: ... in increments of one to a value of 227 then go to 0 and continue to increase monotonically one count per color clock Right edge 7 Upper edge 16 Codes increase in increments of one one count per two raster lines Lower edge 111 The light pen hardware will read and latch the pen position 60 times per second independent of the pen button position which is separately sensed In order for the light pen ...

Страница 231: ... YPOS 95 THEN YPOS 95 7 STICKO STICK3 0278 4J Light pen button sense The light pen button sense is encoded in one of STICKO STICK3 depending upon the actual controller port used as shown below 7 o 1010 01TI where T 0 indicates the light pen button is pressed Driving Controllers The driving controller has no position stops and thus allows unlimited rotation in either direction the output of the con...

Страница 232: ... 9 STRIGO STRIG3 0284 4J Driving trigger sense The four driving trigger sense variables each contain a single bit indicating the position of the driving tTigger as shown below 7 6 5 432 1 0 0 0 0 0 0 0 O TI where T 0 indicates trigger pressed K DISK FILE MANAGER See Section 5 for information relating to the Disk File Manager Kl FMSZPG 0043 7J FMS reserved space FMSZPG is the reserved space in the ...

Страница 233: ...al 1 13 FRI 00EO 6 FP register 1 1 14 FR2 00E6 6 FP register 2 internal 1 15 FRX OOEC I Spare unused 1 16 EEXP OOED l Exponent value internal 1 17 NSIGN OOEE l Sign of mantissa internal 1 18 ESIGN OOEF I Sign of exponent internal 1 19 FCHRFLG OOFO lJ First character flag internal 1 110 DIGRT OOFl 1 Digits to right of decimal point 1 111 CIX 00F2 1 Character index 1 112 INBUFF OOF3 21 Input text bu...

Страница 234: ... internal M24 DEGFLG RADFLG OOFS 1 Degrees radians flag DEGFLG 0 indicates radians 6 indicates degrees N Power Up and SYSTEM RESET See Section 7 for details of the power up and system reset operations RAM Sizing During power up and system reset the first non RAM address above 1000 hex is located and its address retained using a nondestructive test The first byte of every 4K memory block is tested ...

Страница 235: ...r DOSINI contains the disk booted software initialization address from the beginning of the boot file see Section 10 whenever a diskette boot is successfully completed N4 CKEV 004A 1l Cassette boot request flag CKEV is an internal flag used to indicate that the console STARTl key was pressed during Power up thus indicating that a cassette boot is desired CKEV equals zero when no cassette boot is r...

Страница 236: ...f the second bvte of the boot file during a diskette boot and is then used to control the number of add itional diskette sectors read if anv N10 BOOTAD 0242 2 Diskette boot memorv address BOOTAD is initially set to the value of the third and fourth bytes of the boot file during a diskette boot and is not modified thereafter Environment Control If at the end of a power up or svstem reset control is...

Страница 237: ... of interrupt processing Pl CRITIC 0042 11 Critical code section flag CRITIC is used to signal to the VBLANK interrupt processor that a critical code section is executing without IRG interrupts being inhibited the VBLANK interrupt processor will stop interrupt processing after stage 1 and before stage 2 Just as if the 6502 processor I bit were set when CRITIC is set CRITIC equal to zero indicates ...

Страница 238: ...e and RTCLOK 2 the least significant byte See the discussions at D3 and preceding 810 for OS use of RTCLOK System Timer 1 System Timer 1 is maintained as part of the stage 1 VBLANK process and thus has the highest riority of any of the user timers P4 CDTMVI 0218 2 System Timer 1 value CDTHVI contains zero when the timer is inactive otherwise it contains the number of VBLANKs remaining until timeou...

Страница 239: ...age 2 VBLANK process and have the lowest priority of the user timers The OS does not have any direct use for these timers P8 CDTMV3 021C 2 CDTMV4 021E 2J and CDTMV5 0220 2 These variables contain zero when the corresponding timers are inactive otherwise they contain the number of VBLANKs remaining until timeout P9 CDTMF3 022A 1 CDTMF4 022C 1 and CDTMF5 022E 2 Each of these l bVte variables will be...

Страница 240: ...ion 6 P14 VPRCED 0202 2J Serial 110 bus proceed signal The serial bus line that produces this interrupt is not used in the current system See Section 6 P15 VINTER 0204 2J Serial 1 0 bus interrupt signal The serial bus line that produces this interrupt is not used in the current system See Section o P16 V BREAKJ 0206 2J BRK instruction vector This vector is initialized to oint to a PLA RTI se uenc ...

Страница 241: ...dates As part of the stage 2 VBLANK process certain hardware registers are updated from as data base variables as explained in Section 6 P22 SDMCTL 022F 1 DMA control SDMCTL is set to a value of 02 at the beginning of a Display Handler OPEN command and then later set to a value of 22 The value of SDMCTL is stored to DMACTL D400 as part of the stage 2 VBLANK process P23 SDLSTL 0230 1 and SDLSTH 023...

Страница 242: ...of QPRIOR is stored to PRIOR D01B as part of the stage 2 VBLANK process P25 CHACT 02F3 1 Character control The Display Handler sets CHACT t 02 on every OPEN command The value of CHACT is stored to CHACTL 0401 as part of the stage 2 VBLANK process P26 CHBAS 02F4 1 Character address base The Display Handler sets CHBAS to EO on every OPEN command The value of CHBAS is stored to CHBASE 0409 as part of...

Страница 243: ...R USER AREAS The areas shown below are available to the user in a non nested environment See Section 4 for further information R1 0080 128 R2 0480 640 OPERATING SYSTEM C016555 Appendix L 258 ...

Страница 244: ...D 1 BRKKEY E5 0011 1 BUFADR C1 0015 2 BUFCNT B42 0068 1 BUFRFL H21 0038 1 BUFRHI H16 0033 1 BUFRLO H16 0032 1 BUFSTR B43 006C 2 CASBUF D9 03FD 131 CASFLG D8 030F 1 CASINI N6 0002 2 CASSBT N5 0049 1 CAUX1 H2O 023C 1 CAUX2 H2O 023D 1 CBAUDH D1 02EF 1 CBAUDL D1 02EE 1 CCOHND H19 0238 1 CDEVIC H1S 023A 1 CDTMA1 P5 H27 0226 2 CDTHA2 P7 0228 2 CDTMF3 P9 022A 1 CDTMF4 P9 022C 1 CDTMF5 P9 022E 1 CDTMVI P4...

Страница 245: ...P27 02C8 1 COLRSH S11 004F 1 COUNTR B23 007E 2 CRETRV Hl1 0036 1 CRITIC Pl 0042 1 CRSINH Bl 02FO 1 CSTAT S2 0288 1 DAUXl H9 030A 1 DAUX2 H9 030B 2 DBSECT N9 0241 1 DBUFHI H6 0304 1 DBUFLO H6 0305 1 DBVTHI He 0308 1 DBVTLO H8 0309 1 DeB Hl 0300 12 DCOHND H4 0302 1 DDEVIC H2 0300 1 DEGFLO H24 OOFS 1 DELTAC 922 0077 2 DELTAR B22 0076 1 DFLAQS N8 0240 1 DIGRT HI0 00F1 1 DINDEX 835 0057 1 DMASK 828 02A...

Страница 246: ...M17 00FE 2 FRO Ml 00D4 6 FRl M3 00EO 6 FR2 M4 00E6 6 FRE M2 OODA 6 FREG DiS 0040 1 FRMADR B41 0069 2 FRX M5 OOEC 1 FSCR 1 122 05E6 6 FSCRl M23 05EC 6 FTVPE D13 003E l GPRIOR P24 026F 1 HATABS G12 031A 39 HOLD1 B30 0051 1 HOLD2 B31 029F 1 HOL03 B32 029D 1 HOLD4 B20 02BC l HOLDCH E7 001C 1 ICAXl G9 034A 1 ICAX1Z G21 002A 1 ICAX2 G9 034B 1 ICAX2Z G21 002B 1 ICBAH 06 0345 1 ICBAHZ G18 0025 1 ICBAL G6 ...

Страница 247: ... 0296 1 IOCB Q1 0340 16 IOCBAS 013 0020 16 KEYDEL E2 02F1 1 L9FEND 1 120 0580 96 LBPR1 1 118 057E 1 L8PR2 1 119 057F 1 L8UFF 1 120 0580 96 LIN9UF 851 0247 40 LMARQN 85 0052 1 LOOCOl 915 0063 1 LOOMAP 814 0282 4 MEHLO A1 02E7 2 MEMTOP A2 02E5 2 MLTTMP 840 0066 2 NEWCOL 819 0061 2 NEWROW B19 0060 1 NOCKSM HIS 003C 1 NSION 1 17 OOEE 1 OLDADR B38 005E 2 OLDCHR B37 005D 1 OLDCOL B3 005B 2 OLDROW B3 005...

Страница 248: ...83 1 RADFLG M24 00FB 1 RAMLO N1 0004 3 RAMSIZ A5 02E4 1 RAMTOP A4 006A 1 RECVDN H22 0039 1 RMARGN 86 0053 1 ROWAC B24 0070 2 ROWCRS B2 0054 1 RQWINC 821 0079 1 RTCLOK P3 0012 3 SAVADR 841 0068 2 SAVIO D7 0316 1 SAVMSC 836 0058 2 SCRFLG 89 02B8 1 SDLSTH P23 0231 1 SDLSTL P23 0230 1 SDMCTL P22 022F 1 SHFAMT 829 006F l SHFLOK E6 02BE 1 SOUNDR H10 0041 1 SRTIMR E8 022B 1 SSFLAG E4 02FF 1 SSKCTL H32 02...

Страница 249: ...TSTAT H29 0319 1 TSTDAT N2 0007 1 TXTCOL B4 0291 2 TXTMSC B52 0294 2 TXTOLD B53 0296 6 TXTROW B4 0290 1 USAREA Rl 0080 128 VBREAK P16 0206 2 VDSLST P10 0200 2 VIMIRG P13 0216 2 VINTER P15 0204 2 VKEYBD P17 0208 2 VPRCED P14 0202 2 VSERIN P18 020A 2 VSEROC P20 020E 2 VSEROR P19 020C 2 VTIMR1 P21 0210 2 VTIMR2 P21 0212 2 VTIMR4 P21 0214 2 VVBLKD P12 0224 2 VVBLKI Pll 0222 2 WARMST N13 0008 1 WMODE D...

Страница 250: ...ZTEMP3 ZTEMP4 M15 M14 OOF9 2 OOF7 2 OPERATING SYSTEM C016555 Appendix L 265 ...

Страница 251: ...ASINI Nl RAMLO TRAMSZ N2 TSTDAT N13 WARMST N7 BOOT N12 DOSVEC N3 DOSINI A3 APPMHI P2 POKMSK E5 BRKKEY P3 RTCLOK Cl BUFADR 023 ICCOMT Ll DSKUTL F5 PTIMOT F3 PBPNT F2 PBUFSZ F4 PTEMP 013 014 ICHIOZ 015 ICDNOZ 016 ICCOMZ 017 ICOBAS 018 ICBALZ ICBAHZ 019 ICPTLZ ICPTHZ 020 ICBLLZ ICBLHZ 021 ICAX1Z ICAX2Z 022 G24 G25 ICSPRZ H31 STATUS H13 CHKSUM H16 BUFRLO BUFFRHI H17 BFENLO BFENHI Hl1 CRETRY H12 ORETRY...

Страница 252: ...38 B19 915 B39 B40 941 A4 842 843 850 929 924 925 B22 B21 B44 E7 B45 B23 ATRACT DRKMSK COLRSH TMPCHR HOLDI LMARGN RMARGN ROWCRS COLCRS DINDEX SAVMSC OLOROW OLDCOL OLDCHR OLDADR NEWROW NEWCOL LOGCOL ADRESS MLTTMP OPNTMP TOADR SAVADR FRMADR RAMTOP BUFCNT BUFSTR BITMSK SHFAMT ROWAC COLAC ENDPT DELTAR DELTAC ROWINC COLINC SWPFLG HOLOCH I NSOAT COUNTR SEE FLOATING POINT VARIABLE LIST AT END 6502 STACK ...

Страница 253: ...H32 H18 H19 H2O H23 H3o N8 N9 NI0 Nil C2 851 P24 J3 Jl J7 J8 J4 J2 J7 J9 D14 010 Slo 94 849 952 B53 932 948 831 828 847 B26 813 814 E9 B18 846 B9 B2o E6 816 B7 P27 B8 P27 AS A2 Al Gil Dl 81 E2 SRTIMR CDTMF4 INTEMP CDTMF5 SDMCTL SDLSTL SDLSTH SSKCTL CDEVIC ceOMND CAUXl CAUX2 TEMP ERRFLG DFLAGS DBSECT BOOTAD COLDST DSKTIM LINBUF GPRIOR PADDLO STICKO PTRIGO STRIGO WMODE 8LIM PADDL7 STICK3 PTRIG7 STRI...

Страница 254: ...5 TEMP 1 0315 D6 TEMP3 0316 D7 SAVIO 0317 D2 H25 TIMFLG 0318 H28 STACKP 0319 H29 TSTAT 031A 033F G12 HATABS 0340 G1 G2 IOCB ICHID 0341 G3 ICDNO 0342 G4 ICCOM 0343 G5 ICSTA 0344 0345 G6 ICBAL ICBAH 0346 0347 G7 ICPTL ICPTH 0348 0349 G8 ICBLL ICBLH 034A 034B G9 ICAX1 ICAX2 034C 034F G10 ICSPR 0350 035F G2 G10 IOCB 11 0360 036F G2 G1O IOCB 41 2 0370 037F G2 G10 IOCB 41 3 0380 038F G2 G1O IOCB 4 0390 ...

Страница 255: ...C OOFD OOFE OOFF 057E 057F 05S0 05FF 05EO 05E5 05E6 05EB 05EC 05Fl Ml M2 M3 M4 M5 M6 M7 MS M9 MlO Mll M12 Ml3 M14 M15 M24 Ml6 M17 M18 M19 M20 M21 M22 M23 FRO FRE FRI FR2 FRX EEXP NSIGN ESIGN FCHRFLG DIGRT CIX INBUFF ZTEMPl ZTEMP4 ZTEMP3 RADFLG DEGFLG FLPTR FPTR2 LBPRI LBPR2 LBFEND LBUFF PLYARG FPSCR FSCR FPSCRl SCRl OPERATING SYSTEM C016555 Appendix L 270 ...

Страница 256: ...trol Block DELETE I O command development svstem device filename specification Device Handler device table disk boot disk device Disk File Manager D Disk Handler resident display device screen Display Handler S display list DOS Disk Utilities DRAW I O command driving controller 12 854 55 5 App D O 810 12 6 B28 829 5 App H 3 N12 7 12 1 3 4 N3 10 5 7 10 E5 6 12 3 4 7 10 D1 D7 3 N3 10 7 10 D1 D15 3 5...

Страница 257: ... code interrupts interrupt mask inverse video display 1 0 IOCB 1 0 Control Block 110 retry logic Jovstick keyboard Autorepeat keyboard device Keyboard Handler K keyboard key debouncing light pen LNBUG LOCK 1 0 command logical text lines screen memory see RAM ROM and memory dynamics memoT V map NOTE I O command OPEN I O command paddle page 0 page 1 peripheral devices POINT I O command Power up prin...

Страница 258: ...splay stage 1 VSLANK pl ocess stage 2 VBLANK process tabs Screen Editor timeout device timers system UNLOCK 1 0 command user workspace vectors RAM vectors ROM vertical blank interrupt warmstart see RESET wild card disk filename ZIOCB Zero page laCS Fl 5 5 13 5 9 5 9 3 4 9 5 5 2 N1 13 6 7 1 4 5 9 Bl 55 5 B5 6 5 7 4 5 App H B9 5 3 5 9 App I E6 7 5 12 Hl 32 P13 21 5 9 App e HI0 11 5 9 B16 5 4 E4 5 12...

Страница 259: ......

Страница 260: ...ATARI HOME COMPUTER SYSTEM OPERATING SYSTEM SOURCE LISTING I AlARI A Warner Communications Company ...

Страница 261: ...of is granted unless by written agreement with or written permission from the Corporation Every effort has been made to ensure that this manual accurately documents this product of the ATARI Home Computer Division However due to the ongoing improvement and update of the computer software and hardware ATARI INC cannot guarantee the accuracy of printed material after the date of publication and disc...

Страница 262: ...IED SEPTEMBER ATARI 400 800 COMPUTER OPERATING SYSTEM LISTING MODIFIED TO ASSEMBLE ON THE MICROTEC CROSS ASSEMBLER THIS VERSION IS THE ONE WHICH WAS BURNED INTO ROM THERE IS A RESIDUAL PIECE OF CODE WHICH IS FOR LNBUG THIS IS AT LOCATION 9000 WHICH IS NOT IN ROM THIS IS THE REVISION B EPROM VERSION ...

Страница 263: ... E944 EDEA EE78 EF41 FOE3 F3E4 VECTOR TABLE iO NTSC 1 PAL iCHARACTER SET i VECTOR TABLE iRAM VECTOR INITIAL VALUE TABLE iCENTRAL 1 0 HANDLER i INTERRUPT HANDLER iSERIAL 1 0 DRIVER i DISK HANDLER iPRINTER HANDLER iCASSETTE HANDLER iMONITOR POWER UP MODULE iKEYBOARD DISPLAY HANDLER iHANDLER ENTRY POINTS ARE CALLED OUT IN THE FOLLOWING VECTOR iTABLE THESE ARE THE ADDRESSES MINUS ONE iEXAMPLE FOR EDIT...

Страница 264: ...23 24 25 26 FF iDISK INITIALIZATION i DISK INTERFACE iCENTRAL INPUT OUTPUT ROUTINE iSERIAL INPUT OUTPUT ROUTINE iSET SYSTEM TIMERS ROUTINE iSYSTEM VERTICAL BLANK CALCULATIONS iEXIT VERTICAL BLANK CALCULATIONS iSERIAL INPUT OUTPUT INITIALIZATION iSEND ENABLE ROUTINE i INTERRUPT HANDLER INITIALIZATION iCENTRAL INPUT OUTPUT INITIALIZATION i8LACKBOARD MODE iWARM START ENTRY POINT iCOLD START ENTRY POI...

Страница 265: ...PEN iNON EXISTANT DEVICE i IOCB OPENED FOR WRITE ONLY i INVALID COMMAND iDEVICE OR FILE NOT OPEN i INVALID IOCB NUMBER i IOCB OPENED FOR READ ONLY iEND OF FILE iTRUNCATED RECORD iPERIPHERAL DEVICE TIME OUT PAGE BRKABT PRVOPN NONDEV WRONLY NVALID NOTOPN BADIOC RDONLY EOFERR TRNRCD TIMOUT DNACK FRMERR CRSROR OVRRUN CHKERR 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F iDEVICE DOES NOT ACKNOWLEDGE C...

Страница 266: ...PBUFSZ RES PTEMP RES ZIOCB IOCBSZ MAXIOC IOCBAS ICHIDZ RES ICDNOZ RES ICCOMZ RES ICSTAZ RES ICBALZ RES ICBAHZ RES ICPTLZ RES ICPTHZ RES ICBLLZ RES ICBLHZ RES ICAX1Z RES ICAX2Z RES ICSPRZ RES ICIDNO CIOCHR STATUS RES CHKSUM RES BUFRLO RES BUFRHI RES BFENLO RES BFENHI RES CRETRY RES 2 1 2 2 1 1 1 1 16 8 IOCBSZ 1 1 1 1 1 1 1 1 1 1 1 1 4 ICSPRZ 2 ICSPRZ 3 1 1 1 1 1 1 1 i INDIRECT BUFFER ADDRESS REGIST...

Страница 267: ...CT MASK 250 004F COLRSH RES 1 iATRACT COLOR SHIFTER EOR ED WITH PLAYFIELD 251 252 0002 LEDGE 2 iLMARGN S VALUE AT COLD START 253 0027 REDGE 39 iRMARGN S VALUE AT COLD START 254 0050 TMPCHR RES 1 255 0051 HOLD1 RES 1 256 0052 LMARGN RES 1 iLEFT MARGIN SET TO 1 AT POWER ON 257 0053 RMARGN RES 1 iRIGHT MARGIN SET TO 38 AT POWER ON 258 0054 ROWCRS RES 1 iCURSOR COUNTERS 259 0055 COLCRS RES 2 260 0057 ...

Страница 268: ...S 1 1 1 iCH IS MOVED HERE IN KGETCH BEFORE CNTL SH 2 80 FF ARE RESERVED FOR USER APPLICATIONS NOTE SEE FLOATING POINT SUBROUTINE AREA FOR ZERO PAGE CELLS PAGE 1 STACK PAGE TWO RAM ASSIGNMENTS 0200 RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES RES 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 i INTERRUPT RAM iDISPLAY LIST NMI VECTOR iPROCEED LINE IRQ VECTOR...

Страница 269: ...E 354 023E TEMP RES 1 iTEMPORARY RAM CELL 355 NOTE MAY NOT BE THE LAST WORD ON A PAGE 356 023F ERRFLG RES 1 iERROR FLAG ANY DEVICE ERROR EXCEPT TIME 0 357 358 0240 DFLAGS RES 1 iDISK FLAGS FROM SECTOR ONE 359 0241 DBSECT RES 1 iNUMBER OF DISK BOOT SECTORS 360 0242 BOOTAD RES 2 iADDRESS WHERE DISK BOOT LOADER WILL BE PUT 361 0244 COLDST RES 1 iCOLDSTART FLAG l IN MIDDLE OF COLDSTART 362 363 0245 RE...

Страница 270: ...029D HOLD3 RES 1 414 029E SUBTMP RES 1 415 029F HOLD2 RES 1 416 02AO DMASK RES 1 417 02A1 TMPLBT RES 1 418 02A2 ESCFLG RES 1 iESCAPE FLAG 419 02A3 TABMAP RES 15 420 02B2 LOGMAP RES 4 iLOGICAL LINE START BIT MAP 421 02B6 INVFLG RES 1 i INVERSE VIDEO FLAG TOGGLED BY ATARI KEY 422 02B7 FILFLG RES 1 iRIGHT FILL FLAG FOR DRAW 423 02B8 TMPROW RES 1 424 02B9 TMPCOL RES 2 425 02BB SCRFLG RES 1 iSET IF SCR...

Страница 271: ... 468 Q2FA CHAR RES 1 469 02FB ATACHR RES 1 iATASCII CHARACTER 470 02FC CH RES 1 iGLOBAL VARIABLE FOR KEYBOARD 471 02FD FILDAT RES 1 iRIGHT FILL DATA DRAW 472 02FE DSPFLG RES 1 i DISPLAY FLAG DISPLAY CNTLS IF NON ZERO 473 02FF SSFLAG RES 1 iSTART STOP FLAG FOR PAGING CNTL 1 CLEARE 474 475 476 477 478 479 480 481 PAGE THREE RAM ASSIGNMENTS 482 483 0300 DCB iDEVICE CONTROL BLOCK 484 0300 DDEVIC RES 1...

Страница 272: ...iTEMPORARV STORAGE REGISTER iTEMPORARV STORAGE REGISTER iTEMPORARV STORAGE REGISTER iSAVE SERIAL IN DATA PORT iTIME OUT FLAG FOR BAUD RATE CORRECTION iSIO STACK POINTER SAVE CELL iTEMPORARV STATUS HOLDER 38 iHANDLER ADDRESS TABLE HATABS 5 iMAXIMUM HANDLER ADDRESS INDEX NOTE THE ENTIRE IOCB DEFINITIONS HAVE BEEN MODIFIED IOCB ICHID ICDNO IeCOM ICSTA ICBAL ICBAH ICPTL ICPTH ICBLL ICBLH ICAX1 ICAX2 I...

Страница 273: ...1R FLD1P FSTOR FSTOP FMOVE PLYEVL EXP EXP10 LOG LOG10 D8E6 09AA 09D2 OA60 DA66 OAOB OB28 DD89 DD8D 0098 DD9C DDA7 DDAB DDB6 DD40 iFLOATING PT PRECISION OF BYTES CLEAR NO ERROR CARR iASCII FLOATING POINT FP INBUFF CIX FRO CIX CARRY iFP ASCII FRO LBUFF INBUFF i INTEGER FP O FFFF LSB MSB IN FRO FRO l FRO iFP INTEGER FRO FRO FRO l CARRY FRO FRO FRl CARRY iFRO FRO FRl CARRY iFRO FRO FRl CARRY FRO FRO I...

Страница 274: ...IX RES INBUFF RES ZTEMP1 RES ZTEMP4 RES ZTEMP3 RES OEGFLG 1 1 i OF DIGITS RIGHT OF DECIMAL iCURRENT INPUT INDEX 2 iPOINTS TO USER S LINE INPUT BUFFER 2 2 2 RADFLG RES 1 RADON 0 DEGON 6 iO RADIANS 6 DEGREES INDICATES RADIANS INDICATES DEGREES FLPTR RES 2 iPOINTS TO USER S FLOATING PT NUMBER FPTR2 RES 2 FLOATING PT ROUTINES NON ZERO PAGE RAM NEEDEO ONLY IF F P ROUTINES CALLED LBPR1 LBPR2 LBUFF PLYAR...

Страница 275: ... 683 0001 HPOSPl CTIA l 684 0002 HPOSP2 CTIA 2 685 0003 HPOSP3 CTIA 3 686 0004 HPOSMO CTIA 4 687 0005 HPOSMl CTIA 5 68S 0006 HPOSM2 CTIA 6 689 0007 HPOSM3 CTIA 7 690 D008 SIZEPO CTIA 8 691 0009 SIZEPl CTIA 9 692 OOOA SI ZEP2 CTIA 10 693 OOOB SIZEP3 CTIA 11 694 OOOC SIZEM CTIA 12 695 0000 GRAFPO CTIA 13 696 OOOE GRAFPl CTIA 14 697 OOOF GRAFP2 CTIA 15 698 0010 GRAFP3 CTIA 16 699 0011 GRAFM CTIA 17 7...

Страница 276: ...0400 ANTIC D400 i VBLANK ACTION DESCRIPTION 736 0400 OMACTL ANTIC O iDMACTL SDMCTL ON OPEN S OR E 737 0401 CHACTL ANTIC l iCHACTL CHACT ON OPEN S OR E 738 0402 OLISTL ANTIC 2 iOLISTL SOLSTL ON OPEN S OR E 739 D403 OLISTH ANTIC 3 iOLISTH SDLSTH ON OPEN S OR E 740 0404 HSCROL ANTIC 4 741 0405 VSCROL ANTIC 5 742 D407 PMBASE ANTIC 7 743 0409 CHBASE ANTIC 9 iCHBASE CHBAS ON OPEN S OR E 744 D40A WSYNC A...

Страница 277: ...B4 6500 ASSEMBLER VER 1 0MR PAGE 16 760 PAGE 761 LIST S 762 TITLE CENTRAL INPUT OUTPUT CIa 2 7 79 763 UPDATED BY AL MILLER 3 9 79 764 0030 ASCZER 0 i ASCI I ZERO 765 003A COLON 3A ASC I I COLON 766 0098 EOL 98 iEND OF RECORD ...

Страница 278: ...T POWER UP 786 E4A6 A2 00 CIOINT LDX 10 787 E4A8 A9 FF C101 1 LDA IIOCFRE iSET ALL IOCB S TO FREE 788 E4AA 9D 40 03 STA ICHID X iBY SETTING HANDLER ID S FF 789 E4AD A9 CO LDA IERRTNL 790 E4AF 9D 46 03 STA ICPTL X iPOINT PUT TO ERROR ROUTINE 791 E4B2 A9 E4 LDA ERRTNH 792 E4B4 9D 47 03 STA ICPTH X 793 E4B7 8A TXA 794 E4B8 18 CLC 795 E4B9 69 10 ADC IIOCBSZ iBUMP INDEX BY SIZE 796 E4BB AA TAX 797 E4BC...

Страница 279: ...USER IOCB 832 E4DB 99 20 00 STA IOCBAS Y j TO ZERO PAGE 833 E4DE E8 INX 834 E4DF C8 INY 835 E4EO CO OC CPY i12 12 BYTES 836 E4E2 90 F4 BCC IOC1A 837 838 COMPUTE CIa INTERNAL VECTOR FOR COMMAND 839 E4E4 AO 84 LOY iNVALID iASSUME INVALID CODE 840 E4E6 AS 22 LDA ICCOMZ iCOMMAND CODE TO INDEX 841 E4E8 C9 03 CMP OPEN i IS COMMAND LEGAL 842 E4EA 90 25 BCC CIERR4 i NO 843 E4EC A8 TAY 844 845 MOVE COMMAND...

Страница 280: ...EARCH 874 E517 BO F8 BCS CIERR4 iGO IF DEVICE NOT FOUND 875 876 i DEVICE FOUND INITIALIZE IOCB FOR OPEN 877 878 i COMPUTE HANDLER ENTRY POINT 879 E519 20 3D E6 IOC7 JSR COMENT 880 E51C BO F3 BCS CIERR4 iGO IF ERROR IN COMPUTE 881 882 GO TO HANDLER FOR INITIALIZATION 883 E51E 20 89 E6 JSR GOHAND iUSE INDIRECT JUMP 884 885 STORE PUT BYTE ADDRESS 1 INTO IOCB 886 E521 A9 OB LDA PUTCHR iSIMULATE PUT CH...

Страница 281: ...6 STA ICPTLZ 909 E54B 4C 10 E6 JMP CIRTN2 iRETURN 910 911 912 STATUS AND SPECIAL REQUESTS 913 DO IMPLIED OPEN IF NECESSARY AND GO TO DEVICE 914 E54E A5 20 CISTSP LOA ICHIDZ i IS THERE A HANDLER ID 915 E550 C9 FF CMP IOCFRE 916 E552 DO 05 BNE CIST1 i YES 917 918 IOCB IS FREE DO IMPLIED OPEN 919 E554 20 9E E6 JSR DEVSRC iFIND DEVICE IN TABLE 920 E557 BO B8 BCS CIERR4 iGO IF ERROR IN COMPUTE 921 922 ...

Страница 282: ... 89 E6 JSR GOHAND 951 E582 8S 2F STA CIOCHR 952 584 4C 1D E6 JMP CIRTN2 953 954 LOOP TO FILL BUFFER OR END RECORD 955 E587 20 89 E6 RCI3 JSR GOHAND GO TO HANDLER TO GET BYTE 956 ES8A 85 2F STA CIOCHR SAVE BYTE 957 E5SC 30 35 BMI RCI4 iEND TRANSFER IF ERROR 958 ESSE AO 00 LOY 0 959 E590 91 24 STA ICBALZ Y iPUT BYTE IN USER BUFFER 960 E592 20 70 E6 JSR INCBFP i INCREMENT BUFFER POINTER 961 E595 A5 2...

Страница 283: ...6 JSR GOHAND iGET BYTE FROM HANDLER 985 E5B5 85 2F STA CIOCHR i SAVE CHARACTER 986 E5B7 30 OA BMI RCI4 i GO IF ERROR 987 988 TEXT RECORD WAIT FOR EOL 989 E5B9 A5 2F LDA CIOCHR i GET GOT BYTE 990 E5BB C9 9B CNP EOL i IS IT EOL 991 E5BD DO F3 BNE RCI6 i NO CONTINUE 992 993 i END OF RECORD BUFFER FULL SEND TRUNCATED RECORD MESSAGE 994 E5BF A9 89 RC I 11 LDA TRNRCD i ERROR CODE 995 E5C1 85 23 STA ICST...

Страница 284: ...NC ICBLLZ iSET BUFFER LENGTH 1 1021 E5E3 DO 06 BNE WCI4 iTHEN JUST TRANSFER ONE BYTE 1022 i 1023 i LOOP TO TRANSFER BYTES FROM BUFFER TO HANDLER 1024 E5E5 AO 00 WCI3 LOY 0 1025 E5E7 B1 24 LOA ICBALZ I Y iGET BYTE FROM BUFFER 1026 E5E9 85 2F STA CIOCHR i SAVE 1027 E5EB 20 89 E6 WCI4 JSR GOHAND i GO PUT BYTE 1028 E5EE 30 25 BMI WCI5 iEND IF ERROR 1029 E5FO 20 70 E6 JSR INCBFP i INCREMENT BUFFER POIN...

Страница 285: ...WCI2 LOA ICCOMZ iGET COMMAND CODE 1051 E60C 29 02 AND 2 IS IT PUT CHARACTER 1052 E60E DO 05 BNE WCI5 YES END TRANSFER 1053 1054 PUT RECORD TEXT BUFFER EMPTY SEND EOL 1055 E610 A9 9B LDA EOL 1056 E612 20 89 E6 JSR GOHAND GO TO HANDLER 1057 1058 END PUT TRANSFER 1059 E615 20 77 E6 WCt5 JSR SUBBFL iSET ACTUAL PUT BUFFER LENGTH 1060 E618 4C 10 E6 JMP CIRTN2 iRETURN ...

Страница 286: ...CBAL Y 1071 E622 85 24 STA ICBALZ iRESTORE USER BUFFER POINTER 1072 E624 B9 45 03 LOA ICBAH Y 1073 E627 85 25 STA ICBAHZ 1074 E629 A2 00 LDX 0 iLOOP COUNT AND INDEX 1075 E62B B5 20 CIRT3 LOA IOCBAS X i ZERO PAGE 1076 E620 99 40 03 STA IOCB Y j TO USER AREA 1077 E630 E8 INX 1078 E631 C8 INY 1079 E632 EO OC CPX 12 i 12 BYTES 1080 E634 90 FS BCC CIRT3 1081 1082 RESTORE A X 8t Y 1083 E636 AS 2F LOA CI...

Страница 287: ...VECTOR FROM 1110 E659 AA TAX iHANDLER ITSELF AND SAVE 1111 E65A C8 INY 1112 E65B B1 2C LDA ICSPRZ Y iGET HI BYTE OF VECTOR 1113 E65D 85 2D STA ICSPRZ l 1114 E65F 86 2C STX ICSPRZ i SET LO BYTE 1115 E661 18 CLC i SHOW NO ERROR 1116 E662 60 COM2 RTS 1117 1118 1119 i DECBFL DECREMENT BUFFER LENGTH DOUBLE BYTE 1120 i Z FLAG 0 ON RETURN IF LENGTH 0 AFTER DECREMENT 1121 E663 C6 28 DECBFL DEC ICBLLZ iDEC...

Страница 288: ... E689 AO 92 GOHAND LDY FNCNOT iPREPARE NO FUNCTION STATUS FOR HANDLER RTS 1152 E68B 20 93 E6 JSR CIJUMP iUSE THE INDIRECT JUMP 1153 E68E 84 23 STY ICSTAZ i SAVE STATUS 1154 E690 CO 00 CPY 0 AND SET N FLAG 1155 E692 60 RTS 1156 1157 INDIRECT JUMP TO HANDLER BY PAUL S METHOD 1158 E693 AA CIJUMP TAX i SAVE A 1159 E694 A5 2D LDA ICSPRZ 1 iGET JUMP ADDRESS HI BYTE 1160 E696 48 PHA iPUT ON STACK 1161 E6...

Страница 289: ...6 BPL DEVSl iCONTINUE FOR ALL DEVICES 1181 1182 i NO DEVICE FOUND DECLARE NON EXISTENT DEVICE ERROR 1183 E6BO AO 82 CIERR2 LOY NONDEV i ERROR CODE 1184 E6B2 38 SEC i SHOW ERROR 1185 E6B3 BO 13 BCS DEVS4 i AND RETURN 1186 1187 i FOUND DEVICE SET ICHID ICDNO AND INIT DEVICE 1188 E6B5 98 DEVS2 TYA 1189 E6B6 85 20 STA ICHIDZ iSAVE HANDLER INDEX 1190 E6B8 38 SEC 1191 E6B9 AO 01 LDY 1 1192 E6BB B1 24 LO...

Страница 290: ...LES 1206 1207 COMMAND TABLE 1208 MAPS EACH COMMAND TO OFFSET FOR APPROPRIATE VECTOR IN HANDLER 1209 EoC9 00 04 04 04 COMTAB BYTE 0 4 4 4 4 6 0 0 6 2 8 10 1210 E6CD 04 06 06 06 1211 E6D1 06 02 08 OA 1212 022F LENGTH CIOINT 1213 E6D5 CRNTP1 1214 14 1215 0014 00 CIOSPR BYTE INTORG CRNTP1 GC IOL IS TOO LONG ...

Страница 291: ...2 8F E7 WORD SYIRGB VPRCED 1236 E484 8F E7 WORD SYIRGB VINTER 1237 E486 8F E7 WORD SYIRGB VBREAK 1238 1239 E488 RES 8 1240 E490 8F E7 WORD SYIRGB i VTIMR1 1241 E492 8F E7 WORD SYIRGB VTIMR2 1242 E494 8F E7 WORD SYIRGB i VTIMR4 1243 E496 06 E7 WORD SYIRG i VIMIRG 1244 E498 00 00 00 00 WORD 0 0 0 0 0 CDTMVl 4 1245 E49C 00 00 00 00 1246 E4AO 00 00 1247 E4A2 AE E7 WORD SYSVBL VVBLKI 1248 E4A4 05 E9 WO...

Страница 292: ...E6F9 02 BYTE 02 i TIMER 2 1286 E6FA 01 BYTE 01 i TIMER 1 1287 E6FB 08 BYTE 08 iSERIAL OUT COMPLETE 1288 E6FC 10 BYTE 10 iSERIAL OUT READY 1289 E6FD 20 BYTE 20 i SERIAL IN READY 1290 E6FE 1291 i THIS IS A TABLE OF OFFSETS INTO PAGE 2 THEY POINT TO 1292 E6FE 36 ADRTAB BYTE BRKKY INTABS 1293 E6FF 08 BYTE VKEYBD INTABS 1294 E700 14 BYTE VTIMR4 INTABS 1295 E701 12 BYTE VTIMR2 INTABS 1296 E702 10 BYTE V...

Страница 293: ...50 AA TAX PUT IT INTO X 1335 E751 6C 8C 02 JMP JVECK JUMP TO THE PROPER ROUTINE 1336 E754 A9 00 BRKKY2 LOA 0 BREAK KEY ROUTINE 1337 E756 85 11 STA BRKKEY SET BREAK KEY FLAG 1338 E758 80 FF 02 STA SSFLAG START STOP FLAG 1339 E75B 80 FO 02 STA CRSINH CURSOR INHIBIT 1340 E75E 85 40 STA ATRACT TURN OFF ATRACT MODE 1341 E760 68 PLA 1342 E761 40 RTI i EX IT FROM INT 1343 E762 68 SYIRG8 PLA 1344 E763 AA ...

Страница 294: ...EE IF DISPLAY LIST 1374 E796 6C 00 02 JMP VDSLST 1375 E799 48 PNMI1 PHA 1376 E79A AD OF D4 LDA NMIST 1377 E79D 29 20 AND 20 i SEE IF RESET 1378 E79F FO 03 BEG 5 1379 E7A1 4C 74 E4 JMP WARMSV iGO THRU WARM START JUMP 1380 E7A4 SA TXA iSAVE REGISTERS 1381 E7A5 48 PHA 1382 E7A6 98 TYA 1383 E7A7 48 PHA 1384 E7A8 8D OF D4 STA NMIRES iRESET INTERRUPT STATUS 1385 E7A8 6C 22 02 JMP VV8LKI iJUMP THRU VECTO...

Страница 295: ... 1409 E7CE 20 DO E8 JSR OCTIMR iGO DECREMENT TIMER1 1410 E7D1 DO 03 BNE SYSVB2 iBRANCH IF STILL COUNTING 1411 E703 20 CA E8 JSR JTIMR1 iGO JUMP TO ROUTINE 1412 E7D6 A5 42 SYSVB2 LDA CRITIC 1413 E7D8 DO 08 BNE XXIT iGO IF CRITICAL SET 1414 E7DA BA TSX iSEE IF I WAS SET 1415 E7DB BD 04 01 LOA 104 X i GET STACKED P 1416 E7DE 29 04 AND 04 i I BIT 1417 E7EO FO 03 BEQ SYSVB3 iBRANCH IF OK 1418 E7E2 4C 0...

Страница 296: ... LOA KEYDEL iKEY DELAY COUNTER 1464 E852 FO 03 BEG SYVB6A i IF COUNTED DOWN ALREADY 1465 E854 CE F1 02 DEC KEYDEL iCOUNT IT 1466 i CHECK SOFTWARE REPEAT TIMER 1467 E857 AD 28 02 SYVB6A LDA SRTIMR 1468 E85A FO 17 BEG SYSVB7 iDOESN T COUNT 1469 E8SC AD OF D2 LOA SKSTAT 1470 E85F 29 04 AND 04 iCHECK KEY DOWN BIT 1471 E861 DO 60 BNE SYSVB6 iBRANCH IF NO LONGER DOWN 1472 E863 CE 2B 02 DEC SRTIMR iCOUNT...

Страница 297: ... 88 DEY 1520 E8BE 10 EC BPL PTRLP 1521 1522 E8CO 6C 24 02 JMP VVBLKD iGO TO DEFERRED VBLANK ROUTINE 1523 00E8 SV7H SYSVB7 256 1524 0073 SV7L 256 SV7H SYSVB7 1525 E8C3 A9 00 SYSVB6 LDA 0 1526 E8C5 8D 2B 02 STA SRTIMR iZERO TIMER 1527 E8CS FO A9 BEG SYSVB7 i UNCOND 1528 E8CA 6C 26 02 JTIMR1 JMP CDTMA1 1529 E8CD 6C 28 02 JTIMR2 JMP CDTMA2 1530 1531 SUBROUTINE TO DECREMENT A COUNTDOWN TIMER 1532 i ENT...

Страница 298: ...62 E8F8 DO FD BNE SETLOP i IF THIS IS LINE 7C 1563 E8FA AE 20 02 LOX INTEMP 1564 E8FD 90 17 02 STA COTMV1 1 X 1565 E900 98 TYA 1566 E901 90 16 02 STA CDTMV1 2 X 1567 E904 60 RTS 1568 1569 i EXIT FROM VERTICAL BLANK 1570 1571 E905 68 XITVBL PLA i UNSTACK Y 1572 E906 A8 TAY 1573 E907 68 PLA i UNSTACK X 1574 E908 AA TAX 1575 E909 68 PLA i UNSTACK A 1576 E90A 40 RTI iAND GO BACK FROM WHENCE 1577 00E6 ...

Страница 299: ...ONTROLLER COLLEEN OPERATING SYSTEM SIO SERIAL BUS INPUT OUTPUT CONTROLLER WITH SOFTWARE BAUD RATE CORRECTION ON CASSETTE AL MILLER 3 APR 79 PAGE THIS MODULE HAS ONE ENTRY POINT IT IS CALLED BY THE DEVICE HANDLERS IT INTERPRETS A PREVIOUSLY ESTABLISHED DEVICE CONTROL BLOCK STORED IN GLOBAL RAM TO ISSUE COMMANDS TO THE SERIAL BUS TO CONTROL TRANSMITTING AND RECEIVING DATA 38 ...

Страница 300: ...c ERROR E MISCELLANEOUS EGUATES B192LO B192HI B600LO B600HI HITONE LOTONE WIRGLO RIRGLO WSIRG RsIRG WIRGLO RIRGLO WSIRG RsIRG 28 00 CC 05 05 07 IF PALFLG 150 100 13 8 ENDIF IF PALFLG l 180 120 15 10 iPRINT 16 CHARACTERS SIDEWAYS PRINT 40 CHARACTERS NORMALLY iPRINT 20 CHARACTERS DOUBLE WIDE iPLOT MODE iDEVICE ACKNOWLEDGES INFORMATION iDEVICE DID NOT UNDERSTAND iDEVICE SUCCESSFULLY COMPLETED OPERATI...

Страница 301: ... 1666 1667 0002 TEMPHI TEMP 256 iADDRESS OF TEMP CELL HI BYTE 1668 003E TEMPLO 256 TEMPHI TEMP i LO BYTE 1669 0002 CBUFHI CDEVIC 256 iADDRESS OF COMMAND BUFFER HI BYTE 1670 003A CBUFLO 256 CBUFHI CDEVIC i LO BYTE 1671 1672 OOOD CRETRI 13 iNUMBER OF COMMAND FRAME RETRIES 1673 0001 DRETRI 1 iNUMBER OF DEVICE RETRIES 1674 0002 CTIMLO 2 iCOMMAND FRAME ACK TIME OUT LO BYTE 1675 0000 CTIMHI 0 iCOMMAND F...

Страница 302: ...NE 1705 1706 E944 A9 3C SIOINT LDA MOTRST 1707 E946 8D 02 D3 STA PACTL i TURN OFF MOTOR 1708 1709 E949 A9 3C LDA NCOMHI 1710 E94B 8D 03 D3 STA PBCTL iRAISE NOT COMMAND LINE 1711 1712 1713 E94E A9 03 LDA 3 1714 E950 80 32 02 STA SSKCTL iGET POKEY OUT OF INITIALIZE MODE 1715 E953 85 41 STA SOUNDR i INIT POKE ADDRESS FOR GUIET 1 0 1716 E955 80 OF D2 STA SKCTL 1717 1718 1719 E958 60 RTS iRETURN 1720 1...

Страница 303: ...ER 1758 1759 E98E AD 02 03 LOA DCOMND 1760 E991 80 3B 02 STA CCOMND iSET BUS COMMAND 1761 1762 E994 AD OA 03 LOA OAUX1 iSTORE COMMAND FRAME AUX BYTES 1 AND 2 1763 E997 80 3C 02 STA CAUX1 1764 E99A AD OB 03 LDA DAUX2 1765 E99D 8D 3D 02 STA CAUX2 iDONE SETTING UP COMMAND BUFFER 1766 1767 E9AO 18 CLC iSET BUFFER POINTER TO COMMAND FRAME BUFFER 1768 E9A1 A9 3A LOA CBUFLO 1769 E9A3 85 32 STA BUFRLO iAN...

Страница 304: ...E8 BEG BADCOM iBRANCH IF BAD 1810 1811 1812 1813 i WAIT FOR COMPLETE SIGNAL FROM PERIPHERAL 1814 1815 E9D7 20 75 EC WATCOM JSR STTMOT iSET DDEVICE TIME OUT VALUES IN Y X 1816 1817 E9DA A9 00 LDA 00 1818 E9DC 8D 3F 02 STA ERRFLG iCLEAR ERROR FLAG 1819 1820 E9DF 20 9B EC JSR WAITER iSET UP TIMER AND WAIT 1821 E9E2 FO 12 BEG DERR iBRANCH IF TIME OUT 1822 1823 1824 DEVICE DID NOT TIME OUT 1825 1826 E9...

Страница 305: ... IN Y 1865 EA16 8C 03 03 STY DSTATS iAND THE DCB STATUS WORD 1866 EA19 60 RTS RETURN 1867 1868 1869 1870 1871 WAIT SUBROUTINE 1872 1873 WAITS FOR COMPLETE OR ACK 1874 RETURNS Y FF IF SUCCESSFUL Y OO IF NOT 1875 1876 EA1A A9 00 WAIT LOA 00 1877 EA1C 8D 3F 02 STA ERRFLG iCLEAR ERROR FLAG 1878 1879 EA1F 18 CLC iLOAO BUFFER POINTER WITH ADDRESS 1880 EA20 A9 3E LOA TEMPLO iOF TEMPORARY RAM CELL 1881 EA...

Страница 306: ... 85 30 STA STATUS 1916 1917 EA56 A5 30 NWOK LOA STATUS 1918 EAS8 C9 8A CMP TIMOUT 1919 EA5A FO 07 BEG BAD iBRANCH IF TIME OUT 1920 1921 EA5C A9 FF LOA FF 1922 EASE 80 3F 02 STA ERRFLG iSET SOME ERROR FLAG 1923 EA61 DO 02 BNE GOOD iRETURN WITH OUT SETTING Y 0 1924 1925 EA63 AO 00 BAD LOY 0 1926 1927 EA65 A5 30 GOOD LOA STATUS 1928 EA67 80 19 03 STA TSTAT 1929 EA6A 60 RTS iRETURN 1930 1931 1932 1933...

Страница 307: ... PHA iSAVE Y REG ON STACK 1977 1978 EA92 E6 32 INC BUFRLO i INCREMENT BUFFER POINTER 1979 EA94 DO 02 BNE NOWRPO 1980 EA96 E6 33 INC BUFRHI 1981 1982 EA98 A5 32 NOWRPO LOA BUFRLO iCHECK IF PAST END OF BUFFER 1983 EA9A C5 34 CMP BFENLO 1984 EA9C A5 33 LOA BUFRHI i HIGH PART 1985 EA9E E5 35 SBC BFENHI 1986 EAAO 90 1C BCC NOTEND iBRANCH IF NOT PAST END OF BUFFER 1987 1988 EAA2 A5 3B LDA CHKSNT 1989 EA...

Страница 308: ...F A5 3B ISRTD LDA CHKSNT 2027 EADl FO OB BEG FOOEY iBRANCH IF CHECKSUM NOT YET SENT 2028 i 2029 EAD3 85 3A STA XMTDON iOTHERWISE SET TRANSMISSION DONE FLAG 2030 2031 EAD5 A5 10 LDA POKMSK iDISABLE TRANSMIT DONE INTERRUPT 2032 EAD7 29 F7 AND F7 2033 EAD9 85 10 STA POKMSK 2034 EADB 80 OE D2 STA IRGEN 2035 2036 EADE 68 FOOEY PLA iRETURN FROM INTERRUPT 2037 EADF 40 RTI 2038 2039 2040 2041 2042 2043 20...

Страница 309: ...DA TIMOUT i YES 2074 EBOC 85 30 STA STATUS iSET TIMEOUT STATUS 2075 2076 2077 2078 2079 2080 2081 EBOE 60 RRETRN RTS iRETURN 2082 2083 2084 2085 2086 2087 2088 2089 i SERIAL INPUT READY INTERRUPT SERVICE ROUTINE 2090 2091 EBOF 98 ISRSIR TYA 2092 EB10 48 PHA iSAVE Y REG ON STACK 2093 2094 2095 2096 EB11 AD OF 02 LOA SKSTAT 2097 EB14 8D OA D2 STA SKRES iRESET STATUS REGISTER 2098 THIS MAY NOT BE THE...

Страница 310: ...EGISTER INTO BUFFER 2134 2135 EB43 18 CLC iADD IT TO CHECKSUM 2136 EB44 65 31 ADC CHKSUM 2137 EB46 69 00 ADC 0 2138 EB48 85 31 STA CHKSUM 2139 2140 EB4A E6 32 INC BUFRLO i INCREMENT BUFFER POINTER 2141 EB4C DO 02 BNE NTWRP1 2142 EB4E E6 33 INC BUFRHI 2143 2144 EB50 A5 32 NTWRP1 LDA BUFRLO 2145 EB52 C5 34 eMP BFENLO 2146 EB54 A5 33 LDA BUFRHI 2147 EB56 E5 35 SBC BFENHI 2148 EB58 90 DE BCC SUSUAL iB...

Страница 311: ...ASSETTE HANDLING CODE 2196 2197 EB80 AD 03 03 CASENT LOA DSTATS 2198 EB83 10 2E BPL CASRED iBRANCH IF INPUT FROM CASSETTE 2199 2200 i WRITE A RECORD 2201 2202 EB85 A9 CC LDA B600LO iSET BAUD RATE TO 600 2203 EB87 80 04 D2 STA AUDF3 2204 EB8A A9 05 LDA B600HI 2205 EB8C 8D 06 D2 STA AUDF4 2206 2207 EB8F 20 F2 EB JSR SENDEN iTURN ON POKEY MARK TONE 2208 2209 EB92 AO OF LOY WSIRG iLOAD SHORT WRITE INT...

Страница 312: ... 34 LDA MOTRGO 2245 EBC8 80 02 03 STA PACTL iTURN ON MOTOR 2246 2247 EBCB AD 17 03 TIMIT1 LDA TIMFLG iLOOP UNTIL DONE 2248 EBCE DO FB BNE TIMITl 2249 2250 EBDO 20 6A EB JSR LDPNTR iLOAD BUFFER POINTER WITH DCB INFORMATION 2251 2252 EBD3 20 75 EC JSR STTMOT iSET DEVICE TIME OUT IN Y X 2253 EBD6 20 B9 ED JSR SETVBX 2254 2255 EBD9 20 10 ED JSR BEGIN SET INITIAL BAUD RATE 2256 2257 EBDC 20 EO EA JSR R...

Страница 313: ...A SSKCTL iSTORE NEW VALUE TO SYSTEM MASK 2300 ECOF 8D OF D2 STA SKCTL iSTORE TO ACTUAL REGISTER 2301 2302 EC12 A9 C7 LDA C7 iMASK OFF PREVIOUS SERIAL BUS INTERRUPT BITS 2303 EC14 25 10 AND POKMSK 2304 EC16 09 10 ORA 10 iENABLE OUTPUT DATA NEEDED INTERRUPT 2305 2306 2307 EC18 4C 31 EC JMP CONTIN iGO CONTINUE IN RECEIVE ENABLE SUBROUTINE 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 i RECEI...

Страница 314: ...10 F9 BPL NOISE1 2347 2348 EC4C A9 AO LDA AO 2349 EC4E 8D 05 D2 STA AUDC3 iTURN OFF SOUND ON CHANNEL 3 2350 EC51 AC 00 03 LDY DDEVIC 2351 EC54 CO 60 CPY CASET 2352 EC56 FO 06 BEQ CAS31 iBRANCH IF CASSETTE IS DESIRED 2353 EC58 8D 01 D2 STA AUDC1 iOTHERWISE TURN OFF CHANNELS 1 AND 2 2354 EC5B 8D 03 D2 STA AUDC2 2355 2356 2357 EC5E 60 CAS31 RTS iRETURN 2358 2359 2360 2361 2362 2363 2364 2365 2366 236...

Страница 315: ...A 2405 EC80 29 CO AND CO iMASK OFF ALL BUT 2 HI BITS 2406 EC82 A8 TAY iTHIS IS La BYTE OF TIME OUT 2407 2408 EC83 60 RTS 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 EC84 OF EB INTTBL WORD ISRSIR iSERIAL INPUT READY 2420 EC86 90 EA WORD ISRODN iOUTPUT DATA NEEDED 2421 EC88 CF EA WORD ISRTD iTRANSMISSION DONE 2422 2423 OOEB SIRHI ISRSIR 256 iSERIAL INPUT READY ISR ADDRESS 2424 OOOF SIRLO ...

Страница 316: ...EG REGS FOR THE BAUD RATE AS 2466 i MEASURED BY AN INTERVAL OF THE VCOUNT TIMER 2467 2468 ECA3 8D 10 03 COMPUT STA TIMER2 2469 ECA6 8C 11 03 STY TIMER2 1 iSAVE FINAL TIMER VALUE 2470 ECA9 20 04 ED JSR ADJUST iADJUST VCOUNT VALUE 2471 ECAC 8D 10 03 STA TIMER2 iSAVE ADJUSTED VALUE 2472 ECAF AD OC 03 LDA TIMER1 2473 ECB2 20 04 ED JSR ADJUST i ADJUST 2474 ECB5 8D OC 03 STA TIMER1 iSAVE ADJUSTED TIMER1...

Страница 317: ...511 ECE8 88 DEY 2512 ECE9 10 FA BPL DOINTP INTERPOLATION CONSTANT COMPUTATION DONE 2513 2514 ECEB AO 00 ENINTP LDY 0 2515 ECED 8C OE 03 STY ADDCOR CLEAR ADDITION CORRECTION FLAG 2516 ECFO 38 SEC 2517 ECF1 E9 07 SBC 7 ADJUST INTERPOLATION CONSTANT 2518 ECF3 10 03 BPL PLUS 2519 ECF5 CE OE 03 DEC ADDCOR 2520 ECF8 18 PLUS CLC 2521 ECF9 7D DO ED ADC POKTAB X iADD CONSTANT TO LO BYTE TABLE VALUE 2522 EC...

Страница 318: ...LDX VCOUNT iREAD VERTICAL LINE COUNTER 2573 ED2C A4 14 LDY RTCLOK 2 iREAD La BYTE OF VBLANK CLOCK 2574 ED2E 8E OC 03 STX TIMER1 2575 ED31 8C OD 03 STY TIMER1 1 iSAVE INITIAL TIMER VALUE 2576 2577 ED34 A2 01 LDX 1 iSET MODE FLAG 2578 ED36 8E 15 03 STX TEMP3 2579 ED39 AO OA LDY 10 iSET BIT COUNTER FOR 10 BITS 2580 ED3B AS 11 COUNT LDA BRKKEY 2581 ED3D FO 61 BEG BROKE iBRANCH IF BREAK KEY PRESSED 258...

Страница 319: ... 91 32 STA BUFRLO Y 2618 ED8D A9 AA LDA AA 2619 ED8F 85 31 STA CHKSUM iSTORE CHECKSUM FOR 2 BYTES OF AA 2620 ED91 18 CLC 2621 ED92 AS 32 LDA BUFRLO 2622 ED94 69 02 ADC 2 2623 ED96 85 32 STA BUFRLO 2624 ED98 AS 33 LDA BUFRHI 2625 ED9A 69 00 ADC 0 2626 ED9C 85 33 STA BUFRHI i INCR BUFFER POINTER BY 1 2627 ED9E 58 CLI 2628 ED9F 60 RTS 2629 2630 2631 2632 EDAO 20 SF EC BROKE JSR SENDDS iBREAK KEY WAS ...

Страница 320: ...THE FOLLOWING FORMULAS WERE USED TO DETERMINE THE TABLE VALUES 2679 2680 F OUT F IN 2 AUDF M I WHERE F IN 1 78979 MHZ M 7 2681 2682 FROM THIS WAS DERIVED THE FORMULA USED TO COMPUTE THE 2683 TABLE VALUES BASED ON A MEASUREMENT OF THE PERIOD BY 2684 AN INTERVAL OF THE VCOUNT TIMER 2685 2686 AUDF 7 11 365167 T OUT WHERE T OUT OF COUNTS 2687 127 USEC RESOLUTION OF VCOUNT FOR 1 2688 CHARACTER TIME 10 ...

Страница 321: ...5 469 168 2710 EDE6 DO 07 WORD 7DO i 447 176 2711 WORD 82B i 428 184 2712 WORD 886 410 192 2713 WORD 8E1 i 394 200 2714 WORD 93C 379 208 2715 WORD 997 i 365 216 2716 WORD 9F2 i 352 224 2717 WORD A4D i339 232 2718 WORD AA8 i 328 240 2719 WORD B03 318 248 2720 2721 2722 2723 2724 i 2725 EDE8 CRNTP3 2726 14 2727 0014 02 SIOSPR BYTE DSKORG CRNTP3 i GSIOL IS TOO LONG ...

Страница 322: ...ATVH STATVL DISKID PUTSEC i READ i WRITE STATC FOMAT NODAT GETDAT PUTDAT TITLE DISK DISKP SRC 3 9 79 4 00 00 P M DVSTAT 256 256 STATVH DVSTAT iSTATUS POINTER CONSTANT EGUATES 31 i SERIAL BUS DISK I D 50 iDISK PUT SECTOR DCB COMMAND 52 iDISK GET SECTOR DCB COMMAND 57 iDISK PUT SECTOR WITH READ CHECK DCB COMMAND 53 iDISK STATUS DCB COMMAND 21 iDISK FORMAT DCB COMMAND 0 iS10 COMMAND FOR IINO DATAII O...

Страница 323: ... EE11 C9 53 CKSTC CMP STATC i IS COMMAND A STATUS COMMAND 2811 EE13 DO OC BNE PUTCNT 2812 EE15 A9 EA LDA STATVL 2813 EE17 80 04 03 STA DBUFLO 2814 EE1A A9 02 LDA STATVH 2815 EE1C 8D 05 03 STA DBUFHI iSET BUFFER ADDR TO GLOBAL STATUS BUFFER 2816 EE1F AO 04 LDY 4 iYES SET BYTE COUNT TO 4 2817 EE21 8E 03 03 PUTCNT STX DSTATS iPUT STATUS COMMAND FOR SID IN DCB 2818 EE24 8C 08 03 STY DBYTLO 2819 EE27 A...

Страница 324: ... DEY 2847 EE60 88 DEY i YES 2848 EE61 8C 08 03 STY DBYTLO iPUT BAD SECTOR BYTE COUNT INTO DCB 2849 EE64 A9 00 LDA 0 2850 EE66 8D 09 03 STA DBYTHI 2851 EE69 AC 03 03 ENDDIF LDY DSTATS 2852 EE6C 60 RTS 2853 2854 2855 2856 2857 SUB R 0 UTI N E S 2858 2859 2860 PUT BUFFER ADDR FROM DCB INTO TEMP REG 2861 2862 EE6D AD 04 03 PUTADR LDA DBUFLO 2863 EE70 85 15 STA BUFADR 2864 EE72 AD 05 03 LDA DBUFHI 2865...

Страница 325: ...ODE 2898 0057 WRITEC 57 iDCB WRITE COMMAND 2899 0020 SPACE 20 i ASC I I SPACE CHAR 2900 004E N 4E i ASC I I tlN CHAR 2901 0044 D 44 i ASC I I DtI CHAR 2902 0053 S 53 i ASC I I SI1 CHAR 2903 2904 2905 PRINTER HANDLER ENTRY POINTS 2906 2907 2908 2909 2910 E430 2911 2912 E430 9E EE WORD PHOPEN l iPRINTER HANDLER OPEN 2913 E432 DB EE WORD PHCLOS 1 PH CLOSE 2914 E434 9D EE WORD BADST l iPH READ 2915 E4...

Страница 326: ... 7E EE LOY PHSTLO 1 iSET POINTER TO STATUS BUFFER 2958 EE8B A9 53 LDA STATC iSET COMMAND TO STATUS 2959 EE8D 80 02 03 STA DCOMND iSET STATUS COMMAND 2960 EE90 8D OA 03 STA DAUXl 2961 EE93 20 E6 EE JSR SETDCB iGO SETUP DCB 2962 EE96 20 59 E4 JSR SIOV iSEND STATUS COMMAND 2963 EE99 30 03 BMI BADST GO IF ERROR 2964 EE9B 20 14 EF JSR PHPUT i YES PUT STATUS INTO GLOBAL BUFFER 2965 EE9E 60 BADST RTS 296...

Страница 327: ...999 EEC9 DO Fe BNE FILLBF iBUFFER BLANK FILLED 3000 EECB A9 00 BUFFUL LDA 0 3001 EECD 85 10 STA PBPNT iCLEAR PRINT BUFFER POINTER 3002 EECF AE 7F EE LDX PHCHLO 3003 EED2 AC 80 EE LDY PHCHLO l iSET POINTER TO PRINT BUFFER 3004 EED5 20 E6 EE JSR SETDCB i GO SETUP DCB 3005 EED8 20 59 E4 JSR SIOV iSEND PRINT COMMAND 3006 EEDB 60 RTS i YES 3007 3008 3009 3010 3011 PRINTER HANDLER CLOSE ROUTINE 3012 301...

Страница 328: ...3066 i DETERMINE PRINT MODE SETUP PRINT BUFFER SIZE DCB PRINT 3067 i COMMAND DCB AUXl FOR PRINT MODE 3068 3069 EF1A AO 57 PRMODE LDY WRITEC iPUT WRITE COMMAND IN Y REG 3070 EF1C A5 2B LOA ICAX2Z iREAD PRINT MODE 3071 EF1E C9 4E CMOOE CMP N 3072 EF20 DO 04 BNE CDUBL iPRINT NORMAL 3073 EF22 A2 28 LOX NBUFSZ i YES SET NORMAL CHAR BUFFER SIZE 3074 EF24 DO OE BNE SETBSZ 3075 EF26 C9 44 CDUBL CMP D 3076...

Страница 329: ...ERR LINE ADDR 81 82 83 84 PRINTER PRINTP SRC 3 9 79 4 00 PAGE 68 3093 EF41 CRNTP5 3094 3095 14 3096 3097 0014 00 PRNSPR 8YTE CASORG CRNTP5 IAGPRINTP TOO LONG 3098 ...

Страница 330: ...RECORD MODE TONE 3114 0001 TONE2 1 iPRESS PLAY TONE 3115 3116 3117 3118 CASETV 3119 E440 48 EF 2A FO WORO OPENC 1 CLOSEC 1 GBYTE 1 PBYTE 1 STATU l SPECIAL 1 3120 E444 05 EF OF FO 3121 E448 27 FO 4A EF 3122 E44C 4C 41 EF JMP INIT 3123 E44F 00 BYTE 0 iROM FILLER BYTE 3124 3125 3126 3127 USED IN MONITP FOR CASSETTE BOOT 3128 3129 RBLOKV 3130 E47A 4C E9 EF JMP RBLOK 3131 3132 CSOPIV 3133 E470 4C 50 EF...

Страница 331: ... LDX 1 3171 ENDIF 3172 IF PALFLG l 3173 EF70 AO 40 LDY 40 i5 31 799 SEC READ LEADER 3174 EF72 A2 02 LDX 2 3175 ENDIF 3176 EF74 A9 03 LDA 3 3177 EF76 8D 2A 02 STA CDTMF3 3178 EF79 20 5C E4 JSR SETVBV iSET UP VELANK TIMER 3179 EF7C AD 2A 02 WAITTM LDA CDTMF3 3180 EF7F DO FB BNE WAITTM iWAIT FOR MOTOR TO COME UP TO SPEED 3181 EF81 A9 80 LDA 80 iNEXT EYTE NO BYTES IN BUFFER 3182 EF83 85 3D STA BPTR 31...

Страница 332: ... D3 STA PACTL 3208 EFB8 A9 03 LOA 3 3209 IF PALFLG 3210 LDX 3 3211 LDY CO 3212 ENDIF 3213 IF PALFLG 1 3214 EFBA A2 04 LDX 4 5 30 79 20 SEC LEADER 3215 EFBC AO 80 LDY 80 321b ENDIF 3217 EFBE 20 5C E4 JSR SETVBV 3218 EFCl A9 FF LDA FF 3219 EFC3 8D 2A 02 STA CDTMF3 3220 EFCb A5 11 WDLR LOA BRKKEY 3221 EFC8 FO C1 BEG PBRK IF BREAK DURING WRITE LEADER 3222 EFCA AD 2A 02 LOA CDTMF3 3223 EFCD DO F7 BNE W...

Страница 333: ... RTS 3241 EFE9 A9 52 RBLOK LOA fR iREAD OPCCDE 3242 EFEB 20 95 FO JSR SIOSB j SIO ON SVS BUF 3243 EFEE 98 TYA 3244 EFEF 30 F7 BMI GBX IF SIO ERRORS RETURN 3245 EFF1 A9 00 LOA 0 3246 EFF3 85 3D STA BPTR iRESET POINTER 3247 EFF5 A2 80 LOX 80 iDEFAULT BYTES 3248 EFF7 AD FF 03 LOA CASBUF 2 3249 EFFA C9 FE CMP EOT 3250 EFFC FO OD BEQ ATEOF i IF HEADER GO READ AGAIN 3251 EFFE C9 FA CMP DT1 i IF LAST DAT...

Страница 334: ... iSTORE CHAR AWAY 3265 F015 E6 3D INC BPTR iBUMP POINTER 3266 F017 AO 01 LDY SUCCES iOK STATUS 3267 F019 EO 7F CPX 127 i IF BUFFER FULL 3268 F01B FO 01 BEG 3 3269 FOlD 60 RTS 3270 WRITE OUT THE BUFFER 3271 F01E A9 FC LDA DTA iRECORD TYPE DATA 3272 F020 20 D2 FO JSR WSIOSB iDO WRITE ON SYSTEM BUFFER 3273 F023 A9 00 LDA 0 3274 F025 85 3D STA BPTR iRESET BUFFER POINTER 3275 F027 60 RTS i EXIT ...

Страница 335: ...ERR LINE ADDR B1 B2 B3 B4 CASSET HANDLER 3 12 DK1 CASCV PAGE 74 3276 PAGE 3277 3278 STATUS RETURN STATUS INFO THRU DVSTAT 3279 3280 F028 AO 01 STATU LDY SUCCES 3281 F02A 60 RTS ...

Страница 336: ...292 F037 60 RTS 3293 F038 A6 3D CLWRT LDX BPTR iBUFFER POINTER 3294 F03A FO OA BEG WTLR i IF NO DATA BYTES IN BUFFER NO DT1 REC 3295 F03C 8E 7F 04 STX CASBUF 130 iWRITE TO LAST RECORD 3296 F03F A9 FA LDA DTl iREC TYPE 3297 F041 20 D2 FO JSR WSIOSB iWRITE OUT USER BUFFER 3298 F044 30 EC BMI FCAX iGO IF ERROR 3299 F046 A2 7F WTLR LDX 127 iZERO BUFFER 3300 F048 A9 00 LDA 0 3301 F04A 9D 00 04 ZTBUF ST...

Страница 337: ...OL iTURN OFF SPEAKER 3331 F06F AO FO LDY FO 3332 F071 88 DEY 3333 F072 DO FD BNE 1 3334 F074 E4 14 CPX RTCLOK 2 iSEE IF 1 SEC IS UP YET 3335 F076 DO E8 BNE WFL 3336 F078 C6 40 DEC FREG iCOUNT BEEPS 3337 F07A FO OB BEG WFAK i IF ALL DONE GO WAIT FOR KEY 3338 F07C 8A TXA 3339 F07D 18 CLC 3340 IF PALFLG 3341 ADC 8 3342 ENDIF 3343 IF PALFLG 1 3344 F07E 69 OA ADC 10 3345 ENDIF 3346 F080 AA TAX 3347 F08...

Страница 338: ...o 3376 FOBB AD 02 03 LDA DCOMND iGET COMMAND BACK 3377 FOBE AO 40 LDY SRSTA iSla READ STATUS COMMAND 3378 FOCO C9 52 CMP R 3379 FOC2 FO 02 BEG 4 3380 FOC4 AO 80 LDY SWSTA iSla WRITE STATUS COMMAND 3381 FOCo 8C 03 03 STY DSTATS iSET STATUS FOR SIo 3382 FOC9 A5 3E LOA FTYPE 3383 FOC8 80 OB 03 STA DAUX2 i INDICATE IF SHORT IRG MODE 3384 FOCE 20 59 E4 JSR SIOV i GO CALL SIO 3385 FODl 60 RTS 3386 3387 ...

Страница 339: ...AND CODE i PUT CHARACTER CIO COMMAND CODE i INITIAL MEM LO LOW BYTE i INITIAL MEM LO HIGH BYTE iGOOD STATUS CODE i WRITE COMMAND i READ COMMAND i STATUS COMMAND iSCREEN EDITOR IOCB INDEX iCLEAR SCREEN CODE iKEYBOARD CODE FOR CONTROL C iCASSETTE END OF FILE CODE iLONG IRG TYPE CODE BUFFH BUFFL CASBUF 3 1256 256 BUFFH CASBUF 3 iBUFFER POINTER THE FOLLOWING EGUATES ARE IN THE CARTRIDGE ADDRESS SPACE ...

Страница 340: ...WRUP POWER UP VECTOR 3475 i 3476 3477 i 3478 3479 3480 3481 ENTRY POINT VECTOR 3482 3483 BLKBDV 3484 3485 E471 4C 23 F2 JMP SIGNON iBLACK BOARD VECTOR 3486 3487 WARMSV 3488 3489 E474 4C 1B F1 JMP RESET iWARM START VECTOR 3490 3491 COLDSV 3492 3493 E477 4C 25 Fl JMP PWRUP iCOLD START VECTOR 9000 FOR RAM VECTOR WRIT 3494 3495 9000 3496 9000 20 OC 90 JSR 900C 3497 9003 4C 25 F1 JMP PWRUP i TO HANDLE ...

Страница 341: ... MEMO PAD CR 3528 FOF6 52 49 20 43 3529 FOFA 4F 4D 50 55 3530 FOFE 54 45 52 20 3531 F102 20 20 40 45 3532 Fl06 4D 4F 20 50 3533 FI0A 41 44 9B 3534 3535 OOFO IDENTH IDENT 256 3536 00F2 IDENTL 256 IDENTH IDENT iSYSTEM I D MSG POINTER 3537 3538 OOOE TBLLEN IDENT TBLENT l iHANDLER TABLE LENGTH 3539 FlOD 42 4F 4F 54 DERR5 BYTE BOOT ERROR CR 3540 Flll 20 45 52 52 3541 Fll5 4F 52 9B 3542 3543 00F1 DERRH ...

Страница 342: ...O 28 BNE ZOSRAM i YES ONLY ZERO OS RAM 3586 3587 F138 A9 00 ZERORM LDA 0 3588 F13A AO 08 LDY WARMST 3589 F13C 85 04 STA RAMLO 3590 F13E 85 05 STA RAMLO 1 iINITIALIZE RAM POINTER 3591 F140 91 04 CLRRAM STA RAMLO Y iCLEAR MEMORY LOC 3592 F142 C8 INY 3593 F143 CO 00 CPY 0 i AT END OF PAGE 3594 F145 DO F9 BNE CLRRAM 3595 F147 E6 05 INC RAMLO 1 i YES INCR PAGE POINTER 3596 F149 A6 05 LDX RAMLO 1 3597 F...

Страница 343: ...EN 3641 Fl8C BD E3 FO NXTENT LDA TBLENT X iREAD HANDLER TABLE ENTRY 3642 Fl8F 9D 1A 03 STA HATABS X iPUT IN TABLE 3643 F192 CA DEX 3644 F193 10 F7 BPL NXTENT iDONE WITH ALL ENTRIES 3645 3646 3647 3648 3649 3650 INTERROGATE CARTRIDGE ADDR SPACE TO SEE WHICH CARTRIDGES THERE ARE 3651 3652 Fl95 A2 00 LDX 0 3653 Fl97 86 07 STX TSTDAT i CLEAR B CART FLAG 3654 Fl99 86 06 STX TRAMSZ i CLEAR A CART FLAG 3...

Страница 344: ...K BOOT AND INIT 3695 3696 CHECK TO SEE IF EITHER CARTRIDGE WANTS DISK BOOT 3697 F1E4 A5 06 LDA TRAMSZ iCHECK BOTH CARTRIDGES 3698 F1E6 05 07 ORA TSTDAT 3699 F1E8 FO 12 BEG NOCART iNEITHER CARTRIDGE LIVES 3700 FlEA A5 06 LDA TRAMSZ i CIA CART 3701 F1EC FO 03 BEG NOAl iNa 3702 FlEE AD FD BF LDA CARTFG iGET CARTRIDGE MODE FLAG 3703 F1Fl A6 07 NOA1 LDX TSTDAT i B CART 3704 F1F3 FO 03 BEG NOBl iNa 3705...

Страница 345: ...SVEC 3731 3732 i PRINT SIGN ON MESSAGE 3733 F223 A2 F2 SIGNON LDX IDENTL 3734 F225 AO FO LDY IDENTH 3735 F227 20 85 F3 JSR PUTLIN iGO PUT SIGN ON MSG ON SCREEN 3736 3737 3738 3739 BLACKBOARD ROUTINE 3740 F22A 20 30 F2 BLACKB JSR BLKB2 i JSR EGETCH 3741 F22D 4C 2A F2 JMP BLACKB i FOREVER 3742 F230 AD 05 E4 BLKB2 LOA EDITRV 5 i HIGH BYTE 3743 F233 48 PHA 3744 F234 AD 04 E4 LDA EDITRV 4 i LOW BYTE 37...

Страница 346: ...OM 3785 F24A DO 08 BNE ENSPEC iNO 3786 F24C AD FD BF LDA CARTFG i YES 3787 F24F 10 03 BPL ENSPEC iBIT SET 3788 F251 6C FE BF JMP CARTAD i YES GO RUN CARTRIDGE 3789 3790 i CHECK FOR AMOUNT OF RAM 3791 3792 3793 F254 CE FC BF ENSPEC DEC CART iRESTORE RAM IF NEEDED 3794 F257 AO 00 ENSPE2 LDY 0 3795 F259 84 05 STY RAMLO 1 3796 F25B A9 10 LDA 10 3797 F25D 85 06 STA TRAMSZ iSET RAM POINTER TO 4K 3798 F2...

Страница 347: ...96 A5 06 LDA TRAMSZ iREAO RAM SIZE IN TEMP REG 3837 F298 80 E4 02 STA RAMSIZ i SAVE IT IN RAM SIZE 3838 F29B 8D E6 02 STA MEMTOP l i INIT MEMTOP ADOR HI BYTE 3839 F29E A9 00 LDA 0 3840 F2AO 8D E5 02 STA MEMTOP i INIT MEMTOP ADDR LO BYTE 3841 F2A3 A9 00 LDA INIMLL 3842 F2A5 8D E7 02 STA MEMLO 3843 F2A8 A9 07 LOA INIMLH 3844 F2AA 80 E8 02 STA MEMLO 1 i INITIALIZE MEMLO ADDR VECTOR 3845 F2AD 20 OC E4...

Страница 348: ...ITP SRC 3 9 79 4 00 PAGE 87 DO BOOT OF DISK BOOT LDA BEG LDA AND BEG JSR NOINIT RTS NOWARM LDA STA LDA STA JSR BPL RTS DOBOOT LOA STA LOA STA LDA STA LDA STA SECT1 JSR BPL BADDSK JSR LDA BEG RTS ALLSEC LDX RDBYTE LOA STA DEX BPL LDA STA LDA STA LDA STA LDA STA MVBUFF LDY MVNXB LDA STA DEY BPL CLC LDA ADC STA LDA WARMST NOWARM BOOT Ii NOINIT DINI 11 DUNIT STATC DCOMND DSKINV DOBOOT 0 DAUX2 1 DAUXl ...

Страница 349: ...930 F366 20 7E F3 JSR DINI i GO INIT SOFTWARE 3931 F369 E6 09 INC BOOT iSHOW BOOT SUCCESS 3932 F36B 60 RTS 3933 F36C 18 BLOAD CLC 3934 F36D AD 42 02 LDA BOOTAD 3935 F370 69 06 ADC 6 3936 F372 85 04 STA RAMLO 3937 F374 AD 43 02 LDA BOOTAD 1 3938 F377 69 00 AOC 0 3939 F379 85 05 STA RAMLO l iPUT START ADDR OF BOOTLOADER INTO RAM 3940 F37B 6C 04 00 JMP RAMLO 3941 F37E 6C OC 00 DINI JMP OOSINI 3942 39...

Страница 350: ... BOOT SUCCESFULL 3993 F3BA FO 03 BEG NOCSB2 iNa 3994 F3BC 20 E1 F3 JSR CINI i YES INIT CASSETTE SOFTWARE 3995 F3BF 60 NOCSB2 RTS 3996 3997 F3CO A5 4A CSBOT2 LOA CKEY 3998 F3C2 FO lC BEG NOCSBT i IICII KEY FLAG SET 3999 F3C4 A9 80 LOA 80 i YES 4000 F3C6 85 3E STA FTYPE iSET LONG IRG TYPE 4001 F3C8 E6 4B INC CASSBT iSET CASSETTE BOOT FLAG 4002 F3CA 20 7D E4 JSR CSOPIV iOPEN CASSETTE FOR INPUT 4003 F...

Страница 351: ...ERR LINE ADDR B1 B2 B3 B4 4022 4023 0014 00 4024 MONITOR MONITP SRC 3 9 79 4 00 14 MONSPR BYTE KBDORG CRNTP7 i GMONITP TOO LONG PAGE 90 ...

Страница 352: ...79 4 00 PAGE 91 4025 PAGE 4026 TITLE DISPLAY HANDLER 10 30 78 DISPLC 4027 4028 HANDLER DEPENDENT EGUATES 4029 4030 007D CLRCOD 7D CLEAR SCREEN ATASCI CODE 4031 009F CNTL1 9F POKEY KEY CODE FOR 1 4032 4033 0068 FRMADR SAVADR 4034 0066 TOADR MLTTMP 4035 ...

Страница 353: ...4057 E412 33 F6 WORD RETUR1 1 i CLOSE 4058 E414 92 F5 WORD GETCH 1 4059 E416 B6 F5 WORD OUTCH 1 4060 E418 33 F6 WORD RETUR1 1 i STATUS 4061 E41A FB FC WORD DRAW 1 SPECIAL 4062 E41C 4C E4 F3 JMP PWRONA 4063 E41F 00 BYTE 0 iROM FILLER BYTE 4064 4065 KEYBDV 4066 4067 4068 KEYBOARD HANDLER ENTRY POINT 4069 4070 E420 33 F6 KBDHND WORD RETUR1 1 4071 E422 33 F6 WORD RETUR1 l i CLOSE 4072 E424 E1 F6 WORD ...

Страница 354: ...86 F3E4 A9 FF PWRONA LDA 4tSFF 4087 F3E6 8D FC 02 STA CH 4088 F3E9 AD E6 02 LDA MEMTOP l 4089 F3EC 29 FO AND SFO INSURE 4K PAGE BOUNDARY 4090 F3EE 85 6A STA RAMTOP 4091 F3FO A9 40 LDA 40 iDEFAULT TO UPPER CASE ALPHA AT PWRON 4092 F3F2 8D BE 02 STA SHFLOK 4093 F3F5 60 RTS iPOWER ON COMPLETED ...

Страница 355: ...X iTEXT INDEX MUST ALWAYS BE 0 4120 F425 85 64 STA ADRESS 4121 F427 85 7B STA SWPFLG 4122 F429 8D FO 02 STA CRSINH iTURN CURSOR ON AT OPEN 4123 F42C AO OE LDY 14 iCLEAR TAB STOPS 4124 F42E A9 01 LDA 1 i INIT TAB STOPS TO EVERY 8 CHARACTERS 4125 F430 99 A3 02 CLRTBS STA TABMAP Y 4126 F433 88 DEY 4127 F434 10 FA BPL CLRTBS 4128 F436 A2 04 LDX 4 iLOAD COLOR REGISTERS 4129 F438 BD C1 FE DOPEN8 LDA COL...

Страница 356: ... 59 STA SAVMSC l 4175 F496 AD OB D4 VBWAIT LDA VCOUNT iWAIT FOR NEXT VBLANK BEFORE MESSING 4176 F499 C9 7A CMP 7A iWITH THE DISPLAY LIST 4177 F49B DO F9 BNE VBWAIT 4178 F49D 20 IF F9 JSR DBDEC iSTART PUTTING DISPLAY LIST RIGHT UNDER RAM 4179 F4AO BD 75 FE LDA PAGETB X iTEST IF DISPLAY LIST WILL BE IN TROUBLE 4180 F4A3 FO 06 BEG NOMaD iOF CROSSING A 256 BYTE PAGE BOUNDARY 4181 F4A5 A9 FF LDA FF IF ...

Страница 357: ...02 A5 57 LDA DINDEX iDO THE MESSY 320X1 PROBLEM 4226 F504 C9 08 CMP 8 4227 F506 90 1C BCC DOPEN5 4228 F508 A2 5D LDX 93 iGET REMAINING NUMBER OF DLE S 4229 F50A A5 6A LDA RAMTOP RELOAD MEMORY SCAN COUNTER 4230 F50C 38 SEC 4231 F50D E9 10 SBC 10 4232 F50F 20 17 F9 JSR STORE 4233 F512 A9 00 LDA 0 4234 F514 20 17 F9 JSR STORE 4235 F517 A9 4F LDA 4F ANTIC RELOAD MSC CODE 4236 F519 20 17 F9 JSR STORE 4...

Страница 358: ... 4278 F579 29 20 AND 20 4279 F57B DO OB BNE DOPEN7 4280 F57D 20 B9 F7 JSR CLRSCR iCLEAR SCREEN 4281 F580 8D 90 02 STA TXTROW iAND HOME TEXT CURSOR AC IS ZERO 4282 F583 A5 52 LDA LMARGN 4283 F585 8D 91 02 STA TXTCOL 4284 F588 A9 22 OOPEN7 LOA 22 iEVERYTHING ELSE IS SET UP 4285 F58A 00 2F 02 ORA SDMCTL iSO TURN ON OMACTL 4286 F580 80 2F 02 STA SDMCTL 4287 F590 4C 21 F6 JMP RETUR2 4288 4289 4290 F593...

Страница 359: ...2 LOA ATACHR iCONVERT ATASCII ATACHR TO INTERNAL CHAR 4334 F5F1 A8 TAY i SAVE ATACHR 4335 F5F2 2A ROL A 4336 F5F3 2A ROL A 4337 F5F4 2A ROL A 4338 F5F5 2A ROL A 4339 F5F6 29 03 AND 3 4340 F5F8 AA TAX iX HAS INDEX INTO ATAINT 4341 F5F9 98 TYA iRESTORE ATACHR 4342 F5FA 29 9F AND 9F iSTRIP OFF COLUMN ADDRESS 4343 F5FC 1D F6 FE ORA ATAINT X iOR IN NEW COLUMN ADDRESS 4344 F5FF 80 FA 02 OUTCH2 STA CHAR ...

Страница 360: ... EaR 80 iTOGGLE MSB 4368 F631 20 FF F5 JSR OUTCH2 i DISPLAY IT 4369 F634 A4 4C RETUR1 LDY DSTAT iRETURN TO CIa WITH STATUS IN Y 4370 F636 A9 01 LDA SUCCES 4371 F638 85 4C STA DSTAT iSET STATUS SUCCESSFUL COMPLETION 4372 F63A AD FB 02 LDA ATACHR iPUT ATACHR IN AC FOR RETURN TO CIa 4373 F63D 60 NOFUNC RTS NON EXISTENT FUNCTION RETURN POINT 4374 4375 4376 4377 END OF DISPLAY HANDLER 4378 ...

Страница 361: ...H JSR JSR LOA BNE LDA STA LDA STA EGETC1 JSR STY LDA CMP BEG JSR JSR LDA CMP BNE JSR EGETC6 JMP EGETC2 JSR JSR LOA STA LDA STA EGETC3 LOA BEG EGETC7 DEC BEG LDA BMI JSR STA JMP EGETC5 JSR LDA STA JSR STY JMP JSRIND JMP EOUTCH STA JSR JSR DOSS JSR JSR SWAP ERANGE BtJFCNT EGETC3 ROWCRS BUFSTR COLCRS BUFSTR l iANYTHING IN THE BUFFER iYES iNO SO SAVE BUFFER START ADDRESS KGETCH iLET S FILL OUR BUFFER ...

Страница 362: ...D SCREEN EDITOR 4454 4455 4456 BEGIN KEYBOARD HANDLER 4457 4458 4459 4460 4461 F6DD A9 FF KGETC2 LDA FF 4462 F6DF 80 FC 02 STA CH 4463 F6E2 A5 2A KGETCH LOA ICAX1Z iTEST LSB OF AUX1 FOR SPECIAL EDITOR READ MO 4464 F6E4 4A LSR A 4465 F6E5 BO 62 Bes GETOUT 4466 F6E7 A9 80 LDA BRKABT 4467 F6E9 A6 11 LOX BRKKEY i TEST BREAK 4468 F6EB FO 58 BEG K7 i IF BREAK PUT BRKABT IN DSTAT AND CR IN ATA 4469 F6ED ...

Страница 363: ...RR 4508 F745 85 4C K7 STA DSTAT 4509 F747 85 11 STA BRKKEY iRESTORE BREAK 4510 F749 A9 9B GETOUT LDA CR iPUT CR IN ATACHR 4511 F74B DO 26 BNE K8 i UNCONDITIONAL 4512 F74D A5 7C K6 LDA HOLDCH iPROCESS SHIFT LOCKS 4513 F74F C9 40 CMP 40 iREGULAR SHIFT AND CONTROL TAKE PRECEDENCE 4514 F751 BO 15 BCS K5 i OVER LOCK 4515 F753 AD FB 02 LDA ATACHR iTEST FOR ALPHA 4516 F756 C9 61 CMP 61 i LOWER CASE A 451...

Страница 364: ...OMRE1 4557 F7A3 A5 53 CRSRL1 LDA RMARGN 4558 F7A5 85 55 LFRTCM STA COLCRS 4559 F7A7 4C DD FB COMRE1 JMP DOLCOL iCOLVERT ROW AND COL TO LOGCOL AND RETURN 4560 F7AA E6 55 CRSRRT INC COLCRS 4561 F7AC A5 55 LDA COLCRS 4562 F7AE C5 53 CMP RMARGN 4563 F7BO 90 F5 BCC COMRE1 4564 F7B2 FO F3 BEG COMRE1 i CAUSE BLE 4565 F7B4 A5 52 LDA LMARGN 4566 F7B6 4C A5 F7 JMP LFRTCM iUNCONDITIONAL TO COMMON STORE 4567 ...

Страница 365: ...NO 4613 F819 20 34 FA JSR DOCR iDO CARRIAGE RETURN 4614 F81C 20 20 FB JSR LOGGET iCHECK IF END OF LOGICAL LINE 4615 F81F 90 02 BCC TAB1 i NO CONTINUE 4616 F821 BO 07 BCS TAB2 i UNCONDITIONAL 4617 F823 A5 63 TAB1 LDA LOGCOL iCHECK FOR TAB STOP 4618 F825 20 25 FB JSR BITGET 4619 F828 90 E6 BCC TAB i NO SO KEEP LOOKING 4620 F82A 4C DD FB TAB2 JMP DOLCOL iCOLVERT ROW AND COL TO LOGCOL AND RETURN 4621 ...

Страница 366: ... 4663 F886 A5 54 LDA ROWCRS i IS ROW OFF SCREEN 4664 F888 CD BF 02 CMP SOTSCR 4665 F88B BO 09 BCS DELCH2 i YES SO GUIT 4666 F88D 20 A2 F5 JSR GETPLT iGET DATA UNDER CURSOR 4667 F890 AO 00 LDY 0 4668 F892 91 68 STA SAVADR Y iPUT IT IN PREVIOUS POSITION 4669 F894 FO DA BEG DELCH1 iAND LOOP UNCONDITIONAL 4670 F896 AO 00 DELCH2 LDY 0 4671 F898 98 TYA 4672 F899 91 68 STA SAVADR I Y iCLEAR THE LAST POSI...

Страница 367: ...TYA 4708 F8E4 18 CLC 4709 F8E5 69 78 ADC 120 4710 F8E7 28 PLP 4711 F8E8 20 04 FB JSR BITPUT iWRITE IT OVER PRESENT BIT 4712 F8EB C8 INY 4713 F8EC CO 18 CPY 24 4714 F8EE DO ED BNE DELLI 1 i LOOP 4715 F8FO AD B4 02 LDA LOGMAP 2 i SET LSB 4716 F8F3 09 01 ORA 1 4717 F8F5 8D B4 02 STA LOGMAP 2 4718 F8F8 A5 52 DELLI2 LDA LMARGN iDELETE LINE OF DATA USING PART OF SCROLL 4719 F8FA 85 55 STA COLCRS iCR NO ...

Страница 368: ... STROK 4755 F928 A5 64 LDA ADRESS 4756 F92A 38 SEC 4757 F92B ED 9E 02 SBC SUBTMP 4758 F92E 85 64 STA ADRESS 4759 F930 BO 02 BCS DBSUB1 4760 F932 C6 65 DEC ADRESS 1 4761 F934 A5 OF DBSUB1 LDA APPMHI l iMAKE SURE NOTHING EVER OVERWRITES APPMHI 4762 F936 C5 65 CMP ADRESS 1 4763 F938 90 oe Bee STROK i OK 4764 F93A DO 06 BNE STRERR i ERROR 4765 F93C A5 OE LOA APPMHI 4766 F93E C5 64 CMP ADRESS 4767 F940...

Страница 369: ...2 LDY DIV2TB X iNOW DIVIDE HCRSR TO ACCOUNT FOR PARTIAL BYT 4811 F98B A5 55 LDA COLCRS 4812 F98D A2 07 LDX 7 i TRICKY 4813 F98F 88 CONVR3 DEY 4814 F990 30 OA BMI CONVR4 4815 F992 CA DEX 4816 F993 46 56 LSR COLCRS l 4817 F995 6A ROR A 4818 F996 6E Ai 02 ROR TMPLBT iSAVE LOW BITS FOR MASK 4819 F999 4C 8F F9 JMP CONVR3 4820 F99C C8 CONVR4 INY iSO Y IS ZERO UPON RETURN FROM THIS ROUTINE 4821 F99D 18 C...

Страница 370: ...RS 1 PLA STA COLCRS PLA STA ROWCRS RTS INCREMENT CURSOR AND DETECT BOTH END OF LINE AND END OF SCREEN INCRSB LDA BEG INCRSR LDA INCRSC STA INCRSA INC INC BNE INC INCRS2 LDA LDX CMP BEG CPX BNE CMP BEG BCS INCRS3 RTS INC2A CPX BCC LDA BEG DOCR1 LDA BNE LDA CMP BCC LDA BEQ JSR JMP DOCR1B JSR LDA CLC ADC JSR BCC LDA 0 INCRSC 9B INSDAT LOGCOL COLCRS INCRS2 COLCRS l COLCRS DINDEX COLUMN X INC2A 0 INCRS...

Страница 371: ...26 BNE INCRS1 4915 FA51 8C 90 02 STY HOLD3 4916 FA54 8A TXA iDON T SCROLL IF MODE 0 4917 FA55 DO 20 BNE INCRSl 4918 FA57 A5 70 LOA INSDAT iOR IF INSDAT 0 4919 FA59 FO 1C BEG INCRSl 4920 LDA INSDAT IF INSDAT 9B THEN ROLL IN A 0 4921 FA5B C9 98 CMP 98 iTO EXTEND BOTTOM LOGICAL LINE 4922 FA5D 38 SEC 4923 FA5E FO 01 BEG DOCR4B 4924 FA60 18 CLC 4925 FA61 20 AC FB DOCR4B JSR SCROLL iLOOP BACK TO HERE IF...

Страница 372: ...GE3 LDX LDA CMP BCC BEG CPX BNE LDA BEG CMP BNE BEG RANGEl LDA BNE RANGE2 LDA CMP BCC BEG RNGOK LDA STA LDA LDX STA BEG RTS RNGERR JSR LDA RNGER2 STA RNGER1 PLA PLA LDA BPL JSR RETUR3 JMP BOTSCR 4 RANGE DINDEX RANGE EOPEN 39 RMARGN RANGE3 RMARGN DINDEX NOROWS X ROWCRS RNGERR RNGERR 8 RANGEl COLCRS 1 RNGOK 1 RNGERR RANGE2 COLCRS 1 RNGERR COLUMN X COLCRS RNGERR RNGERR SUCCES DSTAT BRKABT BRKKEY BRKK...

Страница 373: ...BD B9 FE LOA MASKTB X 5023 FAF2 85 6E STA BITMSK 5024 FAF4 68 PLA iPROCESS INDEX 5025 FAF5 4A LSR A 5026 FAF6 4A LSR A 5027 FAF7 4A LSR A 5028 FAF8 AA TAX 5029 FAF9 60 RTS 5030 5031 5032 FAFA 2E B4 02 BITROL ROL LOGMAP 2 5033 FAFD 2E B3 02 ROL LOGMAP 1 5034 FBOO 2E B2 02 ROL LOGMAP 5035 FB03 60 RTS 5036 5037 5038 FB04 90 OC BITPUT BCC BITCLR i AND RETURN 5039 i OTHERWISE FALL THROUGH TO BITSET AND...

Страница 374: ...29 9F AND 9F 5081 FB47 10 FA FE ORA INTATA X 5082 FB4A 8D FB 02 INATAl STA ATACHR 5083 FB40 60 RTS 5084 5085 5086 5087 MOVLIN MOVE 40 BYTES AT FRMADR TO TOADR SAVING OLD TOADR 5088 DATA IN THE LINBUF THEN HAKE NEXT FRHADR 5089 BE AT LINBUF FOR NEXT TRANSFER TOAOR TOADR 40 5090 5091 FB4E A9 02 HOVLIN LOA LINBUF 256 iSET UP ADRESS LINBUF 247 5092 FB50 85 65 STA ADRESS 1 5093 FB52 A9 47 LDA LINBUF AN...

Страница 375: ... EXTEN3 DEY 5131 FB8C 30 04 BMI EXTEN4 5132 FB8E C4 54 CPY ROWCRS 5133 FB90 BO EC BCS EXTEN1 5134 FB92 A5 54 EXTEN4 LDA ROWCRS 5135 FB94 18 CLC 5136 FB95 69 78 ADC 120 5137 FB97 28 PLP 5138 FB98 4C 04 FB JMP BITPUT iSTORE NEW LINE S BIT AND RETURN 5139 5140 5141 5142 i CLRLIN CLEAR LINE CURSOR IS ON 5143 5144 FB9B AS 52 CLRLIN LDA LMARGN 5145 FB9D 85 55 STA COLCRS 5146 FB9F 20 47 F9 JSR CONVRT 514...

Страница 376: ...OM BITMAP AND COLCRS 5186 5187 FBDD A9 00 DOLCOL LOA 0 START WITH ZERO 5188 FBDF 85 63 STA LOGCOL 5189 FBEl A5 54 LOA ROWCRS 5190 FBE3 85 51 STA HOL01 5191 FBE5 A5 51 OOLCOl LOA HOLOl iAOO IN ROW COMPONENT 5192 FBE7 20 22 FB JSR L01GET 5193 FBEA BO OC BCS DOLC02 iFOUND BEGINNING OF LINE 5194 FBEC A5 63 LDA LOGCOL iADD 40 AND LOOK BACK ONE 5195 FI3EE 18 CLC 5196 FBEF 69 28 ADC 40 5197 FBFl 85 63 ST...

Страница 377: ... DISPLAY HANDLER 10 30 78 DISPLC PAGE 116 STA LDA STA DOBUF1 LOX LDA 8PL LOX DOB1 CPX BNE LOA CMP BNE INC JMP DOBU1A JSR INC LDA CMP BNE DEC JSR DOBUF2 JSR BNE DEC LDA CMP BEQ JSR LDA CMP BNE DEC OOBUF3 LDA BNE DOBUF4 PLA STA JSR RTS COlCRS 1 BUFCNT 23 SWPFlG DOB1 3 ROWCRS DOBU1A COlCRS RMARGN DOBU1A 8UFCNT D08UF2 INCRSB BUFCNT LOGCOL LMARGN DOBUFl ROWCRS CRSRlF GETPlT DOBUF4 BUFCNT LOGCOL LMARGN ...

Страница 378: ...LTI3 iFOUND A NON O SO QUIT AND RETURN 5289 FC86 88 DEY 5290 FC87 10 F9 BPL DELTI1 5291 FC89 4C DB F8 DELTI2 JMP DELLIB iDELETE A LINE AND RETURN 5292 FC8C 60 DELTI3 RTS 5293 5294 5295 5296 TSTCTL SEARCH CNTRLS TABLE TO SEE IF ATACHR IS A CNTL CHAR 5297 5298 FC8D A2 2D TSTCTL LDX 45 iPREPARE TO SEARCH TABLE 5299 FC8F BD C6 FE TSTCT1 LOA CNTRLS X 5300 FC92 CD FB 02 CMP ATACHR 5301 FC95 FO 05 BEQ TS...

Страница 379: ... CA DEX 5346 FCCF 10 F1 BPl SWAP 1 5347 FCDl AS 7B LOA SWPFLG 5348 FCD3 49 FF EOR FF 5349 FCD5 85 7B STA SWPFLG 5350 FCD7 60 SWAP3 RTS 5351 5352 5353 i CLICK MAKE CLICK THROUGH KEYBOARD SPEAKER 5354 5355 FCD8 A2 7F CLICK LOX 7F 5356 FCDA 8E IF DO CLICK1 STX CONSOl 5357 FCDD 8E OA D4 STX WSYNC 5358 FCEO CA DEX 5359 FCEl 10 F7 BPL CLICKl 5360 FCE3 60 RTS 5361 5362 5363 COLCR PUTS EITHER 0 OR LMARGN ...

Страница 380: ...ERR LINE ADDR B1 B2 B3 B4 5379 5380 5381 5382 FCF7 FCF9 FCFB A5 59 85 65 60 DISPLAY HANDLER 10 30 78 LDA STA RTS SAVMSC l ADRESS l DISPLC PAGE 119 ...

Страница 381: ...D21 38 SEC 5408 FD22 A5 60 LDA NEWROW iDETERMINE DELTA ROW 5409 FD24 E5 5A SBC OLDRQW 5410 FD26 85 76 STA DELTAR 5411 FD28 BO OD BCS DRAWl iDO DIRECTION AND ABSOLUTE VALUE 5412 FD2A A9 FF LDA FF iBORROW WAS ATTEMPTED 5413 FD2C 85 79 STA ROWINC iSET DIRECTION DOWN 5414 FD2E A5 76 LDA DELTAR 5415 FD30 49 FF EOR FF iDELTAR IDELTARI 5416 FD32 18 CLC 5417 FD33 69 01 ADC 1 5418 FD35 85 76 STA DELTAR 541...

Страница 382: ... TYA iPUT IN INITIAL CONDITIONS 5463 FD84 85 7E STA COUNTR 5464 FD86 85 74 STA ENDPT 5465 FD88 48 PHA i SAVE AC 5466 FD89 A5 75 LDA ENDPT l PUT LSB OF HIGH BYTE 5467 FD8B 4A LSR A INTO CARRY 5468 FD8C 68 PLA RESTORE AC 5469 FD9D 6A RDR A iROR TH 9 BIT ACUMULATOR 5470 FD8E 95 70 STA ROWAC X 5471 FD90 AS 7E DRAW4A LDA COUNTR i TEST ZERO 5472 FD92 05 7F ORA COUNTR l 5473 FD94 DO 03 BNE DRAW11 i IF CO...

Страница 383: ...E9 10 06 BPL DRAW7 i UNCONDITIONAL 5517 FDEB E6 55 DRAW6B INC COLCRS iDO DOUBLE BYTE INCREMENT 5518 FDED DO 02 BNE DRAW7 5519 FDEF E6 56 INC COLCRS 1 5520 FDF1 A2 02 DRAW7 LOX 2 iAND SUBTRACT ENDPT FROM COLAC 5521 FDF3 20 7A FA JSR SUBEND 5522 FDF6 20 96 FA DRAW8 JSR RANGE 5523 FDF9 20 EO F5 JSR OUTPLT i PLOT POINT 5524 FDFC AD B7 02 LOA FILFLG i TEST RIGHT FILL 5525 FDFF FO 2F BEG DRAW9 5526 FEOl...

Страница 384: ... PAGE 123 5545 FE31 A5 7E LDA COUNTR 5546 FE33 E9 01 S8C 1 5547 FE35 85 7E STA COUNTR 5548 FE37 AS 7F LDA COUNTR 1 5549 FE39 E9 00 S8C 0 5550 FE3B 85 7F STA COUNTR 1 5551 FE3D 30 03 8MI DRAW10 5552 FE3F 4C 90 FD JMP DRAW4A 5553 FE42 4C 34 F6 DRAWI0 JMP RETURl ...

Страница 385: ... ALLOCATION ALOCAT BYTE 24 16 10 10 16 28 52 100 196 196 196 196 NUMBER OF DISPLAY LIST ENTRIES NUMDLE BYTE 23 23 11 23 47 47 95 95 97 97 97 97 MXDMDE BYTE 19 19 9 19 39 39 79 79 65 65 65 65 i EXT OF NUMDLE ANTIC CODE FROM INTERNAL MODE CONVERSION TABLE INTERNAL o 1 2 3 4 5 6 7 8 9 10 11 ANTIC CODE 2 6 7 8 9 A B D F SAME AS 8 BUT SAME AS 8 BUT SAME AS 8 BUT DESCRIPTION 40X2X8 CHARACTERS 20X5X8 20X...

Страница 386: ... 5628 5629 5630 5631 i DIV2TB HOW MANY RIGHT SHIFTS FOR HCRSR FOR PARTIAL BYTE MODES 5632 5633 FEA5 00 00 00 02 DIV2TB BYTE 0 0 0 2 3 2 3 2 3 1 1 1 5634 FEA9 03 02 03 02 5635 FEAD 03 01 01 01 5636 5637 5638 i DMASKT DISPLAY MASK TABLE 5639 5640 FEBl 00 FF FO OF DMASKT BYTE OO FF FO OF 5641 FEB5 CO 30 OC 03 BYTE CO 30 OC 03 5642 5643 MASKTB BIT MASK ALSO PART OF DMASKTB DO NOT SEPARATE 5644 5645 FE...

Страница 387: ... FEE7 9E BYTE 9E 5683 FEE8 32 F8 WORD CLRTAB 5684 FEEA 9F BYTE 9F 5685 FEEB 20 F8 WORD SETTAB 5686 FEED FD BYTE FD 5687 FEEE OA F9 WORD BELL 5688 FEFO FE BYTE FE 5689 FEFl 60 F8 WORD DELCHR 5690 FEF3 FF BYTE FF 5691 FEF4 37 F8 WORD INSCHR 5692 5693 5694 5695 5696 5697 i ATAINT ATASCI TO INTERNAL TABLE 5698 5699 FEF6 40 00 20 60 ATAINT BYTE 40 00 20 60 5700 5701 5702 i INTATA INTERNAL TO ATASCI TAB...

Страница 388: ...5A lB 25 22 21 5739 FF5E 5740 FF5E 5B 20 50 4E BYTE 5B 20 50 4E 80 40 3F 81 5741 FF62 80 40 3F 81 5742 FF66 52 80 45 59 BYTE 52 80 45 59 9F 54 57 51 5743 FF6A 9F 54 57 51 5744 FF6E 5745 FF6E 28 80 29 27 BYTE 28 80 29 27 9C 40 7D 9D 5746 FF72 9C 40 7D 90 5747 FF76 46 48 44 80 BYTE 46 48 44 80 83 47 53 41 5748 FF7A 83 47 53 41 5749 FF7E 5750 FF7E 5751 Ff7E OC OA 7B 80 BYTE OC OA 7B 80 80 OB lE lF iC...

Страница 389: ...GI 5783 FFD2 AD FF 02 LOA SSFLAG 5784 FFD5 49 FF EOR FF 5785 FF07 80 FF 02 STA SSFLAG 5786 FFDA BO OF BCS PIRG4 i UNCONDITIONAL MAKE Al INVISIBLE 5787 FFDC 80 FC 02 PIRG1 STA CH 5788 FFDF 80 F2 02 STA CHl 5789 FFE2 A9 03 LDA 3 5790 FFE4 80 F1 02 STA KEYDEL i INITIALIZE KEY DELAY FOR DEBOUNCE 5791 FFE7 A9 00 LOA 0 CLEAR COLOR SHIFT BYTE 5792 FFE9 85 40 STA ATRACT 5793 FFEB A9 30 PIRG4 LDA 30 5794 F...

Страница 390: ...4139 5593 ANTIC D400 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 APPEND 0001 111 APPMHI OOOE 179 4761 4765 ASCCOl F705 4478 4480 ASCZER 0030 764 1193 ATACHR 02FB 469 4308 4311 4316 4333 4372 4394 4417 4421 4428 4481 4515 4526 4528 4606 5082 5300 5527 5538 5542 ATAINT FEF6 4343 5699 ATAN BE43 602 ATASCI FEFE 4480 5709 ATEOF FOOB 3250 3256 ATRACT 0040 248 1340 1395 1401 1403 5792...

Страница 391: ...34 3937 BOOT 0009 176 3864 3931 3991 4007 BOTSCR 02BF 429 4193 4201 4542 4548 4664 4953 5335 BPTR 003D 234 3182 3225 3234 3238 3246 3263 3265 3274 3293 BRKABT 0080 136 2637 3188 4466 4983 BRKKEY 0011 184 1337 1957 2064 2558 2580 2643 3189 3220 3831 4467 4509 4984 4985 BRKKY 0236 345 1292 3833 3835 BRKKY2 E754 1336 3832 3834 BROKE EDAO 1959 2066 2560 2581 2632 BS F7E6 4591 5673 BSl F80D 4593 4608 B...

Страница 392: ... 2602 2608 3144 CBAUOL 02EE 456 2601 2606 3142 CBINI F23C 3661 3751 CBUFH 0003 3101 3102 3366 CBUFHI 0002 1669 1670 1772 CBUFL OOFD 3102 3368 CBUFLO 003A 1670 1768 CCOMND 023B 350 1760 CDEVIC 023A 349 1669 1670 1757 CDTMA1 0226 330 1528 2653 2655 CDTMA2 0228 331 1529 CDTMF3 022A 332 1455 3177 3179 3219 3222 CDTMF4 022C 334 CDTMF5 022E 336 CDTMV1 0218 323 1451 1452 1535 1537 1539 1540 1542 1564 156...

Страница 393: ...27 870 940 1009 1065 CIRTN2 E61D 893 909 930 952 999 1060 1069 CISTl E559 916 923 CISTSP E54E 855 914 CIWRIT E5C9 858 1003 CIX 00F2 616 CKEY 004A 244 3856 3997 4006 CKSTC EE11 2808 2810 CLICK FCD8 4475 4727 5355 CLICKl FCDA 5356 5359 CLOSE OOOC 93 CLOSEC F02B 3119 3286 CLRCHP F27A 3820 3825 CLRCOD 0070 4030 I 4312 CLRLI1 FBA6 5149 5151 CLRLIN FB9B 4697 5144 CLRRAM F140 3591 3594 3598 CLRSC2 F7BF 4...

Страница 394: ...LPMl 0013 701 COLPM2 D014 702 COLPM3 0015 703 COLRSH 004F 250 1407 1435 COLRTB FECl 4129 5651 COLUMN FE80 4865 4977 5616 COMl E647 1095 1102 COM2 E662 1099 1116 COMENT E630 879 888 900 923 943 1012 1093 COMFRM E978 1748 1789 COMMNO E974 1743 1856 COMPLT 0043 1634 1904 COMPUT ECA3 2468 2600 COMREl F7A7 4556 4559 4563 4564 COMRET F789 4541 4545 4549 COMTAB E6C9 850 1107 1209 CONSOL 001F 713 1432 332...

Страница 395: ...002 CSTAT 0288 396 CTIA 0000 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 CTIMHI 0000 1675 2446 CTIMLO 0002 1674 2445 CTRLC 0092 3417 0 0044 2901 3075 OAUX1 030A 494 1762 2960 3084 3880 3918 OAUX2 030B 495 1764 2210 2237 2259 3383 38...

Страница 396: ... 5456 5496 5499 DELTAR 0076 281 5410 5414 5418 5457 5459 5477 DELTll FC82 5287 5290 DELTI2 FC89 5291 DELTI3 FC8C 5281 5288 5292 DELTIA FC68 4673 5274 DELTIB FC70 5276 5278 DELTIM FC73 4597 5279 DERR E9F6 1821 1842 DERRl EA06 1791 1830 1853 DERR5 Fl0D 3539 3543 3544 DERRH OOFl 3543 3544 3949 DERRL OOOD 3544 3948 DERROR 0090 153 1910 DEVSl E6A6 1175 1180 DEVS2 E6B5 1176 1188 DEVS3 E6C5 1195 1197 DEV...

Страница 397: ...4B FA61 4923 4925 4931 DOCRWS FA30 4319 4419 4884 4899 5677 DOINTP ECE5 2509 2512 DOLCOl FBE5 5191 5199 DOLC02 FBF8 5193 5200 DOLCOL FBDD 4559 4608 4620 4648 4675 4698 4699 4725 4896 4934 5182 5187 5261 5278 DOPEN F3F6 4056 4099 DOPENl F460 4147 4150 DOPEN2 F4D5 4203 4206 DOPEN3 F4FA 4221 4224 DOPEN4 F51C 4237 4240 DOPEN5 F524 4227 4241 DOPEN7 F588 4279 4284 DOPEN8 F438 4129 4132 DOPEN9 F577 4271 ...

Страница 398: ...G 02F E 472 4437 DSTAT 004C 246 4113 4142 4270 4369 4371 4393 4414 4423 4508 4745 4753 4769 4982 4990 DSTATS 0303 487 1794 1826 1865 2197 2817 2851 3045 3381 DTl OOFA 3110 3251 3296 DTA OOFC 3109 3271 DTIMLO 0306 490 2396 2803 305 1 3375 DUNIT 0301 485 1755 3039 3373 3870 3981 DUNUSE 0307 491 DVSTAT 02EA 455 2736 2737 2939 3059 EDITOR E400 4043 EDITRV E400 55 3515 3742 3744 3845 4039 EEXP OOED 611...

Страница 399: ... F779 4537 5661 ESCFLG 02A2 418 4434 4438 4440 4538 ESIGN OOEF 613 ESTSCM F173 3607 3622 EXP DDCO 595 EXP10 DDCC 596 EXTENl FB7E 5122 5133 EXTEN3 FB8B 5130 EXTEN4 FB92 5131 5134 EXTEND FB7B 4677 5120 FADD OA66 581 FASC 08E6 576 FCAX F032 3290 3298 3306 FCHRFL OOFO 614 FDIV 0828 583 FEOF 003F 236 3162 3232 3256 FILOAT 02FO 471 5537 FILFLG 02B7 422 5397 5524 FILLBF EEC3 2996 2999 FILLIN 0012 99 FINO...

Страница 400: ...40 2751 2804 GETOUT F749 4465 4510 GETPLT F5A2 4291 4295 4361 4626 4639 4666 5238 5535 GETREC 0005 89 GETSEC F39D 3885 3919 3927 3975 GLBABS 02EO 447 GOBACK EB09 2072 GOERR EF3D 3080 3086 GOHAND E689 883 902 924 950 955 984 1027 1056 1151 GOOD EA65 1903 1905 1923 1927 GOODST EE32 2822 2824 GOON EB64 2151 2159 GOREAD ED6F 2597 2606 GPRIOR 026F 369 1429 4151 4170 GRACTL DOID 711 GRAFM DOll 699 GRAFP...

Страница 401: ...1133 1172 1192 ICBLH 0349 527 1143 ICBLHZ 0029 212 1145 ICBLL 0348 526 1140 3966 ICBLLZ 0028 211 947 948 1016 1017 1020 1121 1122 1125 1126 1141 1142 1144 ICCOM 0342 520 3676 3964 ICCOMT 0017 189 849 887 1106 ICCOMZ 0022 205 840 934 961 979 1003 1032 1050 5389 ICDNO 0341 519 ICDNOZ 0021 204 1197 ICHID 0340 518 788 928 ICHIDZ 0020 203 864 904 914 929 1093 1189 ICIDNO 002E 216 816 927 1069 1084 1138...

Страница 402: ...5691 INSCLR 0020 117 INSOAT 0070 287 4627 4637 4640 4858 4882 4892 4900 4918 INSLI1 F8C6 4693 4696 INSLI2 F8CE 4692 4697 INSLIA F8A5 4677 4895 INSLIN F8A4 4676 5681 INTABS 0200 310 1232 1292 1293 1294 1295 1296 1297 1298 1299 1329 1331 1694 3631 4081 INTATA FEFA 5081 5704 INTEMP 0220 335 1557 1563 INTINV E46B 75 1229 3852 INTORG E605 26 1215 1268 INTSPR 0014 1584 INTTBL EC84 2419 INTZBS 0010 182 3...

Страница 403: ...PR 0014 5804 KEYBDV E420 57 3353 3355 3519 3847 4065 KEYDEL 02F1 460 1463 1465 5778 5790 KGETC1 F71E 4485 4490 KGETC2 F6DD 4461 4483 4489 4494 4499 4504 KGETC3 F6FE 4476 4523 KGETCH F6E2 4072 4392 4463 4471 LBFEND 05FF 638 LBPRl 057E 630 LBPR2 057F 631 LBUFF 0580 632 633 LDPNTR EB6A 1805 1838 2175 2223 2250 LEDGE 0002 252 3622 LENGTH 022F 1212 LFRTCM F7A5 4558 4566 LINBUF 0247 367 5091 5093 LINZBS...

Страница 404: ...796 4799 4800 4802 4807 4808 4822 4823 4825 4832 4837 MODATA E9FO 1827 1838 MODEM 004D 125 MONORG FOE3 31 3398 3503 MONSPR 0014 4023 MOTRGO 0034 1664 2217 2244 3166 3206 MOTRST 003C 1665 1706 2262 2633 3290 MOVLI1 FB58 5096 5103 MOVLI2 FB7A 5112 5114 MOVLIN FB4E 4693 5091 MOVVEC F17D 3630 3633 MYBUFF F32D 3904 3920 MVNXB F32F 3905 3908 MXDMDE FE5D 4216 5572 MXDMOD 0010 116 N 004E 2900 3071 3086 NA...

Страница 405: ...NOTDON EA81 1957 1962 NOTE 0026 106 NOTEND EABE 1986 2008 NOTERR EAOO 1843 1849 NOTMXD F4F5 4196 4199 4219 NOTOPN 0085 141 805 1098 NOTYET EB3C 2112 2131 NOWARM F2DD 3863 3869 NOWRPO EA98 1979 1982 NSIGN OOEE 612 NTBRKO EA88 1958 1961 NTBRK1 EBOO 2065 2068 NTBRK2 ED17 2559 2562 NTFRAM EB1D 2100 2105 NTOVRN EB25 2106 2111 NTWRP1 EB50 2141 2144 NtJMDLE FE51 4216 4220 5569 NVALID 0084 140 839 5394 NW...

Страница 406: ...607 5523 5539 OVRRUN 008E 150 2108 POPF 0004 718 POPL DOOC 726 P1PF 0005 719 P1PL DOOD 727 P2PF 0006 720 P2PL DOOE 728 P3PF 0007 721 P3PL DOOF 729 PACTL D302 754 1272 1278 1345 1707 2218 2245 2263 2634 3167 3207 3291 PADDLO 0270 371 1500 PADDL1 0271 372 PADDL2 0272 373 PADDL3 0273 374 PADDL4 0274 375 1502 PADDL5 0275 376 PADDL6 0276 377 PADDL7 0277 378 PAGETB FE75 4179 5601 PALFLG 0000 17 1647 165...

Страница 407: ...PLACRl FCAA 5323 5326 PLACRS FCA8 4643 4674 5253 5322 5543 PLOT 0050 1627 PLUS ECF8 2518 2520 PLYARG 05EO 633 634 PLYEVL 0040 591 PMBASE 0407 742 PNMI E791 1372 1579 1580 PNMIl E799 1373 1375 PNMIH 00E7 1256 1579 1580 PNMIL 0091 1258 1580 POINT 0025 105 POKEY 0200 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 POKMSK 0010 183...

Страница 408: ...0080 2752 2809 PUTDTO EEOl 2801 2803 PUTLIN F385 3735 3958 PUTMSC FCF3 4567 4782 5377 PUTREC 0009 91 PUTSEC 0050 2745 PUTTXT 0009 3406 3963 PWRONA F3E4 4049 4062 4076 4086 PWRUP F125 3493 3497 3566 3576 3686 PWRUPl F128 3568 3578 RADFLG OOFB 622 RADON 0000 623 RAMLO 0004 170 3589 3590 3591 3595 3596 3795 3798 3800 3801 3804 3897 3899 3906 3910 3912 3913 3915 3936 3939 3940 RAMSIZ 02E4 451 3655 366...

Страница 409: ...4960 4962 5227 5246 5283 RNGER1 FAD8 4991 RNGER2 FAD6 4986 4990 RNGERR FAD1 4966 4967 4973 4976 4979 4980 4988 RNGOK FAC4 4971 4981 ROWAC 0070 278 4940 4942 4943 4945 5442 5470 5476 5478 5480 5481 5485 ROWCRS 0054 258 4329 4388 4407 4540 4544 4546 4547 4586 4602 4646 4663 4690 4701 4702 4776 4783 4849 4887 4904 4913 4933 4965 5053 5132 5134 5189 5215 5224 5236 5248 5277 5313 5324 5339 5342 5398 54...

Страница 410: ... SETVBL E8EO 1224 1226 1556 SETVBV E45C 70 1225 2660 3178 3217 SETVBX EOB9 2215 2242 2253 2447 2652 SEX 0000 3415 3675 3959 SFH EF64 3163 SHFAMT 006F 277 4298 4347 4843 SHFLOK 02BE 428 4092 4493 4498 4503 4520 SHIFTl F5Bl 4299 4302 SHIFT2 F610 4348 4351 SHIFTO F5AA 4298 4301 SHIFTU F608 4347 4350 SIOWAY 0053 1624 SIGNON F223 3485 3733 SIN BD81 600 SIO E959 1686 1726 SIOINT E944 1689 1706 SIOINV E4...

Страница 411: ...37 2814 STATVL OOEA 2737 2812 STICKO 0278 379 1487 1491 1509 STICK1 0279 380 STICK2 027A 381 STICK3 027B 382 STIMER D209 675 STLOOP E877 1482 1494 STORE F917 4190 4204 4210 4212 4214 4222 4232 4234 4236 4238 4242 4244 4247 4249 4251 4257 4267 4269 4745 STORE1 F91D 4748 STRBEG FC5C 4545 5261 STRERR F942 4764 4768 STRIGO 0284 391 1498 STRIG1 0285 392 STRIG2 0286 393 STRIG3 0287 394 STRL E890 1497 15...

Страница 412: ...3 4612 4615 4617 TAB2 F82A 4616 4620 TABMAP 02A3 419 4125 5041 5043 5049 5050 5058 TBLENT FOE3 3510 3538 3641 TBLLEN OOOE 3538 3640 TDHI OOEA 2427 2428 TOLD OOCF 2428 TEMP 023E 354 1667 1668 1901 TEMP 1 0312 502 2478 2496 TEMP2 0314 503 TEMP3 0315 504 2578 2596 TEMPHI 0002 1667 1668 1884 TEMPLO 003E 1668 1880 TIMERl 030C 497 2472 2474 2477 2481 2574 2575 TIMER2 0310 500 2468 2469 2471 2475 2479 TI...

Страница 413: ...WAIT F496 4175 4177 VCOUNT D40B 745 2572 2598 4175 VCTABL E480 24 1232 1694 3630 4081 VDELAY DOIC 710 VDSLST 0200 311 1232 1374 VECTBL E400 23 VIMIRG 0216 322 1281 VINTER 0204 313 1352 VKEYBD 0208 315 1293 4081 VPRCED 0202 312 1348 VSCROL D405 741 VSERIN 020A 316 1299 1309 1694 VSEROC 020E 318 1297 VSEROR 020C 317 1298 VTIMR1 0210 319 1296 VTIMR2 0212 320 1295 VTIMR4 0214 321 1294 VVBLKD 0224 329 ...

Страница 414: ... EA3D 0057 0057 0083 FOD2 OOOF D40A F046 F361 E905 E462 003A E7E2 EC6D F138 0020 F160 F163 F16E F04A 00F5 00F9 OOF7 1028 1041 1052 1059 3220 3223 3337 3350 3350 3353 3324 3335 1659 2214 1654 2213 397 3161 3191 3195 3286 1901 1617 2807 2898 3069 139 939 3272 3297 3305 3389 1656 2209 744 1560 5357 3294 3299 3926 3928 1228 1248 1418 1571 72 229 1948 1961 2029 1413 1418 2378 2381 3587 199 3585 3610 36...

Страница 415: ......

Страница 416: ...ATARI HOME COMPUTER SYSTEM HARDWARE MANUAL I I AlARI A Warner Communications Company ...

Страница 417: ...of is granted unless by written agreement with or written permission from the Corporation Every effort has been made to ensure that this manual accurately documents this product of the ATARI Home Computer Division However due to the ongoing improvement and update of the computer software and hardware ATARI INC cannot guarantee the accuracy of printed material after the date of publication and disc...

Страница 418: ...INE CONTROL III 3 D GRAPHICS CONTROL III 4 E PLAYERS AND MISSILES III 9 F AUDI 0 I I I 12 G KEYBOARD and SPEAKER III 15 H SERIAL PORT III 17 I CONTROLLER PORTS III 19 SAMPLE DISPLAY PROGRAM IV 1 HARDWARE REGISTER LISTS V 1 A ADDRESS ORDER V l B ALPHABETICAL ORDER V 5 FIGURES VI 1 A MEMORY MAP VI 1 B NTSC and PAL DISPLAY VI 2 C SCHEMATICS VI 3 APPENDIX A APPENDIX B APPENDIX C USE OF PLAYER MISSILE ...

Страница 419: ......

Страница 420: ...A WSYNC performs the wait for Sync function STX Store X or STY Store Y would work just as well In BASIC a POKE could be used the data could be anything Reading a register is accomp lished by using any of the load instructions LDA LDX etc In BASIC a PEEK would be used When the hardware register names are defined in an equate list the programmer can refer to the registers by name rather than using t...

Страница 421: ...s Section II describes the hardware in some detail including the various graphics modes Section III lists the hardware registers one at a time describing what each bit is used for It is organized by functional groups interrupts graphics audio etc Section IV contains a sample display program Section V contains various figures and block diagrams of the system Sections VI and VII list the hardware re...

Страница 422: ...rlacing so each frame is identical unless the program which is being executed changes the display Vertical sync VSYNC occurs during the fourth through sixth lines of vertical blank VCOUNT hex 7D through 7F This tells the TV set where each frame starts After VSYNC there are 16 more lines of VBLANK for a total of 22 lines of VBLANK The display list jump and wait instruction to be described later cau...

Страница 423: ...l Sync WSYNC command that allows the microprocessor to synchronize itself to the TV horizontal line rate This sync takes effect when the processor writes to an I O location called WSYNC whenever it desires horizontal synchronization Writing to this address sets a latch which pulls to zero a pin on the microprocessor called READY When READY goes to zero the microprocessor stops and waits The latch ...

Страница 424: ...sile or Playfield type As the serial data passes through the CTIA chip it is impressed with the color and luminance values contained in these registers before being sent to the TV display In areas of the screen where there are no objects the background color COLBK is displayed The CTIA also does collision detection to be described later Priority When moving objects such as players and missiles ove...

Страница 425: ...Figure 11 2 OBJECTS no objects background _ If f _ MEMORY MAP CHARACTERS _ controlled by Display list instructions DMACTL _ _ Player o B J E C T Missile DMA Enable MEMORY DIS P LAY 11 4 Playfield DMA Enable SOU R C E S ...

Страница 426: ...ics The location of the graphics for each object is determined by adding an offset to PMBASE 256 decimal The bytes between the base address and the missile data are not used by Antic so they are available to the programmer Only the five most significant bits of PMBASE are used with single line resolution and the six most significant bits are used with two line resolution This means that the locati...

Страница 427: ...reen map in memory Missile TV SCREEN Number 1 I I I I I I I POI I I I I MO P2 1111 I I I I I Pl Ml P31 M3 1 I I I I Horizontal position I for each object is set independently by 8 horizontal position registers Each section of memory maps directly onto total height of TV screen Object vertical position is determined only by its location in its section of memory One byte of memory equals 1 or 2 tele...

Страница 428: ... fetches these instructions can be thought of as a display program counter 10 bit counter plus 6 bit base register The display list counter can be initialized by writing to DLISTH and DLISTL or OS shadow registers SDLSTH and SDLSTL Once initialized this counter value is used to address the display list fetch the instruc tion display one 1 to sixteen 16 lines of data on the TV screen increment the ...

Страница 429: ...tructions blank jump and display Blank I byte 3 bytes ID71D61D51D41 01 01 01 01 This instruction is used to create 1 to 8 blank lines on the display blackground color D7 D6 D4 D3 DO 1 display list instruction interrupt 0 7 1 8 blank lines o blank ID71D61 xl xl 01 01 01 11 This instruction is used to reload the Display List Counter The next two bytes specify the address to be loaded LSB first D7 D6...

Страница 430: ... 97 A7 B7 C7 D7 E7 F7 MAP 40 4 8 08 18 28 38 48 58 68 78 88 98 A8 B8 C8 D8 E8 F8 80 2 4 109 19 29 39 49 59 69 79 89 99 A9 B9 C9 D9 E9 F9 8 4 4 lOA 1A 2A 3A 4A 5A 6A 7A 8A 9A AA BA CAD A EA FA 160 2 2 lOB IB 2B 3B 4B 5B 6B 7B 8B 9B AB BB CB DB EB FB 160 2 1 10C 1C 2C 3C 4C 5C 6C 7C 8C 9C AC BC CC DC EC FC II 160 4 2 10D 1D 2D 3D 4D 5D 6D 7D 8D 9D AD BD CD DD ED FD II 160 4 1 10E IE 2E 3E 4E 5E 6E 7...

Страница 431: ... points to the location address in memory of data to be directly displayed memory map display or to the location of character name strings to be indirectly displayed character display A single byte instruction does not reload this counter This implies a continuation in memory of data to be displayed from that displayed by the previous instruction Since this counter really consists of 4 bits of reg...

Страница 432: ...de F only one color COLPF2 can be displayed Two different luminances are available If a bit is a zero then the luminance of the corresponding pixel comes from COLPF2 If the bit is a one them the luminance is determined by the contents of COLPF1 abbreviated to PF1 In IR modes 9 B and C two different colors can be displayed A zero indicates background color and a one indicates PFO color The differen...

Страница 433: ...I in Reg Modes HEX Line Line Pixel Pixel Pixel Pixel Select 00 BAK 3 8 4 40 10 8 4 2 01 PFO 10 PFI 11 PF2 4 9 2 80 10 4 2 1 0 BAK 1 PFO 00 BAK 5 A 4 80 20 4 2 2 01 PFO 10 PFI 11 PF2 6 B 2 160 20 2 1 1 0 BAK 1 PFO C 2 160 20 1 1 1 0 BAK 1 PFO 00 BAK 7 D 4 160 40 2 1 2 01 PFO 10 PFI 11 PF2 00 BAK E 4 160 40 1 1 2 01 PFO 10 PFI 11 PF2 8 F 1 320 40 1 k2 1 0 PF2 1 PFI LUM 11 12 ...

Страница 434: ...the range would be o through 127 decimal The upper one or two bits of the name byte are used to specify the color or other special information depending on the mode Character names codes are fetched by the memory scan counter and are placed in a shift register On any given line of display the shift register rotates changing only the name portion of the character address as shown below After a full...

Страница 435: ...er F I IJJ Color Register Select I I X I Address portion Character name I not used I Character Data Address Character Set in Memory w y Addresses data in character set displays on the Color ass igned by color register selected 11 14 z J of V I I Internal codes for characters in memory F x z o 1 TV 2 Scan 3 Lines 4 5 6 7 ...

Страница 436: ...escenders The last fourth of the character set name bits 5 and 6 equal to one is lowered The hardware takes the first two data bytes and moves them to the bottom of the character displaying two blank lines at the top of the character see next page In IR modes 2 and 3 bit 7 of the character name is used for inverse video or blanking This is controlled by CHACTL Character Control If bit 2 of CHACTL ...

Страница 437: ...Data Actual Display Upper Case 1R Mode 3 Upper and Lower Case Lower Case 11 16 ...

Страница 438: ...n Reg Modes HEX Mode Line Char Pixel Pixel Name Data Select 0 2 1 40 8 k 2 1 0 PF2 1 PFI LUM 3 1 40 10 1 0 PF2 1 PFI I LUM 00 BAK 4 5 40 8 1 2 Bit 7 01 PFO 0 10 PF1 11 PF2 Bit 7 11 PF3 1 00 BAK 5 5 40 16 1 2 Bit 7 01 PFO 0 10 PF1 11 PF2 IBit 7 11 PF3 1 0 BAK 1 6 5 20 8 1 1 00 1 PFO 01 1 PFI 10 1 PF2 11 1 PF3 0 BAK 2 7 5 20 16 1 1 00 1 PFO 01 1 PFI 10 1 PF2 11 1 PF3 11 17 ...

Страница 439: ... bottom blocks will be displayed The vertical dimension of each display block is controlled by a 4 bit counter within the ANTIC called the Delta Counter DCTR Without vertical scrolling it starts at on the first line and counts up to a standard value determined by the current display instruction Ex for upper and lower case text display the end value is 9 For 5 color character displays it is 7 or 15...

Страница 440: ...owing address 7C40 This is the address of the data to be displayed The 2 tells the hardware to display one line of IR mode 2 characters The next 23 bytes specify 23 more lines of mode 2 characters Hex 41 is the code for jumping and waiting until the end of the next vertical blank The address to jump to is 7C20 the start of the display list The next 960 bytes are the list of characters to be displa...

Страница 441: ...ying the next TV line A wait for Sync WSYNC instruction stops the 6502 The processor is restarted exactly 7 machine cycles before the beginning of the next TV line The program can thus change graphics or colors during horizontal blank in preparation for the next line The ANTIC chip steals cycles from the 6502 in order to do memory refresh and fetch graphics data when needed The general rule to rem...

Страница 442: ...cycles in the high resolution modes Once memory refresh starts on a line it occurs every four cycles unless pre empted by DMA All interrupts reach the 6502 near the end of horizontal blank With standard or narrow screen widths refresh DMA starts after the end of horizontal blank The time at which ANTIC does cycle stealing is deterministic but depends on the graphics mode screen width and whether o...

Страница 443: ...er data The refresh DMA takes 9 cycles for each of 262 lines except for the 24 lines where the characters are read where only 1 refresh cycle occurs DMA description display list characters character data refresh total Machine 40x24 960x8 262x9 24x8 cycles 32 960 7680 2166 10838 Thus the total DMA per frame is 10838 machine cycles One frame is 262 lines with 114 machine cycles per line for a total ...

Страница 444: ... AUDCTL bits 4 and 3 This allows the following options 4 channels of 8 bits resolution 2 channels of 16 bit resolution or 1 channel of 16 bit and 2 channels of 8 bit Poly Noise Counters There are 3 polynomial counters 17 bit S bit and 4 bit used to generate random noise The 17 bit poly counter can be reduced to 9 bits AUDCTL bit 7 These counters are all clocked by 1 79 MHZ Their outputs however ca...

Страница 445: ...annel noise output without high pass filter VOL Channel by N Frequency ________________________________________________ Frequency Channel 1 output with high pass filter ________________________________________________ Frequency Channel 2 output with high pass filter Clock D ...

Страница 446: ...4 of AUDCX In this mode the dividers noise counters and filter circuits are all discon nected from the channel output Only the volume control bits 0 to 8 of AUDCX determine the channel output current The audio output of any channel can be completely turned off by writing zero to the volume control bits of AUDCX All ones gives maximum volume C SERIAL PORT The serial port consists of a serial data o...

Страница 447: ...eption is complete otherwise an input data over run will occur This over run will be indicated by bit 5 of SKSTAT if bit 5 of IRQST is not RESET true before next input complete and means input data has been lost This bit should be tested whenever SERIN is read Bit 7 of SKSTAT should also be tested to detect frame errors caused by extra or missing data bits Direct Serial Input The serial data input...

Страница 448: ... 1 1 o 1 1 o 0 o 1 1 0 I 1 I1 I I chan 4 CH4 A chan 4 CH4 A Chan 2 Chan 2 Out Clock ext ext chan 4 CH4 A chan 4 CH4 A Chan 2 Chan 2 In Rate ext chan 4 A chan 4 CH4 A ext CH4 A Chan 2 Chan 4 A Bi Dir Clock ext input ext input chan 4 output input ext input input Chan 4 Output Input not used A asynchronous I I Comments ITrans Receive rates set by lexternal clock Also internal Iclock phase reset to ze...

Страница 449: ...nterrupt to occur Since any of these interrupts will cause the processor to jump to the same NMI address the system also has NMI status bits which may be examined by the processor to determine which source caused the NMI interrupt Bits 5 6 and 7 of NMIST serve this function see NMIST register description These status bits are set by the corresponding interrupt function even if the interrupt is mas...

Страница 450: ...audio divider 1 has counted down to zero In addition to the above IRQ interrupts enabled by bits 0 through 7 of IRQEN and identified by status bits 0 thru 7 of IRQST there are two more system IRQ interrupts which are generated over the serial bus Proceed and Interrupt lines D7 of PACTL DO of PACTL D7 of PBCTL DO of PBCTL peripheral A interrupt status bit peripheral A interrupt enable bit periphera...

Страница 451: ...ve key keyboard and light pen when available A B The controller ports are read through the PORTA and PORTB regisers and the POT and TRIG registers The OS reads these registers during vertical blank and stores into its own RAM locations These are STICK PADDLO through PADDL7 PTRIG S and STRIG S The OS sets up PORTA AND PORTB for input This is done by setting PACTL or PORTB Port Control bit 2 to a 0 ...

Страница 452: ... 1 to start the pot scan The fast pot scan is not as accurate as the normal scan mode Bit 2 of SKCTL must be set to 0 to use normal scan mode Otherwise the capacitors will never dump Note that some paddles have a range smaller than 0 to 228 due to differences in the pots The left and right paddle triggers for each paddle pair are read from the left and right bits for the corresponding joystick POR...

Страница 453: ...gnificant bit is inaccurate and should be ignored Since there are a number of delays involved in displaying the data and changing the light pen register each system must be cal brated Software which uses the light pen should contain a user interactive calibration routine For example the user could point the light pen at a crosshair in the center of the screen and the program could compute the requ...

Страница 454: ...on B INTERRUPT CONTROL NMIEN Non Maskable Interrupt Enable D40E This address writes data to the NMI interrupt enable bits D7 D6 o disabled masked 1 enabled Not Used D7 Display List Instruction Interrupt Enable This bit is cleared by Power Reset and may be set or cleared by the processor D6 Vertical Blank Interrupt Enable This bit is cleared by Power Reset and may be set or cleared by the processor...

Страница 455: ...t D40F This write address resets the Non Maskable Interrupt Status Register NMIST Not Used Written by as NMI code IRQST IRQ Interrupt Status D20E This address reads the data from the IRQ Interrupt Status Register D7 o Interrupt 1 No Interrupt D6 D5 D4 D3 D2 Dl DO D7 0 Break Key Interrupt D6 0 Other Key Interrupt D5 0 Serial Input Data Ready Interrupt D4 0 Serial Output Data Needed Interrupt D3 0 S...

Страница 456: ...R s to change one bit in POKMSK without affecting the others Store the desired value in both IRQEN and POKMSK C TV LINE CONTROL VCOUNT Vertical Counter D40B This address reads the Vertical TV Line Counter 8 most significant bits D7 V8 D6 DS D4 D3 V7 V6 VS V4 D2 Dl V3 V2 DO VI va not read VO Two line resolution supplied WSYNC Wait for Horizontal Blank Synchronism i e wait until start of next TV lin...

Страница 457: ... 1 1 Wide Playfield DMA 192 Color Clocks DMA See GRACTL OS Shadow SDMCTL 22F default value hex 22 GRACTL Graphics Control D01D This address writes data to the Graphic Control Register Not Used D2 D1 DO 1 1 1 D2 D1 DO Enable latches on TRIGO TRIG3 inputs latches are cleared and TRIGO TRIG3 act as normal inputs when this control bit is zero Enable Player DMA to Player Graphics Registers Enable Missi...

Страница 458: ...the characters to 1 then periodically changing DO of CHACTL OS SHADOW CRACT 2F3 DLISTL Display List Low D402 This address writes data into the low byte of the Display List Counter D7 D6 D5 D4 D3 D2 Dl DO DiSPlay 7 6 5 4 3 2 1 0 List Counter Bit as SHADOW SDLSTL hex 230 Position DLISTH Display List High D403 This address writes data into the high byte of the Display List Counter D7 D6 D5 D4 D3 D2 D...

Страница 459: ... 6 I 5 4 Base Address Char Name Line Counter 20 Character Modes D7 ID6 IDS D4 ID3 ID2 ID1 J CHBASE 15 114 113 Ig ll 110 9 8 I 7 I 6 5 4 3 Jd222iJ Base Address Char Name Line Counter Os SHADOW CHBAS 2F4 PMBASE Player Missile Address Base Register D407 This address writes data into the Player Missile Address Base Register The data specifies the MSB of the address of the player and missile DMA data s...

Страница 460: ...ange in the number of bytes and background color is shifted in VSCROL Vertical Scroll Register D405 This address writes data into the Vertical Scroll Register not used D2 Dl DO 8 line display modes not used D3 D2 Dl DO 16 line display modes The display is scrolled upward by the number of lines specified in the VSCROL register for each display list instruction that contains a 1 in its VSCROL Flag b...

Страница 461: ...K I BAK I BAK I BAK NOTE The use of Priority bits in a non exclusive mode more than 1 bit true will result in objects whose priorities are in conflict turning BLACK in the overlap region EXAMPLE PRIOR code 1010 This will black PO or PI if they are over PFO or PFI It will also black P2 or P3 if they are over PF2 or PF3 In the one color 40 character modes the luminance of a pixel in a character is d...

Страница 462: ...ASE and PRIOR also affect players and missiles COLPMO COLPM3 Player Missile Color D012 D013 D014 D01S These addresses write to the Player Missile Color Lum Registers Missiles have the same color Ium as their player unless missiles are used as a Sth player see bit 4 of PRIOR A Sth player missile gets its color from COLPF3 D7 D6 DS D4 D3 D2 Dl DO see COLBK for bit assignments OS SHADOWS PCOLRO 3 2CO...

Страница 463: ...For larger objects each bit is extended over more than one color clock SIZEM Missile Size DOOC This address writes data into the Missile Size Control Register ID7 ID6 M3 I D5 I D4 M2 D3 I D2 ID1 I DO 0 0 0 1 1 0 1 I Horizontal Size Register Missile Normal Size 2 color clocks wide Twice Normal Size 4 color clocks wide Normal Size 4 Times Normal Size 8 color clocks wide HPOSPO HPOSP3 Player Horizont...

Страница 464: ...ation can be set up by assembly language code which stores data into the graphics registers at the desired line MOPF MIPF M2PF M3PF Missile to Pla field Collisions DOOO DOOl D002 D003 These addresses read Missile to Playfield Collisions A 1 bit means that a collision has been detected since the last HITCLR Not Used zero forced D3 3 D2 2 Dl DO 1 o Playfield Type POPF PIPF P2PF P3PF Pla er to Pla fi...

Страница 465: ...nell clocked by Channel 3 See section II D1 Insert Hi Pass Filter in Channel 2 clocked by Channel 4 DO Change Normal 64 KHZ frequency into 15 KHZ Exact Frequencies The frequencies given above are approximate The Exact Frequency fin that clocks the divide by N counters is given below NTSC only PAL different FIN FIN 1 79 MHZ 1 78979 MHZ Use modified formula for fout 64 KHZ 63 9210 KHZ Use normal for...

Страница 466: ...ontrol D201 D203 D205 D207 These addresses write data into each of the four Audio Control Registers Each Register controls the noise content and volume of the corresponding Audio Channel Noise Content or Distortion Volume I I I I I I Divisor N set HEX D7 I D6 I D5 I D4 D3 I D2 I Dl I DO by audio frequency register 0 0 0 0 0 17 BIT poly 5 BIT poly N 2 0 0 1 0 5 BIT poly N 2 4 0 1 0 0 4 BIT poly 5 B...

Страница 467: ...LE C C 79 121 B 80 128 All or Bb 88 136 A 90 144 Gil or Ab 99 153 G A2 162 FII or Gb AD 173 F B6 182 E C1 193 DII or Eb ce 204 D D9 217 LOW ell or Db E6 230 NOTES e F3 243 STlMER Start Timer D209 This write address resets all audio frequency dividers to their AUDF value These dividers generate timer interrupts when they count down to zero if enabled by IRQEN also see IRQST not used RANDOM Random N...

Страница 468: ...ssed Game Start Option Select Loudspeaker should be held at 1 except when writing 0 momentarily OS writes a 1 during vertical blank KBCODE Keyboard Code D209 This address reads the Keyboard Code and is usually read in response to a Keyboard Interrupt IRQ and bits 6 or 7 of IRQST See IRQEN for information on enabling keyboard interrupts See SKCTL bits 1 and 0 for key scan and debounce enable D7 D6 ...

Страница 469: ... 05 OB U 75 55 15 2B Y 79 59 19 OC RET 9B 9B 9B 2C TAB 7F 9F 9E OD I 69 49 09 2D T 74 54 14 OE 2D SF lC 2E W 77 57 17 OF 3D 7C ID 2F Q 71 51 11 10 V 76 56 16 30 9 39 28 11 31 12 C 63 43 03 32 0 30 29 13 33 7 37 27 14 34 BACKS 7E 9C FE 15 B 62 42 02 35 8 38 40 16 X 78 58 18 36 3C 7D 7D 17 Z 7A SA lA 37 3E 9D FF 18 4 34 24 38 F 66 46 06 19 39 H 68 48 08 lA 3 33 23 3A D 64 44 04 IB 6 36 26 3B lC ESC ...

Страница 470: ...times instead of one frame time The capacitor dump transistors are completely disabled Enable Key Scan Enables Keyboard Scanning circuit Enable Debounce Enables Keyboard Debounce circuits DO Dl Both Zero Initialize State used for testing and initializing chip OS SHADOW SSKCTL hex 232 The OS enables key scan and debounce and may change the other bits for different I O operations In particular an ab...

Страница 471: ...y DO 1 Not Used Logic True SKRES Reset above Status Register D20A This write address resets bits 7 6 and 5 of the Serial Port Keyboard Status Register to 1 not used SERIN Serial Input Data D20D This address reads the 8 bit parallel holding register that is loaded when a full byte of serial input data has been received This address is usually read in response to a serial data in interrupt IRQ and b...

Страница 472: ...o the direction control register if bit 2 of PACTL is zero I O for both ports A and B goes through a 6520 6820 Data Register Addressed if bit 2 of PACTL is 1 Joystick Operation I I I I D7 D6 D5 I D4 I D3 I D2 I D1 DO O Switch pressed l Switch not pressed Right Back ight Back Left Fwd Left Fwd _ D7 I Stick1 Jack 2 StickO Jack 1 Paddle Operation I I I D6 I D5 I D4 I D3 D2 I D1 I DO L PTRIG2 I 1 PTRI...

Страница 473: ... Enable Bit Write 1 Enable Reset by power turn on or processor Set by Processor PORTB Port B D301 This address reads or writes data from Player 2 and Player 3 controller jacks if bit 2 of PBCTL is true This address writes to the direction control register if bit 2 of PBCTL is zero I O for both ports A and B goes through a 6520 6820 Data Register Addressed if bit 2 of PBCTL is 1 Jo stick 0Eeration ...

Страница 474: ...nd Identification Serial bus Command Line D2 Controls Port B addressing described above 1 Port B Register 0 Direction Control Register DO Peripheral B Interrupt Enable Bit 1 Enable Reset by power turn on or processor Set by processor Set to hex 3C by OS IRQ code POTO POT7 Pot Values D200 D207 These addresses read the value 0 to 228 of 8 pots paddle controllers connected to the 8 lines pot port The...

Страница 475: ...an Counter cleared to zero 2 Capacitor dump transistors turned off 3 Scan Counter begins counting 4 Counter value captured in each of 8 registers POTO POT7 as each pot line crosses trigger voltage S Counter reaches 228 capacitor dump transistors turned on Written to by as vertical blank code TRIGO TRIGI TRIG2 TRIG3 Trigger Ports O DOlO 1 DOll 2 DOI2 3 D013 These addresses read port pins normally c...

Страница 476: ... D5 D4 D3 D2 D1 DO H7 H6 H5 H4 H3 H2 HI HO OS SHADOW LPENH hex 234 PENV Light Pen Vertical TV Line Position D40D This address reads the Vertical Light Pen Register 8 most significant bits same as VCOUNT D6 D5 D4 LP8 7 6 5 D3 D2 D1 4 3 2 DO 1 o LPO not read Two line resolution supplied OS SHADOW LPENV hex 235 Front Panel Controller Jacks as I O Parts PIA 6520 6820 Out TTL levels 1 load In TTL level...

Страница 477: ...ger B Right Trigger POT B Right 5 GND POTA Left STICK 0 1 2 or 3 111 24 Female connector HARDWARE KEYBOARD REGISTERS Top Row Bit or 4 2nd Row Bit 1 or 5 3rd Row Bit 2 or 6 Bottom Row Bit 3 or 7 1st Column POT 1 3 5 7 3rd Column TRIGO I 2 3 5 2nd Column POT 0 2 4 6 OS VARIABLES Bit 0 Bit 1 PTRIGO 2 4 6 Bit 2 PTRIGl 3 5 7 Bit 3 PADDLl 3 5 7 STRIGO 1 2 3 PADDLO 2 4 6 ...

Страница 478: ...ly language program illustrates the use of players missiles and display lists The diagram on the next page shows what the display looks like and which objects are used The comments in the program listing describe how it works IV l ...

Страница 479: ...PLAY Color Clocks 32 decimal PO PI P2 P3 38 3C SC 7C 9C BC v Player Missile Horizontal Position Register Values hex End of Vertical Blank 24 Blank Lines 20 Characters across by 8 lines high 1 6 8 Rows 16 Characters across by 16 lines high 16 Characters across by 8 lines high ...

Страница 480: ...ASED PROGRAt1 I JHICH RUNS WITH THE A5SEt1BLER CARTRIDGE NOT A 0n0 ROM CARTR I DOE 01 40 01 513 COLLEEN ATARI 8 0 EQUATES 13160 01 70 CHBASE D4139 01 813 Dt lACTL c D4130 01 90 SDMCTL S022F 02013 HPospe SDe0e 02113 SIZEPe SDee8 02213 PCOLRe se2C0 0230 SDLSTL se230 132413 SDLSTH S0231 0250 GRACTL SDe1D 02613 PMBASE SD4e7 132713 GPRIOR se26F 132813 VDSLST se2ee 132913 NMIEN D4eE 0300 133113 DISPLAY ...

Страница 481: ...NTOFF 213 USED TO GET INTERNAL CODE FOR UPPER CASE ALPHANUf lERICS INTERNAL CHARACTER CODES SPI AI CI DI EI GI HI II OI PI RI TI YI NU N81 N9I NeI INTOFF A INTOFF C INTOFF D INTOFF E INTOFF G INTOFF H INTOFF I INTOFF O INTOFF P INTOFF R INTOFF T INTOFF Y INTOFF 1 INTOFF 9 INTOFF 9 INTOFF e INTOFF CHECKERS EQUATES CODES FOR SPECIAL CHECKERS CHARACTER SET EMPTY CHECKER KING CURS BORDER CLP0 CLP CLBO...

Страница 482: ...ES ARE USED TEMP FOR MOVING BOARD TO MEM MAP 0930 PLR ER AND MISS I LE G APH I CS 0940 PLAYERS ARE USED FOR SQURRES MISSILES FOR LEFT RND RIGHT BORDERS 0950 0960 PMB S180 0970 GRM03 80 MISSILE GRAPHICS 0980 GRP0 80 PLAYER 0 GRAPHICS 0990 GRP1 80 PLA T ER 1 1000 GRP2 80 2 1 010 GRP3 80 3 1020 1030 TITL 20 TOP LINE OF CHARS ATASCII MESSAGE 1 040 TOPBRD 16 TOP BORDER OF BOARD 1 050 BRDSP 8 16 BOARD D...

Страница 483: ... 66 561 A 3C 561 B 1 8 561 C 1 8 561 D 3C 561 E 66 561 F C3 56213 1313 5621 FF 5622 FF 5623 FF 5624 FF 5625 FF 5626 FF 5627 1313 113713 10813 1 1S GP 1 1013 11 1 13 1 1 213 GR 1130 1 1 413 1 1 513 1 1 613 1 1 713 PAGE SPECIRL CHFCKEPS CHRRACTEf Sc T ot L COvES 13 4 Af E USEvj PI E 6ee BYTE 13 13 0 13 13 0 0 13 BLANK 0 BYTE 3C 7E SFF SFF SFF SFF 7E 3C CHECKER 1 B yTE S3e S7L SA5 SA5 SC3 C3 7E 3C KI...

Страница 484: ...OP OF 1ST ROW OF SQUARES BLANK2 1 7 1 8 TOP OF FIRST ROW OF SQUARES 7 BLANK6 7 BLANK6 7 BLANK6 7 BLANK6 7 BLANK6 7 BLANK6 7 BLANK6 7 CHECKERBOARD 8 LINES OF CHARS WITH SPACES INBETWEEN 22 LINES SQUARE 19 34 16X5X2 LINE RESOLUTION CHARS 35 40 FIRST 3 LINES BOTTOM OF PREVIOUS SQUARE 41 56 57 62 LAST 3 LINES TOP OF NEXT SQUARE 63 78 79 84 i 85 1130 1 131 1 136 j 1137 122 i 1 23 1 28 129 1 44 1 45 1 5...

Страница 485: ...EN 1 613 CLOCKS 1 770 1 780 LDA S2E 1 790 STA SDMCTL 1 81313 1 81 13 CLEAR RAM 1 820 1 830 LOA 13 1 840 TAX 1 850 IN ITLP 1 860 1 870 1 880 1 890 1 900 1 91 0 1 920 1 930 STA STA STA STA STA INX BNE PMB X PMB S1 00 X PMB 20e X PMB 0e X PMB 400 X INITLP 1 9413 INITIALIZE MISSILE GRAPHICS FOR BORDERS 1 950 1 9613 1 9713 1 9813 LQPZ 1 990 2000 201 0 LDA LD T STA DEY BNE 0E S5E GRt103 1 4 Y LQPZ 2020 ...

Страница 486: ... 8D3 1 e2 24813 577 1 A903 2490 77 80 1 000 2500 5776 A950 25 1 13 5778 8De7D4 25213 77B A9 1 4 25313 577D 8D6Fe2 25413 5780 A945 25513 5782 8De002 2560 5785 A956 2570 5787 8D0102 2580 S78A SE0ED4 25913 2600 LDA STA LDA STA LOA STA LOA STA LDA STA LDA STA LDA STA STX DSP FF SDLSTL DSP 256 SDLSTH 3 GRACTL PMB 256 PMBASE 1 4 GPRIOR NCHR UFF VDSLST NCHR 256 VDSLST 1 NMIEN DISPLAY LIST START ADDRESS L...

Страница 487: ... 57BF 993454 57C2 C8 57C3 C8 57C4 C8 57C5 C8 57C6 CA 57C7 CE2050 57CA 10EA 57CC 98 57CD 18 57CE 6910 57D0 A8 57Dl 8A 57D2 E903 57D4 AA 57D5 B0DR 57D7 60 2870 2880 2890 2900 UPCHR SUBROUTINE TO f 10VE 32 BYTES OF CHECKER BOARD TO DISPLAY RAM 2910 2920 UPCHR 2930 2940 2950 2960 2970 2980 2990 3000 3010 3020 3030 3040 3050 3060 3070 3080 3090 310 21 110 3120 3130 3140 3150 3160 3170 318 21 319 21 320...

Страница 488: ...P Ml LEFT BORDER M2 M3 F1RE F Lf1CED WITH M1 P0 Pl P2 Pl M0 Ml M2 M3 ITBL BYTE 3C 5C 7C S9C BC 38 38 38 33113 33213 iCOLOR TABLE 33313 ITBL1 33413 BYTE 34 34 34 34 4 PLAYERS RED SQUARES 33513 33613 3370 33813 33913 341313 j BYTE 36 BYTE 88 BYTE 0E BYTE 26 BYTE 13 PFe RED CHECKERS AND MESSAGES PF1 BLUE CHARACTERS PF2 WHITE CHECKERS AND MESSF1GES PF3 YELLOW BORDER CHARS MISSILES BK BLACK BACKGROUND ...

Страница 489: ......

Страница 490: ...G2 Trigger DOll GRAFM GraDhics All Missiles TRIGI Buttons DOlO GRAFP3 Graphics Player 3 TRIGO DOOF GRAFP2 Graphics Player 2 P3PL Read Player DOOE GRAFPl GraDhics Player 1 P2PL to Player DOOD GRAFPO Graphics Player 0 PlPL Collisions DOOC SIZEM Size All Missiles POPL DOOB SIZEP3 Size Player 3 M3PL Read Missile DOOA SIZEP2 Size Player 2 M2PL To Player DOO9 SIZEPI Size Player 1 MlPL Collisions DOO8 SI...

Страница 491: ...ical Light Pen Register D40C PENH Horizontal Vertical Line D40B VCOUNT Counter Wait for HBLANK D40A WSYNC Synchronism Character Base D409 CHBASE Address Red D408 Player Missile Base D407 PMBASE Address Rezister D406 Vertical Scroll D405 VSCROL Register Horizontal Scroll D404 HSCROL Register Display List D403 DLISTH Pointer High Byte Display List D402 DLISTL Pointer Low Byte Character Control D401 ...

Страница 492: ...uence Vertical Line Reset Status Random Numb D20A SKRES SKSTAT RANDOM Generator D209 STIMER Start Timers KBCODE Keyboard Code Read 8 Line Pot D208 AUDCTL Audio Control ALLPOT Port State Audio Channel 4 D207 AUDC4 Control POT 7 Audio Channel 4 D206 AUDF4 Frequency POT 6 Audio Channel 4 D205 AUDC3 Control POT 5 Read the Audio Channel 3 value of D204 AUDF3 FreQUency POT 4 each POT Audio Channel 2 D20...

Страница 493: ...L Bit 2 0 PORTB Same as write D301 otherwise Jack 2 Jack 3 Jack 2 Jack PORTB If Direction Bits PORTB If Direction Are 1 Are 0 Direction Register PORTA If PACTL Bit 2 0 PORTA Same as write D300 Otherwise Jack 0 Jack 1 Jack o Jack PORTA If Direction Bits PORTA If Direction Are 1 Are 0 NOTE Output data is retained in Jack Output Registers If direction bits are true a read of the jacks will read old d...

Страница 494: ...COLR3 2C3 707 CONSOL Console Switch Port DOlF 53279 Set to 8 during VBLANK DLISTH Display List Pointer high byte D403 54275 SDLSTH 231 561 DLISTL Display List Pointer low byte D402 54274 SDLSTL 230 560 DMACTL Direct Memory Access DMA Control D400 54272 SDMCTL 22F 559 GRACTL Graphic Control DOlD 53277 GRAFM Graphics for all Missiles DOll 53265 GRAFPO Graphics for Player 0 DOOD 53261 GRAFP1 Graphics...

Страница 495: ...l SKREST Reset Serial Port Status SKSTAT SKSTAT Serial Port Status STIMER Start Timer TRIGO Joystick Controller Trigger 0 TRIGI Joystick Controller Trigger 1 TRIG2 Joystick Controller Trigger 2 TRIG3T Joystick Controller Trigger 3 VCOUNT Vertical Line Counter VDELAY Verical Delay VSCROL Vertical Scroll WSYNC Wait for Horizontal Sync V 6 D004 DOOC D005 DOOD D006 DOOE D007 DOOF D302 D014 D303 D40C D...

Страница 496: ...e Colleen left and right slot and Candy single slot all add ress this space RAM Expansion RAM initially supplied in the product to SIZE 10K 2K 4K 16K 8K RAM expansion can actually exten to BFFF However the ROM cartridges will deselect the RAM Deselection occurs on 8K boundaries Atari 400 units are RAM expandable only at the factory They can accept RAM up to 2FFF 16K when fully extended VI 1 ...

Страница 497: ......

Страница 498: ... t Z J o n II RESET 261 Z I START II VSLANK NARRON PLAYFIELD gI DISPLAY 128 COLOF CLOCKS 2 STMJDARD PLAYFIELD IGO COLOR CLOCI S I 0 10 1 I Z 2 J I J WIDE PLAYFIELD 1 3 17G COLOR CLOCKS DISPLAY ED I 9 19 2 COLOR CLOCKS READ y oc W t Z 3 u ill Z CENTER J OF Z SCREEN u III J LlJ 10 127 128 247 1 0 J 8 4 Gl 64 250 IZ J SET 1 ro I ro I SET K VBLANK vit c Jo Ef r ti 248 2SI 125 124 HOQIZONTAL ITION REGI...

Страница 499: ...TROL H I LER 4 4 0 ADDRESS BUS 0 0 Q Q Q cI cI cI 0 o I ot PERSONALITY col w w co 311 cow ROMS 311 U 311 wu 0 eu r r eo A DATA BUS 0 1 cl cI I u I C rI 0 _ TRIGGER LINES AI LUMINENCE a COLOR VIDEO AUDIO JOYSTICk p r SUMMING MOD l CONTROL rI I LER POWER A I ON A RESET r I I MOTJ lF R ROI1Rn J 107 ...

Страница 500: ...4 0 m 1 YVc l OCUC I n L __ I if U l M j lll t If d _ Y fjU D i r I i DI DI DJ f J lit 04 _ f s I l l II Dt Dl DS DS H 7 04 PI cc H 1 _ N H H _ M t I Ia Fl p n L l r P4 bL _ _ _ p N i l A L _ I un ft_ I I J III I r IS n A III 1 CI I J J TTT lM IIII II I r l III I 0 1 Coto f IS r L t CII T T I UI_ y oO V an I J _ p y Uo U to M oj I OW I I Fit Ny L I _ v l c N a_ r YO yl 1s r I 04 POl a_ oO 1 LA C R...

Страница 501: ...89 I kWYss LJFF l Jf V V SUMMING C 86 0 58 r 1 RI12 Rln i K v 185 lOOp II RI71 18K 4 58 400 MOTHER BOARD OUA FROM PAGE I g JlgigI r Iii51 N Cl UCl CttU uuu L IJ 0 II OUTPUT A aAA a A A u o000000OU01 Llt A A Rl50A 71C CI65 CI7I 7X OOI 5A I IIcm lion I 58 lila I O l2 J _ S 5A lI03 L106 11 0 I _I J 1 C 16 J 01 Ii P9IU1 AUDIO M XER 1 00 ODI v PAGE 2 RI70 4 11 A ...

Страница 502: ... 0 Ow Ow 0 01 Ot tDt o o 0 r JfI tDW tDW W 40 40 40 W of c c 00 00 0 Z W O W O 0 tDfI tDfI 00 A DAT A BUS 0 0 f I 4 2 I W fl 0 r 4 2 2 2 fI b O 2 Ill 0 4 of of of c c ir wO C C 0 0 0 I tD o tD 4 LINES TRIGGE R r VIDEO AUDIO A JOYSTICK LUMINENCE a COLOR P CONTROL SUMMING MOD LER I t I A 0 0 POWER I J r4 z 0 c J ON 0 0 0 0 O cn RESET W a W t ILI 0 fI Zz 0_ 4 J H A MOTHER 1 _114 I o ...

Страница 503: ...0 c F I J G L Ir na 41 I PAGE I J C k r J r L OT ce LUT I rlt ioSl VIS ifft l J Ciao 1 DS 4 III l lt l U __ m CI Ltn m r teGE Vss I 1h i1J i JIU EJ _ Ol fwD __ s 0 tft 15 1 Vas l em _ J E1 J r fwD Clt 4 un 5 fhCIKJ J1IU GU Vss jl j _ ii 0 I III L J ____ ...

Страница 504: ... 75 AM a 5 vvv 18K H RZOl 1M ca I pl YVY1 0 A A 96 l R206 el70 TIOO F llO5 c l 3 3K iT v I TO CONTROl SWITCt S t fA III II 800 MOTHER BOARD FROM PAGE I 51 I dldl lgl I I RI29A gilD III U A 4 1K A yyy A A O A r 51 Y YYV R157 I YVV yRI29E RI29f 4 7K AAA Y y y y A A YVy N C U PAGE 2 RI59 tJ5A 2 1K 0107 I I I I II H CI8811_ I ba9 1 51 COMP lUM MOD COMP VIDEO OOMP CHROMA l 1 115 CVfO F 3 t 6 c 20 J L I...

Страница 505: ...u BOARD A V VOLTAGE BRIDGE VOLTAGE BOOST RECTI BOOST FI E R RIPPLE RIPPLE RIPPLE fiLTER FILTER FILTER 12 VOLT 5A A 5 VOLT L C POWER RE GU L RE G UL FILTER ON ATOR ATOR LIT E 5B 5 VOLT f REGUL ATOR R F r MOO TO TELEVISON J 2 0 TO PERIPHERAL JACK L L 7 t I J 201 I IJ 202 TO MOTHER BOARD ...

Страница 506: ...05 2 A20t 5A 58 1 MOO 4 9 J202 CR210j 0 O I t b AJ C202 470 CR20Z tRZOI IS IV C203 22 GNO 5A READY 2 INTERRUPT AUOIOIN_ PROCEED COMMAND DATA OUT DATA 1 _ CLOCK N CLOCKOUT MOTOR CONTROL R203 33 2W 400 POWER SUPPLY J204 POWER IN ...

Страница 507: ...00 BOARD VOLTAGE 8RIDGE VOLTAGE BOOST RECTI BOOST FI E R RIPPLE RI PPLE RIPPLE FILTER fiLTER FIL T E R 12 VOLT 5A 5 VOLT L C POWER RE GUL flL T E R ATOR 58 5 VOLT REGUL ATOR R F MOD TO TELEVISON CONTROL SWITCHES TO PERIPHERAL JACK COMPOSITE VIDEO TO MONITOR JACK 204 TO MOTHER BOARD ...

Страница 508: ...4 202 L R20 9 IK CHZII CR201 GND ta8 READY 12 INTERRUPT CLOCK OUT PROCEED COMMAND DATA OUT OAUIN _ CLOCKIN MOTOR CONJlI L AUDIOIN R201 330 800 POWER SUPPLY NOTE I UN SS OTHERWISE SPECIFIED At All CAPACITORS ARE INp J20 8 ALL RESISTORS ARE IN OHMS I W a POWER IN ...

Страница 509: ...r o 0 o m 0 W I I o o t ROM ADDRESS BUS ROM DATA BUS ROM ADDRESS MULTiPLEXER J DATA BUFFE R SE L ECT I CHIP SELECTS PERSONALITY BOARD ATARI 800 ...

Страница 510: ...59ZlMS ftifEJ _ 2 11 8 tCM S WZ ftJSfrwjJjlm 11 9 __ I AID All 21 es 11 12 Cs Ot r C f e4 L 12f 124 9 10 _____ 1_ ____ 1_ ___ J i 5 4 3 2 I 2 3 22 I 21 00 GNO Vee 01 02 03 04 05 06 01 AD AI A2 t 01 A3 o 01 It A4 N A5 o 0 A6 Al A8 00 GNO Vee 10 _____ _J _ ____ 1 ______ 6 I 01 Dil 03 04 05 06 01 AD AI Ail 43 en f en o 1111 4 0 N _ 11 5 0 o u 11 6 111 1 11 8 __ fl A9 11 9 11 10 AID All es All CS AI2 ...

Страница 511: ...ESS BUS ADDRESS BUS T 41 E BUFFER 0 0 VIDEO 0 SIGNALS m 0 R GGE CTIA W I NE S ANTI C VIDEO A CONTROL MPU r CONTROL t 1 S WITCHE 0 DATA BUS DATA BUS I 1 2 CLOCK 02 CLOCK CLOCK 14 CLOCK IGENERATO 00 CLOCK I CPU BOARD ...

Страница 512: ...d f U 3 Z302 _ 15 elle 02 7474 1 1l fl nOlA 2 um l t I I to 141 291 91 It ANt ANI AN2 16 22 F A 17 C012296 Al2 II 07 06 A502 AI3 ANTic Al4 19 Al5 20 ENABLES Vee 3 A_ Af 17 AI AI 15 13 AZ A2 A3 1303 A3 II DI CJil 4 COIOI u U1 5 AS 74LS244 A5 4 18 8 A6 Z A7 Vss A M I n 1 19 201 ENABLES lc30l 01 n04 Q 5 VOLTS 34 A R i 10 AI II A2 12 A3 13 A4 14 A5 15 AI 16 AT A8 n A9 A303 AlO C014377 All 6502 22 AI2 ...

Страница 513: ...TA LINES SECT 10 I ENABLE I ADDRESS LINES 1 t O o 1___ REfRESH t BOARD SELECT f w 0 hi ad J en a en t 0 J o a w 4 0 DATA IN ADDRESS LINES 1 8 RAM CHIPS 4 DElAY I___ as l _ _ CIRCUIT DELAY CIncu IT HAs 8K DYNAMIC RAM ATARI ...

Страница 514: ... ii 1 i l Jrr _ on o I I 1 SI o c C c c C c 0 ccccee 0 0 10I ...

Страница 515: ... 0 W I ADORE S5 BUS t 0 l REFRESH BOARD SELECT rr DATA OUT T R 1 4 STATE BUFFER I DATA I N 4 1 0 w w J ADORE S 5E S en 0 I 8 RAM CHIPS en t Il w J 0 o 2 o w 0 t DElAY J C CIReUT AS DELAY rICIRCUT RAS 16 K DY N A M Ie RAM ATA R I ...

Страница 516: ...l 14 4A N AI AI I 7 1 4 Iv II I II 1 14 4 1 1 J F IA If 1 L__________ II Iy r Cii 15 Cii II Cii IS Cd I iiiii iiiiii Wiiii Wiiiii Ia II i 110 11 I UIILlU Kla 11 II IIClfllII AI LL ca AaJoal Mil III fA 8 1 u ft I I ALL ulno MIl III _I 1 4 W I 10 IT II v t 1 11 16K RAM I 10 10 M II A4 1110 1511 It Zlil COl al14531 COIOII 7 1 AI AI AI 15 __ IS _ CAl ell iiiiii 1 a s I II II ...

Страница 517: ...en en I U a o o t en en I U a o o t l 2 0 a o a a 1 0 8 3 H LO O L o en CD o Cl a t 0 CD LLJ 0 0 f a ...

Страница 518: ... V V V 24 24 V V vee All iL 1 _ Va VO V DtI AI rL AI OIJ 10 V V 01 1 2 1 2 01 C60I V lJ 02 1 5 rL 1 3 D2 II V 1 01 11 13 D3 LEFT 1 4 rL A4 03 1 8 V 14 D4 3 3 1 5 RIGHT D4 14 r DIS 1 601 1 5 2 I l F i 2 AS 1 602 05 l AC DI A7 r l 1 1 06 c 01 A8 1 8 01 L 20 Cs At 1 9 Cs 20 21 Ci AI2 1 10 r 1 10 1 12 n II VSS All J All ss I t r D l t F H L L ...

Страница 519: ......

Страница 520: ...11 nte11 tVTROL Rr Gol It CL E MEO PI ve LC I CONTRc1l J TH II I AWI f FR lA1 00 NOT SCALE DRA r G DaAWM Ir D4n ii C aen u t Ii 1 1 ATARr 1 OUTSTANDING ECN 1 I EV AI IM lnS A_ Svn 1e c l1f O CotN VfI A V 1 CO C cen L f N Vi A N UIi L AUD J F vc SEP I iL PDi r BLOU D 11 G R 1 1 J ID MfG I __________ __________ L__ I 2 c B A ...

Страница 521: ... ...

Страница 522: ...players or a 46 for double line resolution players 3 There are four players and four missiles or five players if the four missiles are combined into one player Each of these has a horizontal position register that controls its horizontal position on the screen The registers and their locations are as follows ADDRESS HORIZONTAL POSITION OF 53248 Player 0 53249 Player 1 53250 Player 2 53251 Player 3...

Страница 523: ...tion players 6 The page number i e number of 256 byte sections of memory for the starting address of the P M information obtained in step 5 is poked into location 54279 7 Enable the P M DMA by a POKE 53277 3 8 The starting address of each player is obtained by multiplying the number obtained in step 6 by 256 and then adding the offset indicated in P M memory configuration table 9 The vertical posi...

Страница 524: ...GRAPHICS 8 Setup Mode 8 Playfield 2 POKE 559 62 Enable P M DMA single line 3 POKE 53248 120 Set horizontal position 4 POKE 704 88 Set color to pink 5 I PEEK 106 8 Get P M base address 6 POKE 54279 1 Store in base register 7 POKE 53277 3 Enable P M DMA 8 J I 256 1024 Get player starting address 9 POKE J 125 255 Draw player on screen POKE J 126 129 POKE J 127 129 POKE J 128 255 A 3 ...

Страница 525: ... Ml I MO 128 bytes per player V double line resolution Player 0 Player 1 Player 2 Player 3 256 bytes per player _ V single line resolution I 0 768 1024 1280 1536 1792 2048 t I I I I I I I I I I I I I I I I I I I I I PlAYER MISSILE Memory Configuration Absolute address determined by PMBASE Relative address shown along sides of maps Each Player Missile section 128 bytes in single line 256 bytes in d...

Страница 526: ...an lines in each mode line The display list describes the screen display from top to bottom A Display List must be built for the max RAM mode the graphi s mode that requires the most RAM then modified with POKES to mix the other modes with it This max RAM mode cannot be a s p 1 its c r e e n mod e t ext win dow the ref 0 r e ma x RAM mod e 1 6 mu s t be used If the max RAM mode will be at the top ...

Страница 527: ... 13 o 1 3 1 o 13 0 1 3 0 1 3 lJ I s 1 0 HJ I I 5 L IN t 5 Y OU 2 2 G 1 1 INt S 3 1 I I TOT L 192 CR N Mo OE II t e L I UE 2 lY flS f3 1T 1 STA T Lj MODE 1 i C 10 1I j ES 3 6 4 S 7 mODE 7 1 SG LI lE S Y bl b2 moDE 2 b 3 h L I lE C L f rUYr lP I EXAw LE 1 fr OC rlED MODE 7 Q SPLA I L S x I DEC yG I 1 0 HI rv G f b 6 j D 13 QS D J3 1 V D 13 GSo J3 C 7 7 7 7 41 S L O H IIG 192 B 2 ...

Страница 528: ...es line 1 6 8 48 7 56 2 112 2 2 16 32 192 TOTAL 3 If the max RAM mode is at the top of the screen then skip this step Calculate the LMS byte by setting the left nibble to 4 then use table 1 to find the right nibble for the graphics mode at the top of the screen example 1 left nibble 4 2 right nibble for mode 1 6 3 LMS byte 46 HEX 4 Calculate the mode byte for each mode Set the left nibble to 0 use...

Страница 529: ...en then skip this step Poke the LMS byte to location START I example POKE START l 70 9 Every mode line requires a mode byte in the Display List in the same order as the mode lines appear on the screen The mode bytes must be POKED into the Display List at location START offset where offset mode line U Example MODE LINE II POKE INSTRUCTION 2 POKE START 2 6 3 POKE START 3 6 MODE 1 4 POKE START 4 6 5 ...

Страница 530: ...LOT IN MIXED MODES 1 If the mode line s of a mode on the screen fall within the range of that mode s normal mode line s then use the following procedure a POKE 87 with the mode b Determine the Y coordinate by counting the of mode lines from the top of the screen to the current position c Determine the X position in the normal manner for that mode d Depending on the mode either PLOT and DRAWTO or P...

Страница 531: ...RPOS to position characters to be printed on the target line CHRPOS MEMST MI l R X2 R 20 M3 R I0 X Hhere X horizontal position of character on the target line R the RAM per line of the Max RAM Mode table 1 MI the Mode Line of the target line M2 the number of mode lines of 20 bytes of RAM per line above the target line M3 the number of mode lines of 10 bytes of RAM per line above the target line Ex...

Страница 532: ...II value of each character 3 POKE this value into CHRPOS ATASCII VALUE RANGE 0 31 32 95 96 127 128 159 160 223 224 255 OPERATION Value 64 Value 32 NONE Value 64 Value 32 NONE Example 1 assume we want to print the word TEXT in the mode 2 area of example 1 using the CHRPOS calculated previously 2 these characters are in the ATASCII VALUE RANGE of 32 95 3 the OPERATION for this range is Value 32 so 3...

Страница 533: ...9 2 4 2 I 4 10 CD 4 IGRAPHICI A 2 4 4 I 5 20 I I B 1 2 2 I 6 20 I MODES I C 1 1 2 I 20 I I D 1 I 2 4 I 7 40 CD 0 I I E 1 I 1 4 I 40 I I F I 1 1 I 8 40 BLANK 0 7 I I 0 BLANK I I JUMP 4 ISPECIALI 1 JUMP I I CD When the max RAM mode is not at the top of the screen the left nibble of the LMS byte must be changed to a 4 Left nibble for all mode bytes after the LMS byte o 0 Color Lum for the field is co...

Страница 534: ...MODES RAM REQUIREMENTS Mode 8 16 8138 Bytes 8 8112 7 16 4200 7 4190 6 16 2184 6 2174 5 16 1176 5 1174 4 16 696 4 694 3 16 432 3 434 2 16 420 2 424 1 16 672 1 674 0 992 These values include the display list and any imbedded unused memory blocks B 9 ...

Страница 535: ...racter 24 bytes DL map 200 bytes bit map 40 unused 160 160 bytes bytes text unused window 1 16 2 MEMORY CONFIGURATIONS 54 bytes DL 56 bytes DL I 400 480 bytes bytes bit bit 20 bytes DL 34 bytes DL 32 bytes DL map map 240 200 240 bytes bytes bytes bit bit bit map map map 80 bytes 40 unused unused 160 160 bytes 160 160 bytes 160 bytes text bytes text bytes unused window unused window unused 2 16 3 3...

Страница 536: ...NS FOR MODES 5 8 94bytesDL 96 unused 3200 bytes 94 bytes DL 104 bytes DL bit map 1600 1920 bytes bytes bit bit map map 640 bytes 320 unused unused 160 text 160 unused 160 text 6 6 16 7 1 0 Dytes UL 1r lU llJytes UL 80unused 80 unused 6400 7680 bytes bytes bit bit 104 bytes DL map map 96 unused 3840 bytes bit map 1280 bytes unused 16unused 16 unused 160 unused 160 text 160 unused 7 16 8 8 16 ...

Страница 537: ...und 5 Data Output 6 Ground 7 Command Controller Jack 2 3 4 6 7 8 9 1 Joystick Forward Input 2 Joystick Back Input 3 Joystick Left Input 4 Joystick Right Input 5 B Potentiometer Input 11 1 __ Composite Luminence 4 c oI Composi te Video 12 8 Motor Control 9 Proceed 10 5 Ready 11 Audio Input 12 12 volts 13 Interrupt 6 Trigger Input 7 5 volts 8 Ground 9 A Potentiometer Input C l ...

Отзывы: