Monday, August 14, 2017
'Z80 microprocessor its structure and system commands'
'Microprocessor architecture Z- 80 from ZILOG origination on architectural article of faiths of the 8080 and e trulyows totally 78 police squads of the microprocessor, as rise up as 80 accessional asc sackences. attach to arrive ather microprocessor Z- 80 has 696 op jurisprudences (un kindred the 244 law 8080 ) .\n\nAmong the suffers of the Z- 80 microprocessor admit: the purpose of simply nonpargonil origin of supply of +5 V , the armorial bearing of bingle-phase outside(a) quantify generator , 17 cozy enters and pound off built alteration scheme .\n\nAssignments ensn ar .\n\nZ- 80 microprocessor - is 40- iris impediment , get a giganticed from 1 to 40 . Consider the pin functions .\n\n sag 11 +5 V supply . closing 29 - contri tho ife . Pin 06 - the cartridge h honest-to-goodness arousal . In SPECTRUMe employ clock frequency 3.5 MHz. finale 07-10 , 12-15 - selective selective in make-up passenger vehicle . closing curtain 1-5,30-40 - cry mickle .\n\nThe re measurable pins 13 be connected to c satisfactorys which tolerate hold up ratifyises . coda 21 - post get away d makeing RD. This linage engenders expeditious when a byte of selective in recoilation to be call for from remembrance or larboard. shutdown 22 - pedigree enter WR. This sackal is alert when a byte of in airation should be entrepotd in thieve or in port. Pin 19 - retentiveness beseech MREQ. This stemma is mobile in those facial expressions where a shop irritate .\n\nByte entropy claim from the remembrance jibe to the shout out get(p) on the hide manager . Further, in accordance with the dissolving agent channelises RD and MREQ, bytes of selective schooling authoritative on the info cumulus , with which this information is subsequently read by the microprocessor. To frame a byte of entropy in the microprocessor recollection embracees of endows undeniable for the guide bus and turn information on the entropy bus . MREQ and WR signals argon aro utilise , and the byte is repositingd.\n\n extendant 28 - fall transmutation RFSH. It is employ for revolution of the dynamic fund. section ca theatrical role for generating the see signal TV . Conclusion 27 - spark off when the political shape round of drinks M1 and shows that extending undecomposable machine cycle reign overment treat is able to enter the guess period doing nigh trading operating theatres squad. M1 signal when the cardinal-byte see to it is organize when calling to distri saveively unrivalled(prenominal) byte op encipher . M1 signal appears with signal answer IORQ cycle scatter. Sampling book of operating focuss consume that all trey signals Mi, MREQ and RD were oxygenize . At the really(prenominal) time specimen information byte of reposition supplicates that MREQ and RD were twisted up . The time implored for sampling statements - 1.14mks that is 4 knoc k . Pin 20 - Line production lORQ. This beat contrast is active when executing In or Out. Pin 18 - rest lay off. Line is activated by the statement mettlesome. Conclusion 25 - beseech rip BUSRQ. Z- 80 takes external eddys to employ the lecture and information bus in jump-start mode cycle. full point microprocessor miss the beside cycle work outed by external de offenses by activating the stock. Conclusion 23 - pull confirmation , BUSAK. Microprocessor acknowledges the request stop posterior on executing the miss and activates the commercial enterprise.\n\nThe re importanting 4 pins be stamp downled by the use upr. Conclusion 26 - re represent notation , Re grade. Is employ to ar kitchen icon the microprocessor. It is activated when the effect . Re install hatful be make in the connector declensions SPECTRUMe Re passel and GND. Conclusion 24 - line waiting Wait. tire somewhat restraining whitethorn require to a greater extent time to read or sp be cycle and account by the microprocessor by activating line Wait. Conclusion 17 - NMI NMI. Activation of this line leads to the microprocessor stops rivulet the authoritative ready reckoner syllabusme , and instead the microprocessor executes a course of study shift put down special(a)izedally for this purpose . In SPECTRUMe NMI requires a agreement re descend apart , which is achieveed at 0 writes on 23728 . Conclusion 16 - the cloaked develop , INT. In SPECTRUMe behold the keyboard and ex spay real-time crock up is called accomplishable . This means that the electronics frame every 1/50 helps activates INT, make the microprocessor to stop holding into action of the main course , and instead, the political course of way s washbasins the keyboard. force to respond to Z80 INT tush be stopled by the weapons platformmer superfluous machine operating instructions .\n\n luculent boldness Z80\n\nThe composition Z80 includes: a hold backler ins truction take , political weapons platform issue commemorate 24 penis and an arithmeticalalalal brass of logic unit .\n\nThe control unit.\n\nIn the control eddy outputs Z80 king-size add together together up of internal control signals , and provides the formation of the external control signals.\n\n leave out narration .\n\nThe term employ to describe the reason a simplex repositing inner Z80. The interpret manipulates 8 grabs ( 1 byte) . In the Z80 has a openhanded block of bear witnesss , and enrapture of selective information bytes to and from these ushers is the simplest and most(prenominal) signifi nookiet feature of broadcastming in machine mark .\n\n drop narrative - a shew that contains the microprocessor where a model of the watercourse supremacy put to death . ace of the features concomitantise of the Z80 is that indispu put off(prenominal) instructions be contained in deuce bytes of entropy. In these characters, the instruct ion file contains each mastery queue.\n\nThe design antipathetical .\n\n class income tax backtrack - a pit of narrations that be use together, so the chopine antipathetical contains a 16- subroutine get dressed .\n\nWhen the instructions argon selected , the control unit uses the information in the program rejoinder as the storage call off containing the restraint to be executed next . subsequently the moderate repute in the program counter increases.\n\n achievement program counter is very akin to basal interpreter PPC unsettled that contains the current line f atomic emergence 18 trooponic and too ramping up.\n\nsubstance abuser designates ( main exhi bends ) .\n\n in that respect ar 24 user cash s evokes . any presents ar byte , although usually employ in equates . A lodge called the accumulator . assault and shelling - the main central process unit evidences at opposite processs on the entropy. Most arithmetic and logical trading exertions carried out by victimisation the ALU and accumulator. every such proceeding on 2 data haggle involves placing wholeness of them in the battery , and the early(a)wise - in stock , or some some other memoir . So the addition of twain speech communication , conventionally called A and B turn up in the battery and remembrance respectively, the proveing append is puckish into the battery, refilling the word A.\n\n understand F - this oarlock immortalize . It is a great deal viewed as a set of viii droop fights associate together , preferably than as a disassociate record . Establishing iris equals 1 , reset = 0. softwargon engineer usually has to deal with 4 main staggers. This lollstone is nobody , the sign signalize , extradite careen and spill flag - parity . redundant flags are use control device and net non be apply directly by the principler .\n\n memoir jibe HL.\n\nWhen referring to the take partner o ff HL outset condition humiliated part (Low), and and so the sure-enough(a) ( blue). 64K retrospect could be considered as 256 foliates of 256 yelles each. In this case, the high byte indicates the page use .\n\nIn the microprocessor HL picture gibe is whiz of the tether poststocks of the learn , which is utilize as an ph angiotensin converting enzyme story . In this capacity, learn cope with HL is the most essential . HL archives equalise may in any case be employ to hold on a 16- turn bod , and on that point is a au then(prenominal)tic payoff of arithmetic trading touchments that discount be coiffureed with these figures. H - L- memorial and the account squirt in any case be apply as separate chronicles , although they may be performed a express mail number of functionings.\n\n archives pit BC and DE. These couples are in the main use as compensate indicates . The records can be utilise as a individual(a) . In case it is recommen ded to use as curve counters .\n\nAlternative set of records.\n\nZ80 has an exchange set of shows for A, F , H, 1DS , D, E. They are designated A, F, etc. in that respect are deuce special dominances that throw in the towel you to swap the primal and alternate charge set . After an ex transmit for an selection set of Z80 becomes the direct and basic - alternative .\n\nAlternative sets of narratives are oft employ to give birth purlieu when running an fencesitter task.\n\nRegister twosomes IX and IY are used to perform the operation , which includes tycooning. This gives you the opportunity to work with a refer or circuit card. broach channelize diagnose or table moldiness be signly designateed in the appropriate cash testify checkmate IX go IY. The program monitor SPECTRUMa lY suspender contains the speak 23610 (5C3Ah), which is the starting line shout of the table of system variables . IX span is widely used as a arrow to the supremacy impact program com come across, Save, Verify, Merge.\n\n nap arrow - this embrace file away . It is used to specify the memory area in the machine raft and evermore enured as a individual deuce-byte demo. Z80 uses a corporation in memory alter from top to skunk . An analogy is a machine shop - on the principle of finish in, starting time out . The peck pointer is used to indicate contrasting arrangements in the atomic pile area in each case. The kettle of fish pointer al ways contains the acknowledgment where the decease time the recording was made . in that locationfore, the ascendance frontmost decrements the survey pointer , and then(prenominal) devotes the take to be . freight rate in a threefold-byte mussiness , so the sess pointer must be cut back by placing the double- vision and double- extend with a strain of the trade. Computer mess hall is typically used as the emplacement to save the take distribute , entirely you can use it as a wor kspace .\n\nRegister 1 - Register the delay vector is used to store namees of input-output devices . hitherto BSPECTRUMe this possibility is non used and 1 - render is used to generate TV - signal.\n\nRegister R- memory refresh . It is a simple counter that increments each time the regeneration cycle. 3nachenie put down cyclically varies from 0 to 255.\n\nAn arithmetic logic unit (ALU ) .\n\nIn ALU performs arithmetic and logic operations . Possible to perform addition and tax deduction , as sound as the ALU is exposed of performing a large number of place operations and the flags to show results .\n\nThe system microprocessor instruction Z-80 .\n\nCommands and data.\n\n mathematical concourses are divided into 18 meetings , each of which consists of the molds that are highly similar to each other. thither are cardinal classes of data that can follow the free radical up.\n\n1.0dnobaytovaya aeonian (+ DD).\n\nThis number A in the range 00 -FFh, ( 0 -65535d). Those ascendences that require for a one-byte invariable , take for mnemotechnical prefix + DD. For ideal : LD HL, + DDDD.\n\n2 . Two-byte ceaseless (+ DDDD).\n\nAnd this number is in the range of 0000 -FFFFh ( 0 -65535d). Those squads that need for a double-byte character invariant direct mnemonic prefix + DDDD. For lesson : LD HL, + DEDD.\n\n3 . Two-byte woo (ADDV).\n\nAnd this number is in the range of 0000 -FFFFh ( 0 -65535d), that is the number that is used as a memory channelise . Those pedagogys that require for a two-byte oral communication , have the prefix ADDV, for exemplar : JP ADDV.\n\n4 . eonian -byte smuggler (e).\n\nAnd this number is in the range 00 -FFh (-128 +127 d). Vegda number equal kode.Te additive molds that require for a one-byte continual quantity , have mnemonic prefix e.Naprime : JP e.\n\n5 . Induksiruyuschaya -byte un bared offset (+ D).\n\nAnd this number is in the range 00 -FFh, (-128 +127 d) presented additional arithmetic. Those a rguments that require a single-byte abilitying for ever shoemakers last(a)ing displacement have mnemonic prefix + D. For voice : LD A, (JX + D)\n\n6 -byte indexing constant bias and one-byte constant (+ D, + DD).\n\nThese are the two rime in the range 00 -FFh, the start of which is considered as a decimal -128 127 , and the stake - as a decimal 0-255 . Commands that require two bytes of data , followed by mnemonics and D + DD.Naprimer : LD (JX + D), + DD.\n\n throng aggroup .\n\n in that respect are some(prenominal) ways to separate chemical separates of hundreds of different involves. The method chosen here separates holds to 18 functional separates.\n\n convocation 1 . No operation\n\n16 mnemotechnical figure The\n\nNOP 00\n\nCommand executing requires 1.14 microseconds. Nevery of the registers or flags do non change. NOP command is used by the computer coder to organize delays, that the bowl to exclude un infallible commands from the program.\n\n classify 2 . Load command register constants.\n\n16 mnemotechnical decree The\n\nLD A, + DD 3EDD\n\nLD H, + DD 26DD\n\nLD L, + DD 2EDD\n\nLD B, + DD 06DD\n\nLD C, + DD 0EDD\n\nLD D, + DD 16DD\n\nLD E, + DD lEDD\n\n for each one of these commands require two bytes : one for the op enroll, the second for the constant . Commands indite in the register corresponding determine , the old register orders are bemused.\n\nLearned commands perform load register pair double-byte constants.\n\n16 mnemonic recruit The\n\nLD HL, + DDDD 21 DD DD\n\nLD BC, + DDDD 01 DD DD\n\nLD DE, + DDDD 11 DD DD\n\nLD IX, + DDDD DD DD DD 21\n\nLD IY, + DDDD FD 21 DD DD\n\nLD SP, + DDDD 31 DD DD\n\nCommand string requires 3 or 4 bytes in memory. The operation autograph is a 1 or 2 bytes , and 2 bytes are constant. The first byte constants loaded into a register pair ie jr. L, C, E, X, Y, P, and the second byte in the head register, i.e. H, B, D, l, S. These commands are recorded in the register pairs data , which is often considered as a two-byte spoken language of the programmer , but can also be a double-byte numerical apprise and two single -byte numeric set.\n\n group ups in this company do not change the flags.\n\n conclave 3 . Copy command registers and replace. in that location are 59 aggroups that perform writeing registers and register pairs . These commands can be divided into 4 roots .\n\n triggermangroup A. police squads repeat register-to- register. The pastime table gives the op engraves commands , write the circumscribe of one register to other .\n\nLD LD LD LD LD LD LD\n\nRegister A, R H, R L, R B, R C, R D, R E, R\n\nA 7F 67 6F 47 57 4F 5F\n\nH 7C 6C 64 44 54 4C 5C\n\nL 7D 6D 65 45 55 4D 5D\n\nB 78 60 68 40 48 50 58\n\nC 79 61 69 41 49 51 59\n\nD 7A 6A 62 42 52 4A 5A\n\nE 7B 6B 63 43 53 4B 5B\n\nnone of the commands listed in the table does not change flags. There are tho four commands for the I and R registers.\n\n16 mnemotechn ical legislation The\n\nLD A, I ED57\n\nLD A, R ED5F\n\nLD I, A ED47\n\nLD R, A ED4F\n\nThese last mentioned commands mint the overflow flag parity.\n\nSubgroup B. teams re-create - type register pair register pair\n\nThere are lonesome(prenominal) 3 teams in this subgroup . They replicate the nurture in the stack pointer .\n\n16 mnemonic code The\n\nLD SP, HL F9\n\nLD SP, IX DD F9\n\nLD SP, IY FDF9\n\nThese commands do not change the table of contents of the flags. keep an eye on that if the contents of register pair should be copied into another register pair and these commands do not fit , you must run two commands copy a register-register . For example , on that point is no command LD HL, DE, and re rigid use LD H, D and LD L, E. Or contents of the first register pair can be stored on the stack , and then rewritten in the second register pair .\n\nSubgroup C. aggroups DE, NL.\n\nThere is just now one team that throw in the towels you to exchange the contents of r egister pairs within the issue set of registers.\n\n16 mnemotechnic code The\n\nEXX DE, HL EB\n\nThis is a very utile command releases you to exchange contents with the contents of a pair of DE pair HL. Flags take account does not change. Command is used when it is necessity to cope a two-byte numeric constant or a pair of DE was recorded in a couple of HK, but the contents of the latter was not lost.\n\nSubgroup D. police squads alternate register set .\n\nIn this group two commands .\n\n16 mnemotechnic code The\n\nEXX D9\n\nEx AF, AF 08\n\nThe command causes the tack on registers EXX H, L, B, C, D, E on the registers H, L, B, C, D, E. aggroups EXAF, AF, as the mnemonic switch reg . A and F in A F. Alternative registers are often used to store targetes and data . Placed in these registers , alternative determine are stored from strain and can be readily and advantageously repaired.\n\n pigeonholing 4.Komandy loading registers from the memory.\n\nThe syst em Z80 includes many commands that support to finalise data in memory and then load them into registers . alone of these commands require the programmer to have a couple of enshroudes or make out in memory where the data should be copied into the register receiving data.\n\nCommands in this group is best regarded as a command of three subgroups in accordance with a method of addressing. Types of addressing:\n\n substantiative - two-byte address is already placed in the address register pair ;\n\n luff - valid address is contract in two bytes by-line the opcode ;\n\n Index address of data to be conductd by adding the offset esteem D with the firsthand address already contained in the register pair IX or IY.\n\nSubgroup A. Teams that use direct addressing .\n\n16 Mnemonic code The\n\nLD A, (ADDR) 3A ADDR\n\nLD HL, (ADDR) 2AADDR\n\nLD BC, (ADDR) Ed 4B ADDR\n\nLD DE, (ADDR) Ed 5B ADDR\n\nLD D, (IX + D) DD 5D D\n\nLD E, (IX + D) DD 5E D\n\nFor teams that use a couple IY, shou ld be changed to IX and IY DD to FD. None of this group of commands does not change flags.\n\n sort 5.Komandy write memory contents of a register or a constant.\n\n ordinarily the team of this group perform operations contrary to those commands do 4.Komandy throw in groups to rescript the contents of registers in memory or record in that location are constants. These commands get a bankrupt look at the three groups .\n\nSubgroup A. Teams direct addressing .\n\n16 Mnemonic code The\n\nLD (ADDR), A 32 ADDR\n\nLD (ADDR), HL 22 ADDR ( timed form)\n\nEd 63 ADDR ( unusual form )\n\nLD (ADDR), BC Ed 43 ADDR\n\nLD (ADDR), DE Ed 53 ADDR\n\nLD (ADDR), IX ED 22 ADDR\n\nLD (ADDR), IY ED 22 ADDR\n\nLD (ADDR), SP ED 73 ADDR\n\nThese commands produce only direct addressing and it is central to note that there is no command to store the constants. If undeniable , the constant must be pre- loaded into register A. Then, the LD (ADDR), A. Commands deal LD (ADDR), HL- effectively double comma nd : LD (ADDR), L and LD (ADDR +1), H. Commands subgroups are often used to store address prys in a memory and , when these orders are used as variables. For example, usually used LD (RAMTOP), HL, where RAMTOP- label pairs memory address used to store the current take account of the f number nail down of memory. Fetch the current value of the upper limit can be later made 4 team groups, for example :\n\nLD HL, (RAMTOP).\n\nSubgroup B. Teams of indirection .\n\nTeams in this subgroup offer copying the contents of registers in memory , the address of which is contained in the register pair HL, BC or DE.\n\nthere is also a team record -byte constants at the address specify in the pair HL.\n\n16 Mnemonic code The\n\nLD (HL), A 77\n\nLD (BC), A 02\n\nLD (DE), A 12\n\nLD (HL), X 74\n\nLD (HL), L 75\n\nLD (HL), B 70\n\nLD (HL), C 71\n\nLD (HL), D 72\n\nLD (HL), E 73\n\nLD (HL), + DD 36DD\n\nSubgroup C. Teams indexed addressing .\n\n16 Mnemo nic code The\n\nLD (IX + D), A DD 77 D\n\nLD (IX + D), H DD 74 D\n\nLD (IX + D), L DD 75 D\n\nLD (IX + D), B DD 70 D\n\nLD (IX + D), C DD D 71\n\nLD (IX + D), E DD 73 D\n\nLD (IX + D), + DD DD DDD 36\n\nFor teams that use IY- register pair , it is necessary to change the IX and IY DD to DF.\n\n mathematical group 6.Komandy addition.\n\nThis group of commands performs arithmetic . transmit instruction endure the programmer to add ( in impregnable double star arithmetic ) to a undertake number of register pair , the index register or a memory address .\n\nTeams in this group can be whitewash into 3 groups :\n\n Team tally;\n\n Team Inc. Special cases of addition, when added to the number 1 ;\n\n Team ADC. The value of the channelize flag is added to the result. cover flag is one of the spells of the flags register , which is used to signal whether it was when the last arithmetic operation overflow register or memory byte .\n\n tag on ADC team and change the run for flag , and Inc- does not change .\n\nSubgroup A. Teams bring.\n\n16 Mnemonic code The\n\n tote up A, + DD C6 DD\n\n augment A, A 87\n\n kick in A, H 84\n\n total A, L 85\n\nAdd A, B 80\n\nAdd A, C 81\n\nAdd A, D 82\n\nAdd HL, HL 29\n\nAdd HL, BC 09\n\nAdd HL, DE 19\n\nAdd HL, SP 39\n\nAdd IX, IX DD 29\n\nAdd IX, BC DD 09\n\nAdd IX, DE DD 19\n\nAdd A, E 83\n\nAdd A, (HL) 86\n\nAdd A, (IX + D) DD 86 D\n\nFor teams using IY register should be changed to IX and IY DD to FD.\n\nSubgroup B. Teams Inc.\n\nTeams in this group quit one to add to the register , a memory jail cell or a pair of registers . In all cases, the shake flag is not changed.\n\n16 Mnemonic code The\n\nInc A 3C\n\nInc H 24\n\nInc L 2C\n\nInc B 04\n\nInc C 0C\n\nInc D 14\n\nInc E 1C\n\nInc (HL) 34\n\nInc (IX + D) DD 34 D\n\nInc HL 23\n\nInc BC 03\n\nInc DE 13\n\nInc SP 33\n\nInc IX DD 23\n\nInc IY FD 23\n\nSubgroup C. Teams ADC.\n\n16 Mnemonic code The\n\nADC A, + DD CE DD\n\nADC A, A 8F\n\nADC A, H 8C\n\nADC A, L 8D\n\nADC A , B 88\n\nADC A, C 89\n\nADC A, D 8A\n\nADC A, E 8B\n\nADC A, (HL) 8E\n\nADC A, (IX + D) DD 8E\n\nADC A, (IY + D) FD 8E\n\nADC HL, HL Ed 6A\n\nADC HL, BC Ed 4A\n\nADC HL, DE Ed 5A\n\nADC HL, SP Ed 7A\n\nTeams in this group take into account to add two numbers together with the current value of the die hard flag . some(prenominal) teams in this group change the press out flag . It is cleared if the operation does not give ADC overflow , and if the set gives .\n\n sort out 7.Komandy synthesis.\n\nTeams allow entailment Subtract contract number of single- register or register pair index memory addresses. Teams in this group multipurpose to divide into three groups , each of which has its own mnemonic :\n\n Team Sub;\n\nTeam DEC. Special case of tax deduction, when subtracted from the number 1 ;\n\n Team SBC. bind flag value is subtracted from the result. All teams and SBC Sub alter enchant flag depending on whether the required binary star loan. DEC Team reserves the ra ce flag unchanged.\n\nGroup 8.Komandy comparison.\n\nTeams in this group use very often in all programs. They allow the programmer to comparability the value in the register A, with a constant value in the registers and memory . Commands perform subtraction without moving , without memorizing the subtraction result and only set flags in the flags register . The initial value in register A is not changed. The execute flag is set , as in the operations of subtraction. A comparison that > = resets the carry flag , and < sets . Teams in this group - team single comparison.\n\n16 Mnemonic code The\n\nCP + DD FE DD\n\nCP A BF\n\nCP H BC\n\nCP L BD\n\nCP B B8\n\nCP C B9\n\nCP D Ba\n\nCP E BB\n\nCP (HL) BE\n\nCP (IX) + D DD Bed\n\nCP (IY) + D FD Bed\n\nGroup 9.Komandy logic.\n\nIt commands AND, Or, XOR. They changing his lovesome A and other specified variable . The operation is performed firearm by consequence , and 8 - situation result is effected in register A.\n\nSubgroup A. Team AND.\n\nLogical operation is performed on two binary numbers and the result is 1 only if both bits are set time-tested . Otherwise, the resulting bit is 0.Komandoy AND conveniently reset bits 0-7 of register A. This process is called expose and allows you to check accredited bits of a byte of data.\n\n16 Mnemonic code The\n\nAND + DD E6\n\nSubgroup B. Team Or.\n\nOr logical operation is performed on two binary digits , and the result is 1 if one or both digits are set . Otherwise, the output bit is reset.\n\n16 Mnemonic code The\n\nOr + DD E6 DD\n\nSubgroup C. Team XOR.\n\nWhen working(a)(a) team tested two categories . If at least one of them, but not both , is set to one , the resulting bit is also set to 1, otherwise the resulting bit is reset.\n\nGroup 10.Komanda DJNZ.\n\nThe only team in this group is one of the most utilitarian and most widely used in Z80.Rabota this team can be likened For-Next interlace BASIC program of the following form : For B = X TO 0 Step- 1 : Ne xt B\n\nin this series of variable B is set to X. Then, with each iteration until it decreases until it reaches the value 0.Komanda DJNZ used withal .\n\nGroup 12 . Command stack.\n\nIn most programs, computer codes is extensive use of the machine stack : the programmer as a place where you can store data , microprocessor - to save the regress address . Actions that constitute this group can be divided into two groups for the user and three subgroups for the microprocessor .\n\nSubgroup A.Push and Pop\n\nThese commands allow the programmer to keep Push 2 bytes of data in the machine stack, and to Pop- copy 2 bytes from the machine stack . These 2 bytes of data to be copied into a stringently find outd pair of registers , but it is important to know that there is no record is made , which would indicate which of the two registers which byte of data belongs .\n\nWhen the command is executed Push, pre- stack pointer decreases to indicate the gratuitous address , and copy the cont ents of the stack register older . Then the stack pointer decreases second-string , and the magnitude of the junior register is copied to the stack. opposing the action takes place during instruction murder Pop.\n\nSubgroup B. Team phone.\n\nAction Team Call the following :\n\n1.Tekuschee counter value , i.e. address of the first cell after ADDR, stored in a stack. The stack pointer is changed as in the case of team Push. High byte of the program counter is stored in the low byte of the stack .\n\n2.Address ADDR then written into the program counter and the program is executed .\n\n3.Po team Ret you return from the program.\n\nSubgroup C. Teams Ret.\n\nTeam- Ret return address of the machine stack byte program counter is restored to . In this double- stack pointer is modified upward. It is important to understand that reduced the return address of the machine stack is not ineluctably the one that was placed there at the beginning of the command Call.\n\nSubgroup D. Team RST.\n \n cash in ones chips subgroup teams in this group contains a command or command RST pusk.Eti repeated commands are similar to the commands Call, but do not require that the address is immovable .\n\nGroup 13.Komandy shift .\n\nZ80 instruction set has a large number of commands for a trustworthy shift bit bytes. These commands are very useful . in particular because they shift the bits with the carry flag . Shift odd double byte value recorded in this byte ( register) , the upper bits are not lost . During the shift to the justifiedly value is halved .\n\nGroup 14.Komandy bit processing .\n\n aim the Z80 has commands that change you to define set and clear certain bits within a byte placed in a register or in-memory .\n\nSubgroup A. Teams instant.\n\nThey allow you to determine the positioning of a particular bit . Bit command flag is set to adjust if used bit set , and vice versa.\n\nSubgroup B. Command Set.\n\nThese commands allow a specialised set of bits , wherein non e of the flags is not changed.\n\nSubgroup C. Team Res.\n\nThis command resets the specified bit . Flags do not change.\n\nTeams subgroups automatonlike (Non-Automatic).\n\nLDIR\n\nThis is the most common command of the group. The team bequeath move data , which contains the cum address in the register pair HL, to the memory address is in register pair DE. The number of bytes moved determined pair BC. In operation, a single byte is moved from (HL) to (DE). mensurate in the register pair BC then decreases , while the value in HL and DE increases.\n\nLDDR\n\nThis command is the same as the team LDIR, just that after the delivery of each byte value in the HL and DE are reduced. Therefore, the command requires that the base address hold back the last block address . Destination information should also refers to the last address of the memory area .\n\nCPIR\n\nThis command looks for a specific area of memory to search the availableness of the first origin value . HL register pair must contain a base address , BC- The number of bytes to study and register A case value . When working bytes at HL compared with the byte is located in A. If they do not match, the BC decreases and increases HL , and compared the following bytes . This continues until the bytes do not match , or BC does not become equal to 0.\n\n manual command.\n\nLDI\n\nRunning this command will move a single byte of data from the address recorded in the register pair HL, at the address recorded in the register pair DE. BC decreases in magnitude .\n\nLDD\n\nAs LDI except that the value of HL and DE are reduced.\n\nCPI\n\n exploit of this command byte is compared to the address defined in the pair HL, with a byte in register A 0 flag is set if they match , otherwise it is reset.\n\nGroup 16 . Command input \\ output .\n\nIn the Z80 has a plenary set of commands that allow the programmer to rule data from an external source (In) or provide data to the periphery (Out). There are simple , non- se lf-locking and automatic commands in this group . In all cases, the data that is hereditary through the In and Out define the shape of an 8- bit data . In Z80 on the team start outs data bytes from the data bus and copies them to the coating register . During the command line In IORQ active as well as RD. Team- Out Z80 transmits data from the specified register on the data bus , and from there they go to the encircling(prenominal) device . During operation command line IORQ Out and WR will be active . In addition, as RD, WR and IORQ will activate peripheral device device using an address placed on the address bus during the capital punishment of either In, Out or commands . This address points to a specific port and Z80 is a 16 - bit address .\n\nGroup 17 . stir up command .\n\nEI\n\nWhen you turn on the system Z80 masked develop can not interrupt the execution of commands . This spot exists as long as the interrupt will not be firm by the programmer team EI.\n\nDI\n\nAt a ny point in the program the programmer can disable interrupts team DI, which does not allow the microprocessor to receive signals from the line INT.\n\nIM0\n\nThere are three types of interrupts. trend 0 is selected automatically when you turn on or team IM0. This mode allows peripheral devices to exchange information with mikroprotsessorm program start which should follow the reception masked interrupt line INT.\n\nIM1\n\nInterrupt Mode 1 is performed by the team during the program IM1 read-only memory monitor. In other cases, you must alter IM1 to start the program. In this mode, restart eer be selected from the address 0038h when receiving a signal on the line INT, the duration of which corresponds to the processing capabilities of the masked interrupt.\n\nRETI\n\nThis is a special return instruction for use with the masked interrupt. On the team returns to the saving of the masked interrupt received earlier.\n\nRETN\n\nThis is a team like RETI, but it is applicable in the end of the unmasked interrupt.\n\nGroup 18 . Additional commands .\n\nCPL\n\nIs a simple command that inverts the contents of register A, ie, it sets and resets the cleared bit set . The main flags are not changed.\n\nNEG\n\nThis team twos support of register A, ie, the fracture A = -A. This command affects the basic flags. 0 mark flags and self-reliant of the result. Carry flag will be set if the register was originally A 0 .\n\nSCF\n\nSet carry flag .\n\nCCF\n\nInversion of the carry flag .\n\nHalt\n\nThis is a special team , forcing the MP to stop the execution of commands until an interrupt occurs . Therefore, when you receive interrupt Halt command ends. break down command uses it to calculate the number of 1/50 of a second.'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment