13.07.2015 Views

Mountain Computer ROMPlus+ Operating Manual

Mountain Computer ROMPlus+ Operating Manual

Mountain Computer ROMPlus+ Operating Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table of ContentsiiiChapter 1INTRODUCTIONINSTALLATIONHARDWARE FEATURES1-1 General1-1 ROM Space1-2 RAM Space1-3 TTL Inputs1-3 Control ROMChapter 2USING ROMPLUS+2-1 Activating ROMPLUS+2-2 Commands2-3 CTRL-SHIFT-M2-3 CTRL-SHIFT-N2-4 Selecting RAMChapter 3ADVANCED PROGRAMMER'S INFORMATION3-1 The Control Word3-3 Control ROM3-5 The Branch Table3-6 Writing Your Own ROM3-6 'Programs On Two ROMsChapter 4REFERENCEApendix ACONTROL ROM SOURCE LISTINGA-1 General Information


INTRODUCTION<strong>Mountain</strong> Hardware's ROMPLUS+ is a powerful addition to your Apple11* computer. ROMPLUS+ has room for six of the 2316 type ROM's,or the 2716 EPROM. With each 2316 chip holding 2K bytes ofmemory, ROMPLUS+ has the capacity of 12K bytes of read onlymemory.Whether your applications of the Apple II are for business,education, research, or just fun, eventually you will discover aset of programs that you use constantly. Examples are specialperipheral drivers, utility routines, and data collectionprograms. You may access these programs on the ROMPLUS+ board assoon as you turn your Apple II on.Additionally, ROMPLUS+ provides 255 bytes of RAM which may beactivated or deactivated under program control. The on-boardcontrol ROM simplifies your program selection. You need onlytype a few keystrokes to run any program on ROMPLUS+. Thecontrol ROM relieves the burden of remembering many differentaddresses. ROMPLUS+ also has two TTL level inputs, and these areavailable for any user application. For example, an option on<strong>Mountain</strong> Hardware's Key'board Filter ROM uses one of these inputsto monitor the shift key on the Apple II's Keyboard.This manual is a user's manual for ROMPLUS+. In this manual, wecover installation, hardware features of ROMPLUS+, using theROMPLUS+, and writing your own PROMs.*Apple II is a trademark of Apple <strong>Computer</strong>, Cupertino, CA.i


INST ALL A TIONTo install ROMPLUS+ simply follow these Lnstructions:1. Turn off the power switch at the back of theApple II. The removal or insertion of any cardwith power on could cause severe damage to boththe computer and ROMPLUS+.2. Remove the cover from the Apple II by pullingup on the cover at the rear edge.3. Now choose an Apple II slot number. Slotnumber 0 should never be used as it is reservedfor Apple's language cards. In general,we recommend that you install ROMPLUS+ into aslot immediately below the disk controllercard. For example, if the disk is in slot #6,place ROMPLUS+ into slot #5. The only restrictionis that you may not place ROMPLUS+ intoslot number O.4. Plug ROMPLUS+ into the slot you have chosen.Make sure the board is firmly seated in thesocket.5. Replace the cover on your Apple II and turn onyour computer.ii


Chapter 1HARDWARE FEATURESTTL InputsA four pin connector on ROMPLUS+ provides two TTL level inputsand two ground pins. A matching four pin plug with wire isavailable from <strong>Mountain</strong> <strong>Computer</strong>. Order Part No. MHP-X021.Price $3.00.123 4r!tHJLeftRightPins 2 and 3 are grounded. Pins 1 and 4 are the TTL inputs. Theinputs are held high by pull-up resistors. Therefore, an unusedinput will be read as a high level, or a "1". The TTL inputs areread through the control word. Chapter 5 has more information onthe control word. Pin 1 on the connector maps to bit 4 of thecontrol word. Pin 4 on the connector maps to bit 5 of thecontrol word.Control ROMThe control ROM provides the "intelligence" which makes ROMPLUS+easy to use. It controls input and output functions and allowsfor easy ROM socket selection and entry point selection. Many ofits features are in the next chapter, Using ROMPLUS+.The control ROM occupies the memory address space $CNOO-$CNFF,where N is the slot number. The ROM is supplied with powerwhenever it is addressed. This results in a power-saving.1-3


Chapter 2USING ROMPLUS+This chapter covers the basic information you need for typicaloperation of ROMPLUS+. This chapter should be read carefully.We will cover such topics as selecting ROMPLUS+, activating RAM,ROM socket selection, and entry-point selection.Activating ROMPLUS+ROMPLUS+ is a peripheral that is activated in the same manner asother Apple II peripherals. From BASIC, ROMPLUS+ is turned on bya "INln" or "PRln" command, where n is the slot number. Fromthe moni tor, a "nCTRL-K" or "nCTRL-P" command will turn onROMPLUS+. If you are running BASIC under DOS, use the regularDOS procedure of printing a CTRL-D followed by the command.Whenever the board is activated, the RAM is also activated.The board is deactivated by using both the "INIO" and "PRIO"commands. Hi t ting the "RESET" key w ilTalso deacti va te ROMPLUS+.If another peripheral card is accessed via the "INln" or "PRln"commands, ROMPLUS+ will be deactivated. Of course, any referenceto address $CFFF will deactivate ROMPLUS+ (or any otherperipheral board).Once ROMPLUS+ has been activated, all input and output operationsare vectored through the control ROM. This is transparent to theuser, i.e., nothing seems different. However, the control ROM islooking for one of two special command characters. If thecharacter passed on input or output is not a special commandcharacter, it is passed to the input or output routine. If thecharacter is a command, then the next two characters areinterpreted as parameters of the command.2-1


Chapter 2USING ROMPLUS+CommandsThe two command characters are CTRL-SHIFT-M and CTRL-SHIFT-N(ASCII codes $9D and $9E respectively). You may obtain thesecharacters by pressing the CONTROL, SHIFT, and letter keyssimultaneously. These characters were chosen to minimize typingaccidents.The syntax of the commands are:CT'RL-SHIFT-M.CTRL-SHIFT-N.There are no spaces between the command character, the ROM socket#, and the entry pOint. The brackets are not entered. No returnis necessary after the command. Notice the command is threecharacters long.ROM socket number is a value from 0 to 6 which specifies whichROM socket you want to select. Only one ROM socket is active atone time, but one ROM socket may call another ROM socket.Selecting chip number 0 will deactivate the current ROM socketwithout deactivating ROMPLUS+. If an invalid ROM socket isselected, the "bell" will beep.Entry point is a letter, starting with A, and ending with aletter depending on the particular ROM chip selected. The numberof entry points on .any ROM is determined by information on thatparticular ROM. The first entry point is always "A", the secondentry point is "B", and so on. If an illegal entry point isspec i f i ed, the bell wi 11 beep. The documenta t ion accompanyingany commercially available ROM for ROMPLUS+ will detail the validentry points of that ROM. If you write your own ROM, you willplace a table of entry points on the ROM. The number of entrypoints determines the valid entry point characters. Moreinformation on writing your own ROM chips is in the nextchapter.2-2


Chapter 2USING ROMPLUS+CTRL-SHIFT-MThis command selects one of the two operating modes of ROMPLUS+.The CTRL-SHIFT-M command will let the selected ROM gain controlevery time a character is inputed or outputed. When this commandis issued, all subsequent input and output is vectored throughtwo hooks which are located on the selected ROM.Recall that when ROMPLUS+ is activated, the input and output isvectored through the control ROM. This means that when acharacter is input, a call is placed to the control ROM whichcalls the input driver. The control-ROM inspects this characterand then passes it along to the program requesting input.Similarly, on output of a character, a call is placed to thecontrol ROM, which inspects the character and then calls theoutput driver. Whenever ROMPLUS+ is not active, input and outputare not vectored through the control ROM.- Instead, they arevectored to the normal input and output drivers of the Apple.When the CTRL-SHIFT-M command is given, the input and output arenow vectored through the input and output hooks on the selectedROM. Normally, these input and output hooks point to locationswithin the selected ROM. More information about the hooks is inthe next chapter.In general, all of the hooks and vectors are transparent to theuser. When ROMPLUS+ is deactivated, 1/0 vectors through thenormal Apple II 1/0 drivers. When ROMPLUS+ is active, 1/0 isvectored through the control ROM. When a CTRL-SHIFT-M command isgi ven, all subsequent 1/0 is vectored through the selected ROMs'1/0 hooks. The ROMs' 1/0 hooks are located in the branch table.More information about the branch table is in the next chapter.The net effect of the CTRL-SHIFT-M command is that the selectedROM gains control on every input or output character. Thiscontinues until ROMPLUS+ is deactivated, or the particular ROM isdeactivated. Examples of the type of program which use this modeof operation are printer drivers, or <strong>Mountain</strong> Hardware's KeyboardFilter. These programs need to execute with every input oroutput operation.CTRL-SHIFT-NThis command selects one of two operating modes of ROMPLUS+. TheCTRL-SHIFT-N command will pass control to the selected ROMprogram. This program is executed immediately and then controlreturns. If this command was printed as part of a BASIC program,then control returns to BASIC. If this command was enteredimmediately from the keyboard, then control returns to thekeyboard.2-3


Chapter 2USING ROMPLUS+A program executed by the CTRL-SHIFT-N command in one ROM mayexecute another ROMPLUS+ program in another ROM by outputtinganothr CTRL-SHIFT-N command. However, a program executed by theCTRL-SHIFT-N command may not output a CTRL-SHIFT-M command. Inthe former case, the control ROM keeps track of control. In thelater case, the control ROM keeps track of control. In the latercase, we have a situation which is logically meaningless. Itdoes not make sense to have a routine type of program calling aspecial driver type program.It does make sense however, to have a driver type program(activated by CTRL-SHIFT-M) call upon a routine type program(CTRL-SHIFT-N). For example, a program such as Keyboard Filtermight call upon a routine on another ROM. It would output aCTRL-SHIFT-N command. The control ROM keeps track of the ca11ingROM and the called ROM. It returns control to the calling ROMwhen the called ROM returns.Selecting RAMAny time ROMPLUS+ is activated, or any ROM is activated via theCTRL-SHIFT-M or CTRL-SHIFT-N commands, the on-board RAM isactivated. Whenever this RAM is active, the top 256 bytes of theselected ROM are not available. If your program uses the top 256bytes of the ROM, you must deactivate the RAM before the code isexecuted. Otherwise, the computer will read the contents of RAMand interpret that data as instructions. This usually results indisaster. It is necessary to reactivate RAM before returningcontrol. The next chapter contains a few rout ines used for controllingthe state of the RAM.NotesThe control ROM on ROMPLUS+ makes use of two locations in memorynormally used by the monitor. These two locations are $3A and$3B. As a result, whenever ROMPLUS+ is active, the monitor "L"command for disassembly and the Apple II mini~assembler will notwork properly. To restore these commands, deactivate ROMPLUS+.The Apple II peripheral scheme states that all ROM's in the$C800-$CFFF space must be de-selected whenever $CFFF isreferenced. Therefore, take care that your programs neverreference location $CFFF.2-4


Chapter 3ADVANCED PROGRAMMER'S INFORMATIONThis chapter contains information for the advanced use ofROMPLUS+. The sections about the control word and the controlROM should be read by anyone using ROMPLUS+. The other sectionsabout the branch table, preparing your ROM, and programs greaterthan 2K bytes are intended for the user that will prepare theirown ROM chip for use in ROMPLUS+. However, anyone using ROMPLUS+will benefit from the information in those sections.The Control WordThe features of ROMPLUS+ are controlled by the control word. Thecontrol word is a read/write word located at a slot dependentmemory address. The address of the control ~ord is $C080+$NO (or-16256+l6*N from BASIC), where N is equal to the slot number.The following table summarizes:Slot II Hex Address BASIC Address---1 $C090 -162402 $COAO -162243 $COBO -162084 $COCO -161925 $CODO -161766 $COEO -161607 $COFO -16144A write to the controlsocket, activate ordeactivate the RAM.described below:word location may be used to select a ROMdeactivate the board, or activate orThe function of the particular bits arecontrol wordBit 7:Bit 6-4:Bit 3:This bit controls the RAM. If a "0" is written,the RAM is deactivated. If a "1" is written,the RAM is activated.Unused.This bi t controls the board. If a "0" iswritten, the ROMPLUS+ is deactivated. If a "1"is written, the board is activated.3-1


Chapter 3ADVANCED PROGRAMMERS INFORMATIONBit 2-0: These bits select the ROM socket to be enabled.Bit two is the most significant bit of thevalue. If the value=O, then none of the ROMsare enabled. If set from 1 t~6, the correspondingROM is enabled. The value should neverequal 7.A read to the control word is used to check the status of theRAM, find the currently enabled ROM socket number, or to sensethe value of the two TTL inputs. The function of the particularbits are described below.control wordBit 7:Bit 6 :Bit 5 :Bit 4 :Bit 3 :Bit 2-0 :This bit reads the status of RAM. If equal to"0", then RAM is deactivated. If equal to "1",then RAM is active.Unused.TTL input from pin 4.TTL input from pin 1.Unused.These bits indicate which Rom socket is currentlyenabled. The value is determined the sameway as the bits 2-0 of the written control word.We next examine several programming examples of control word use.First, if we wish to activate ROMPLUS+ and select ROM socketnumber one, we use these machine language instructions:LDA #$89STA $C080,X:RAM active, board active, ROM #1:Write control wordIn that example, and in the examples to follow, we assume thatthe X register contains the slot number (1-7) multiplied by 16.This is the standard convention for slot independent 1/0 on AppleII.To do the same thing in BASIC, we use a statement like this:POKE -16256+16*SLOT,1373-2


Chapter 3ADVANCED PROGRAMMERS INFORMATIONNow suppose you wish to activate ROMPLUS+, deactivate the RAM,and select ROM #5. You would do one of the following:LDA #$OD:Deactivate RAM, activate ROMPLUS+, selectROM #5.STA $COSO,X :Write control wordor POKE -16256+16*SLOT,13If you wish to toggle the state of the RAM (i.e., turn off whenit is on and turn on when it is off), you would use this code:LDAEORORASTA$COSO,X :Read control word#$SO#$SO$COSO,X :Write control wordFrom BASIC, use these statements:S=(PEEK(-16256+16*SLOT)+12S)MOD 256IF S MOD 16


Chapter 3ADVANCED PROGRAMMERS INFOR~ATIONThe control ROM uses two bytes of memory in the zero page. Thesetwo locations are $3A and $3B. These two locations were chosento take advantage of the monitor indirect jump at $FEBC. The useof the two page zero memory locations ($3A & $3B) causes a memoryconflict with two of the monitor's commands. As mentionederlier, when ROMPLUS+ is activated, the mini-assembler and thedisassembler will not work.Additionally, the control ROM uses seven bytes in the screenspace. These locations are slot dependent, and they aresummarized in the following table.S:t:mbolic NameCHIPMODEWHICHB:t:te Location$478+SLOT#$4F8+Slot#$578+Slot#UsageContains active ROM socket #for CTRL~SHIFT-M commandsUsed to parse commandsUsed to hold the entry pointletterCUR CHIP$5F8+Slot#Contains number of most recentlyused ROM socketTCHIPSOMSLOT $7F8$678+Slot#$6F8+SlotilA scratch locationContains the value# * 16)(SlotContains the value ($CNwhere N=Slot#)The control ROM has three entry points. Assuming that N = Slotnumber, the entry points are:$CNOO$CN06Initial entry point, used when ROMPLUS+ isactivated. It will initialize variablesand IIO hooks.Output entry point.a character.Vector here to output$CN08Input entry point. Vector here to input acharacter.3-4


Chapter 3ADVANCED PROGRAMMERS INFORMATIONThe Branch TableEvery ROM tha tis to be usedat the beginning of the ROM.select an entry point intodes i gna te the entry po i n t.follows:Address$C800$C802$C804$C805$C807$C805+(2*(n-1))on ROMPLUS+ must have a branch tableThe branch table allows the user tothe ROM by using just a letter toA summary of the branch table is asAddress of output hook routineAddress of input hook routineValue which indicates length of BranchtableAddress for entry point #1Address for entry point #2Address for entry point #nAll of the addresses are 2 bytes long, with the low order bytefirst. All branch tables must have at least one entry point.With only one entry point, the branch table would end at $C806and the value of the byte at $C804 would be $07. The valuecontained at $C804 is the total number of bytes in the branchtable. Therefore, if there are "N" entry point address, thevalue of $C804 is (2*N+5).The input and output hook address ($C800 and $C802) are used bythe CTRL-SHIFT-M command. $C800 contains the address of theroutine to be called every time a character is to be outputed.This output hook address is usually the address of a routine onthat particular ROM. $C802 contains the address of the routineon a particular ROM to be called every time a character is to beinputted. All character 1/0 routines should end with a returnfrom subroutine instruction. If the ROM that you write does notuse the CTRL-SHIFT-M command, then these 1/0 hooks will not pOintto a routine on the ROM. Instead, you should use the addressesof the standard Apple 1/0 drivers. The output hook, $C800,should contain the address $FDFO, with the low oder byte first.Likewise, the input hook, $C802, should contain the address$ F D 1 B. Th e s e I I 0 h 00 k son the ROM m u s t a I way s poi n t to val i d I I 0routine addresses.The branch table is the only requirement for ROM's. Theapplication program's code may begin immediately after the branchtable.3-5


Chapter 3ADVANCED PROGRAMMERS INFORMATIONWriting Your Own ROMThere are a few things you should remember when writing your ownROMs. First, your program should never reference location $CFFF.Any reference to that address will disable all memory that mapsinto $C800-$CFFF. If you do reference that address, you willdisable ROMPLUS+.The slot number of ROMPLUS+ may be found by your program byreading $7F8. It will contain the value $CN where N is the slotnumber. Location $6F8+N contains the value $NO.The control ROM makes sure that RAM is active whenever a ROMsocket is selected. If your program must deactivate the RAM, itmust reactivate RAM before it finishes executing.Programs On Two ROMsThe 2K bytes of storage on each ROM is large enough for all butthe larger programs. If you have an application program that islarger than 2K bytes, there is a scheme allowing you to use twoROMs in conjunction.ROMPLUS+ will map anyone of the six ROMs into the $C800-$CFFFaddress space at one time~ If you simply had the first ROM writea con t r 0 1 w 0 r d w h.i c h s wit c h est heR OMs 0 c k e t n u m be r tot hen e wROM socket number, your program will immediately swi tch to theother ROM. This usually blows up the program.One solution to this problem is to write a subroutine dispatchingsubroutine, and place this subroutine into identical addresses onthe two ROMs. This way, you enter the subroutine dispatchingsubroutine on the first ROM, the switching of ROM occurs, and thedispatching routine continues on the second ROM, because theidentical addresses contain identical code.Here is the code which will do the task:*The A register contains the ROM socket number*you wish to use. The Y register contains a*value which determines which routine is run (routine*number *2). You must preserve the X register.MSLOTCONTROLCHIPNUMSUBADDREQUEQUEQUEQU$7F8$C080$0$13-6


Chapter 3ADVANCED PROGRAMMERS INFORMATIONCHIPCALLSTALDXLDATAXLDAORAPHAANDORASTACHIPNUMMSLOT$638,XCONTROL,X11$08II$F8CHIPNUMCONTROL,XAt this point, we are now on the other ROM.specified by Y.CALLSUBSUBTABLELDASTALDASTAJSRPLASTARTSJMPDADAIt is necessary for thisaddresses on the two ROMs.may be located anywherepossible memory conflicts.of $1 and $2.SUBTABLE,XSUBADDRSUBTABLE+1,ySUBADDR+1CALLSUBCONTROL,X(SUBADDR)SUB1StJB2:save ROM number:get $CN:get $NO:x contains value $NO:get control word:turn on activate bit 3:save so we can restorelater:set ROM number to zero:or in new ROM number:write to control wordCall routine:get low byte of address:and store here:get high byte of address:and store here:indirect subroutine call:return, get old state:restore old ROM:return out of this routine:indirect jump to routine:table of routine addresses:low byte first, high bytesecondroutine to be located at identicalOtherwise it will not work~-SUBADDRin memory as long as there are noWe recommend the page zero addressesThe program "CHIPCALLw is a subroutine, and should be called withthe "JSR" instruction. Before you call the subroutine, set upthe "A" and "Y" registers. The value of the X register must bepreserved.3-7


Chapter 4REFERENCEThis chapter is a concise description of the hardware andsoftware of ROMPLUS+. It is intended to serve as a referencesection only.The hardware features of ROMPLUS+ are:1. Sockets for six 2K ROMs (2316) or EPROMs (2716).Total ROM capacity is 12K bytes. ROM is selected bysoftware.2. 256 bytes of RAM which can be enabled or disabled undersoftware control.3. Two TTL levels inputs which are held high by pull-upresistors. The inputs are read from the control word.4. A 256 byte control ROM which controls the operation ofROMPLUS+.The software features of ROMPLUS+ are summarized below:1. ROMPLUS+ is activated by the "INfln" or "PRfln" commandsfrom BASIC. ROMPLUS+ is deactivated by both "INfln"and "PRfln" commands, or by RESET, or SY--referencinglocation $CFFF.2. There are two modes of operation available.modes are selected by these commands:Thesea) CTRL-SHIFT-M: This mode will run the selected ROMprogram every time a character isinputted or outputted.b) CTRL-SHIFT-N: This mode will run the selected ROMprogram immediately, and thenreturn control to the calling program.3. The command structure is:CTRL-SHIFT-MCTRL-SHIFT-NThe "CTRL-SHIFT-letter" character is typed by holdingdown the CONTROL and SHIFT keys while typing either "M"0r "N". is a value from 0 to 6, and selects4-1


Chapter 4REFERENCEa ROM socket. ROM socket zero will disable all theROMs without disabling ROMPLUS+. is acharacter used to select the entry point into the ROM.All ROMs must have at least one entry point. Entrypoint A is the first entry point, B is the second entrypoint, etc.4.There are no spaces between the command character,the Ram socket number, and the entry point character.The brackets are not typed.RAM is enabled and disabled by bit 7 of the controlwor'd. The top 256 bytes of any selected ROM is notavailable when RAM is enabled. If RAM is disabled byany ROM, then it must be enabled before the ROMreturns.4-2


Appendix ACONTROL ROM SOURCE LISTING1 PPT ON2 :f;,f;******;+;**;~;*******;"'*************4 :+:5 :+: CONTROL PFWt'l FOr::: ~10UNTA I N6 * HARN~AF:E ROM BOARO7 :+:8 B'r' AND'T' HERTZFElD9 :+;10 :+:


Appendix ACONTROL ROM SOURCE LISTING48*'49*'50*'WE USE 3 DIFFERENT ENTRY51*'POINTS: "FIRST", FOR THE52*'INITIAL ENTRY AND "0ENTR'r'"5~. -' *'AND "IENTRY" FOR THE OUTPUT54*'AND INPUT RE-ENTRIES. THE55*'C AND V BITS ARE USED TO56*'REMEMBER WHICH ENTR'T' OCCUR ED.co"",-_, i*'6300: 2C 58 FF 58 FIRST BIT 10RTS SET ',/FLAG FOR INITIAL ENTRY6303: 38 59 SEC .. MAKE INITIAL ErHI':'T' OUTPUT6304: 70 04 60 BVS ENTF.:'r' AU~A'r'S TAKEN6306: 38 61 OENTR'T' SEC6307: 90 62 HD~ 90 mrCK TO SAVE A B'iTE6308: 18 63 I ENTRY CLC j HIDE A'- ::.' BRANCH OFFSET6309: B8 64 CLV6566*'*COMMON ENTF.:'!' POINT67 :+:630A: 48 68 ENTR'T' PHA630B: SA 69 TXAG30C: 48 70 PHA630(): 98 71 TVA630E: 48 7;;-! PHA630F: 08 73 PHP74 :+:75 :+: Nm~ ~,jE MUST FIND OUT WHAT SLOT76 :+: i4E "I


Appendix ACONTROL ROM SOURCE LISTING612E:612F:6110:6132:6315:6337:6139:633B:633D:633F:6341:6343:6346:10110410510628 10708 10850 16 109110111112113114115116AD F8 07 11785 37 11885 39 119A9 06 12085 36 121A9 08 12285 38 123A9 00 1249D B8 03 125F0 35 126:+::+: NOW RECOVER STATUS AND GO TO:+: THE PROPER ROUTINE ACCORDINGL'T':+:PLP j ~'E-ENABLE INTERRUPTSPHP .; SAVE STATUSBVC REENTRY:+::+: THE FOLLOWING CODE IS FOR THE:+: INITIAL ENTRY ONTO THE BOARD.:+: 1·IE INITIALIZE OUR VARIABLES:+: ANO SET THE HOOKS TO POINT TO:+: THE RE-HHR'r' POINT.:+:INIT L[.lA MSLOTSTA CSW+15TA CS~J+JLOA #(OENTR',-'5TA CSWL['A #< I ENT":',-'STA CSW+2LDA #$00STA CHIP,. XSEQ RESET AUIA'T'S TAKEN127 :+:128 :+:129 :+: 14E CO~lE HERE FOR A RE-ENTRY.1::::;0 :+: [·JE CHECt~ FOR COMMANDS JUST1


Appendix ACONTROL ROM SOURCE LISTING15::: :+:6356: 98 159 COMMAND TYA6357: BC 38 1214 16121 lDY MODE .. X635A: 1121 eF 161 BMI GETNIJM635C: D0 29 162 BNE GETINIT163 :+:635E: C9 90 164 CMP #CTlA636121: Fe 1214 165 BEQ SAVEMO[)E6362: C9 9E 166 CMP #CTlB6364: DO 41 167 BNE VECTOR6366: 9D 38 1214 168 SAVE MODE STA MODEJX6369: Fe 3C 169 BEG! '·lECTOR AU·1A'T'S TAKEN17121171 '"PARSE THE NUr1BER .. CHECKING TO172 '"" ;+: MA!


Appendix ACONTROL ROM SOURCE LISTING63A7:63A8:63AB:63AE:63AF:63B2:63B5:63B7:63BA:63BB:63BE:63C1:63C4:21321421521621721821928 220BC 38 06 221B9 80 C0 22248 223AD FF CF 224BD 38 05 22509 88 22699 80 C0 22768 2288D 02 CF 2298C 03 CF 230BD 38 05 231D0 0E 232THE FOLLOWING ROUTINE HANDLESTHE VECTORING TO CHIP 1/0 HOOKS* FIRST WE ENABLE THE SELECTED CHIP.*VECTOR PLP j RECOVER STATUSLDY S0,XLDA CONTROL, 'y'PHALDALDA$CFFF [) I SABLE OTHER I':ot'lSCURCH I P, >


Appendix ACONTROL ROM SOURCE LISTING263 *63E6: 68 264 EXIT63E7: A8 ~6563E8: 68 26663E9: AA 26763EA: 68 26863EB: 20 BC FE 269270 *63EE: 48 27163EF: 98 27263F0: 48 27363F1: AC 03 CF 27463F4: AD 02 CF 27563F7: 09 08 27663F9: 99 80 C0 27763FC: 68 27863FD: R8 27963FE: 6S 28063FF: 60 281260 '"261 * NOW l~E RESTORE REGISTERS AND GOTO262 * THE HOOK ROUT I NE.282 *283 *284 *285 *--- END ASSEMBLY --­TOTAL ERRORS: 00256 BYTES OF OBJECT CODEWERE GENERATED THIS ASSEMBLY.PLATAYPLATAXPLAJSRPHATYAPHALDYLDAORASTAPLATAYPLARTSALL DONE~GOVECTOR$CF03$CF02#$08CONTROL,VA-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!