123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407 |
- ;- http://clrhome.org/table/
- ;--------------------- equ -----------------------------------------------------
- z80_regs equ $00
- z80_f equ $00
- z80_a equ $01
- z80_af equ z80_f
- z80_c equ $02
- z80_b equ $03
- z80_bc equ z80_c
- z80_e equ $04
- z80_d equ $05
- z80_de equ z80_e
- z80_l equ $06
- z80_h equ $07
- z80_hl equ z80_l
- z80_ixl equ $08
- z80_ixh equ $09
- z80_ix equ $08
- z80_iyl equ $0a
- z80_iyh equ $0b
- z80_iy equ $0a
- z80_fp equ $0c
- z80_ap equ $0d
- z80_cp equ $0e
- z80_bp equ $0f
- z80_bcp equ z80_cp
- z80_ep equ $10
- z80_dp equ $11
- z80_dep equ z80_ep
- z80_lp equ $12
- z80_hp equ $13
- z80_hlp equ z80_lp
- z80_sp equ $14
- z80_reg0 equ $16
- z80_reg1 equ $17
- z80_reg2 equ $18
- z80_reg3 equ $19
- z80_reg4 equ $1a
- z80_reg5 equ $1b
- z80_reg6 equ $1c
- z80_reg7 equ $1d
- z80_reg8 equ $1e
- z80_reg9 equ $1f
- ;-------------------------------------------------------------------------------
- ;-------------------------------------------------------------------------------
- ;--------------------- opcodes -------------------------------------------------
- ;0x00 - nop
- nop
- ;0x01 - ld bc,nn
- lda #<nn ;- ld bc,nn
- sta z80_c
- lda #>nn
- sta z80_b
- ;0x02 - ld (bc),nn
- ;0x03 - inc bc
- inc z80_c ;- inc bc
- bne *+4
- inc z80_b
- ;0x04 - inc b
- inc z80_b ;- inc b
- ;0x05 - dec b
- dec z80_b
- ;0x06 - ld b,n
- lda %n ;- ld b,n
- sta z80_b
- ;0x07 - rlca
- asl @ ;- RLCA: Warning: this copies bit 7 to bit 0"
- ;0x08 - ex af,af'
- ldx z80_ap ;- ex af,af'
- sta z80_ap
- txa
- ;0x09 - add hl,bc
- lda z80_l ;- add hl,bc
- clc
- adc z80_c
- sta z80_l
- lda z80_h
- adc z80_b
- sta z80_h
- ;0x0A - ld a,(bc)
- ldy #$00
- lda (z80_bc),y
- ;0x0B - dec bc
- lda z80_c ;- dec bc
- bne dec_bc_no_dec_b
- dec z80_b
- dec_bc_no_dec_b:
- dec z80_c
- ;rts
- ;0x0C - inc c
- inc z80_c ;- inc c
- ;0x0D - dec c
- dec z80_c ;- dec c
- ;0x0E - ld c,n
- lda #$%1
- sta z80_c
- ;0x0F - rrca
- ;0x10 - djnz n
- dec z80_b ;- djnz n
- jne n
- ;0x11 - ld de,nn
- lda #<nn ;- ld de,nn
- sta z80_e
- lda #>nn
- sta z80_d
- ;0x12 - ld (de),a
- ;0x13 - inc de
- inc z80_e ;- inc de
- bne *+4
- inc z80_d
- ;0x14 - inc d
- inc z80_d
- ;0x15 - dec d
- dec z80_d
- ;0x16 - ld d,n
- lda #n ;- ld d,n
- sta z80_d
- ;0x17 - rla
- ;0x18 - jr n
- jmp n ;- jr n
- ;0x19 - add hl,de
- clc ;- add hl,de
- lda z80_l
- adc z80_e
- sta z80_l
- lda z80_h
- adc z80_d
- sta z80_h
- ;0x1A - ld a,(de)
- ;0x1B - dec de
- ;dec_de:
- lda z80_e
- bne dec_de_no_dec_d
- dec z80_d
- dec_de_no_dec_d:
- dec z80_e
- ;rts
- ;0x1C - inc e
- inc z80_e
- ;0x1D - dec e
- dec z80_e
- ;0x1E - ld e,n
- lda #$%1
- sta z80_e
- ;0x1F - rra
- ror @
- ;0x20 - jr nz,n
- jne %1
- ;0x21 - ld hl,nn
- lda #<nn ;- ld hl,nn
- sta z80_l
- lda #>nn
- sta z80_h
- ;0x22 - ld (nn),hl
- lda z80_l ;- ld (nn),hl
- sta nn
- lda z80_h
- sta nn+1
- ;0x23 - inc hl
- inc z80_l ;- inc hl
- bne *+4
- inc z80_h
- ;0x24 - inc h
- inc z80_h ;- inc h
- ;0x25 - dec h
- dec z80_h
- ;0x26 - ld h,n
- lda #$%1
- sta z80_h
- ;0x27 - daa - decimal mode - irrelevant?
- ;0x28 - jr z,n
- jeq n
- ;0x29 - add hl,hl
- asl z80_l ;- add hl,hl
- rol z80_h
- ;0x2A - ld hl,(nn)
- lda nn ;- ld hl,(nn)
- sta z80_l
- lda nn+1
- sta z80_h
- ;0x2B - dec hl
- dec_hl:
- lda z80_l ;- dec_hl
- bne dec_hl_no_dec_h
- dec z80_h
- dec_hl_no_dec_h:
- dec z80_l
- ;rts
- ;0x2C - inc l
- inc z80_l ;- inc l
- ;0x2D - dec l
- dec z80_l
- ;0x2E - ld l,n
- lda #$%1
- sta z80_l
- ;0x2F - cpl
- eor #$ff ;- cpl
- ;0x30 - jr nc,n
- jcs %1
- ;0x31 - ld sp,nn
- ;0x32 - ld (nn),a
- sta %1
- ;0x33 - inc sp
- pla
- ;0x34 - inc (hl)
- ldy #$00 ;- inc (hl)
- lda (z80_hl),y
- clc
- adc #$01
- sta (z80_hl),y
- ;0x35 - dec (hl)
- ldy #$00 ;- dec (hl)
- lda (z80_hl),y
- sec
- sbc #$01
- sta (z80_hl),y
- ;0x36 - ld (hl),n
- lda #n ;- ld (hl),n
- ldy #$00
- sta (z80_hl),y
- ;0x37 - scf
- sec
- ;0x38 - jr c,n
- jcc %n
- ;0x39 - add hl,sp
- ;0x3A - ld a,(nn)
- lda %1
- ;0x3B - dec sp
- pha
- ;0x3C - inc a
- clc ;- inc a
- adc #$01
- ;0x3D - dec a
- sec ;- dec a
- sbc #$01
- ;0x3E - ld a,n
- lda #n ;- ld a,n
- ;0x3F - ccf
- ;0x40 - ld b,b
- lda z80_b ;- ld b,b
- sta z80_b
- ;0x41 - ld b,c
- lda z80_c ;- ld b,c
- sta z80_b
- ;0x42 - ld b,d
- lda z80_d ;- ld b,d
- sta z80_b
- ;0x43 - ld b,e
- lda z80_e
- sta z80_b
- ;0x44 - ld b,h
- lda z80_h ;- ld b,h
- sta z80_b
- ;0x45 - ld b,l
- lda z80_l ;- ld b,l
- sta z80_b
- ;0x46 - ld b,(hl)
- ldy #$00 ;- ld b,(hl)
- lda (z80_hl),y
- sta z80_b
- ;0x47 - ld b,a
- lda z80_a ;- ld b,a
- sta z80_b
- ;0x48 - ld c,b
- lda z80_b ;- ld c,b
- sta z80_c
- ;0x49 - ld c,c
- lda z80_c ;- ld c,c
- sta z80_c
- ;0x4A - ld c,d
- lda z80_d ;- ld c,d
- sta z80_c
- ;0x4B - ld c,e
- lda z80_e ;- ld c,e
- sta z80_c
- ;0x4C - ld c,h
- lda z80_h ;- ld c,h
- sta z80_c
- ;0x4D - ld c,l
- lda z80_l ;- ld c,l
- sta z80_c
- ;0x4E - ld c,(hl)
- ldy #$00 ;- ld c,(hl)
- lda (z80_hl),y
- sta z80_c
- ;0x4F - ld c,a
- lda z80_a ;- ld c,a
- sta z80_c
- ;0x50 - ld d,b
- lda z80_b ;- ld d,b
- sta z80_d
- ;0x51 - ld d,c
- lda z80_c ;- ld d,c
- sta z80_d
- ;0x52 - ld d,d
- lda z80_d ;-
- sta z80_d
- ;0x53 - ld d,e
- lda z80_e ;-
- sta z80_d
- ;0x54 - ld d,h
- lda z80_h ;- ld d,h
- sta z80_d
- ;0x55 - ld d,l
- lda z80_l
- sta z80_d
- ;0x56 - ld d,(hl)
- ldy #$00 ;- ld d,(hl)
- lda (z80_hl),y
- sta z80_d
- ;0x57 - ld d,a
- lda z80_a ;- ld d,a
- sta z80_d
- ;0x58 - ld e,b
- lda z80_b ;-
- sta z80_e
- ;0x59 - ld e,c
- lda z80_c ;- ld e,c
- sta z80_e
- ;0x5A - ld e,d
- lda z80_d ;-
- sta z80_e
- ;0x5B - ld e,e
- lda z80_e ;-
- sta z80_e
- ;0x5C - ld e,h
- lda z80_h ;- ld e,h
- sta z80_e
- ;0x5D - ld e,l
- lda z80_l ;- ld e,l
- sta z80_e
- ;0x5E - ld e,(hl)
- ldy #$00 ;- ld e,(hl)
- lda (z80_hl),y
- sta z80_e
- ;0x5F - ld e,a
- lda z80_a ;- ld e,a
- sta z80_e
- ;0x60 - ld h,b
- lda z80_b ;- ld h,b
- sta z80_h
- ;0x61 - ld h,c
- lda z80_c ;- ld h,c
- sta z80_h
- ;0x62 - ld h,d
- lda z80_d ;- ld h,d
- sta z80_h
- ;0x63 - ld h,e
- lda z80_e ;- ld h,e
- sta z80_h
- ;0x64 - ld h,h
- lda z80_h ;- ld h,h
- sta z80_h
- ;0x65 - ld h,l
- lda z80_l ;- ld h,l
- sta z80_h
- ;0x66 - ld h,(hl)
- ldy #$00 ;- ld h,(hl)
- lda (z80_hl),y
- sta z80_h
- ;0x67 - ld h,a
- lda z80_a ;- ld h,a
- sta z80_h
- ;0x68 - ld l,b
- lda z80_b ;- ld l,b
- sta z80_l
- ;0x69 - ld l,c
- lda z80_c ;- ld l,c
- sta z80_l
- ;0x6A - ld l,d
- lda z80_d ;- ld l,d
- sta z80_l
- ;0x6B - ld l,e
- lda z80_e ;- ld l,e
- sta z80_l
- ;0x6C - ld l,h
- lda z80_h ;- ld l,h
- sta z80_l
- ;0x6D - ld l,l
- lda z80_l ;- ld l,l
- sta z80_l
- ;0x6E - ld l,(hl)
- ldy #$00
- lda (z80_hl),y
- sta z80_l
- ;0x6F - ld l,a
- lda z80_a ;- ld l,a
- sta z80_l
- ;0x70 - ld (hl),b
- lda z80_b ;- ld (hl),b
- ldy #$00
- sta (z80_hl),y
- ;0x71 - ld (hl),c
- lda z80_c ;- ld (hl),c
- ldy #$00
- sta (z80_hl),y
- ;0x72 - ld (hl),d
- lda z80_d ;- ld (hl),d
- ldy #$00
- sta (z80_hl),y
- ;0x73 - ld (hl),e
- lda z80_e ;- ld (hl),e
- ldy #$00
- sta (z80_hl),y
- ;0x74 - ld (hl),h
- lda z80_h
- ldy #$00
- sta (z80_hl),y
- ;0x75 - ld (hl),l
- lda z80_l
- ldy #$00
- sta (z80_hl),y
- ;0x76 - ld (hl),(hl)
- nop
- ;0x77 - ld (hl),a
- lda z80_a ;- ld (hl),a
- ldy #$00
- sta (z80_hl),y
- ;0x78 - ld a,b
- lda z80_b ;- ld a,b
- sta z80_a
- ;0x79 - ld a,c
- lda z80_c ;- ld a,c
- sta z80_a
- ;0x7A - ld a,d
- lda z80_d ;- ld a,d
- sta z80_a
- ;0x7B - ld a,e
- lda z80_e ;- ld a,e
- sta z80_a
- ;0x7C - ld a,h
- lda z80_h ;- ld a,h
- sta z80_a
- ;0x7D - ld a,l
- lda z80_l ;- ld a,l
- sta z80_a
- ;0x7E - ld a,(hl)
- ldy #$00 ;- ld a,(hl)
- lda (z80_hl),y
- sta z80_a
- ;0x7F - ld a,a
- lda z80_a
- sta z80_a
- ;0x80 - add a,b
- clc
- adc z80_b
- ;0x81 - add a,c
- clc
- adc z80_c
- ;0x82 - add a,d
- clc
- adc z80_d
- ;0x83 - add a,e
- clc
- adc z80_e
- ;0x84 - add a,h
- clc ;- add a,h
- adc z80_h
- ;0x85 - add a,l
- clc
- adc z80_l
- ;0x86 - add a,(hl)
- ldy #$00
- clc
- adc (z80_hl),y
- ;0x87 - add a,a
- clc ;- add a,a
- adc z80_a
- ;0x88 - adc a,b
- adc z80_b
- ;0x89 - adc a,c
- adc z80_c
- ;0x8A - adc a,d
- adc z80_d
- ;0x8B - adc a,e
- adc z80_e
- ;0x8C - adc a,h
- adc z80_h
- ;0x8D - adc a,l
- adc z80_l
- ;0x8E - adc a,(hl)
- ;0x8F - adc a,a
- adc z80_a
- ;0x90 - sub b
- sec
- sbc z80_b
- ;0x91 - sub c
- sec
- sbc z80_c
- ;0x92 - sub d
- sec
- sbc z80_d
- ;0x93 - sub e
- sec
- sbc z80_e
- ;0x94 - sub h
- sec ;- sub h
- sbc z80_h
- ;0x95 - sub l
- sec ;- sub l
- sbc z80_l
- ;0x96 - sub (hl)
- ldy #$00
- sec
- sbc (z80_hl),y
- ;0x97 - sub a
- sec
- sbc z80_a
- ;0x98 - sbc a,b
- sec
- sbc z80_b
- ;0x99 - sbc a,c
- sec
- sbc z80_c
- ;0x9A - sbc a,d
- sec
- sbc z80_d
- ;0x9B - sbc a,e
- sec
- sbc z80_e
- ;0x9C - sbc a,h
- sec
- sbc z80_h
- ;0x9D - sbc a,l
- sec
- sbc z80_l
- ;0x9E - sbc a,(hl)
- ;0x9F - sbc a,a
- sec ;- sbc a,a
- sbc z80_a
- ;0xA0 - and b
- and z80_b
- ;0xA1 - and c
- and z80_c
- ;0xA2 - and d
- and z80_d
- ;0xA3 - and e
- and z80_e
- ;0xA4 - and h
- and z80_h
- ;0xA5 - and l
- and z80_l
- ;0xA6 - and (hl)
- ldy #$00
- and (z80_hl),y
- ;0xA7 - and a
- and z80_a ;- and a
- ;0xA8 - xor b
- eor z80_b ;- xor b
- ;0xA9 - xor c
- eor z80_c ;- xor c
- ;0xAA - xor d
- eor z80_d ;- xor d
- ;0xAB - xor e
- eor z80_e ;- xor e
- ;0xAC - xor h
- eor z80_h ;- xor h
- ;0xAD - xor l
- eor z80_l ;- xor l
- ;0xAE - xor (hl)
- ldy #$00
- eor (z80_hl),y
- ;0xAF - xor a
- eor z80_a ;- xor a
- ;0xB0 - or b
- ora z80_b ;- or b
- ;0xB1 - or c
- ora z80_c ;- or c
- ;0xB2 - or d
- ora z80_d ;- or d
- ;0xB3 - or e
- ora z80_e ;- or e
- ;0xB4 - or h
- ora z80_h ;- or h
- ;0xB5 - or l
- ora z80_l ;- or l
- ;0xB6 - or (hl)
- ldy #$00 ;- or (hl)
- ora (z80_hl),y
- ;0xB7 - or a
- ora z80_a ;- or a
- ;0xB8 - cp b
- cmp z80_b ;- cp b
- ;0xB9 - cp c
- cmp z80_c ;- cp c
- ;0xBA - cp d
- cmp z80_d
- ;0xBB - cp e
- cmp z80_e
- ;0xBC - cp h
- cmp z80_h
- ;0xBD - cp l
- cmp z80_l ;- cp l
- ;0xBE - cp (hl)
- ldy #$00 ;- cp (hl)
- cmp (z80_hl),y
- ;0xBF - cp a
- cmp z80_a
- ;0xC0 - ret nz
- beq *+3 ;- ret nz
- rts
- ;0xC1 - pop bc
- pla ;- pop bc
- sta z80_b
- pla
- sta z80_c
- ;0xC2 - jp nz,nn
- jne nn
- ;0xC3 - jp nn
- jmp nn
- ;0xC4 - call nz,nn
- beq *+5 ;- call nz,nn
- jsr nn
- ;0xC5 - push bc
- lda z80_c ;- push bc
- pha
- lda z80_b
- pha
- ;0xC6 - add a,n
- clc
- adc #$%1
- ;0xC7 - rst 00h
- ;0xC8 - ret z
- bne *+3 ;- ret z
- rts
- ;0xC9 - ret
- rts ;- ret
- ;0xCA - jp z,nn
- jeq nn ;- jp z,nn
- ;0xCC - call z,nn
- bne *+5
- jsr %1
- ;0xCD - call nn
- jsr nn
- ;0xCE - adc a,n
- ;0xCF - rst 08h
- ;0xD0 - ret nc
- bcc *+3 ;- ret nc
- rts
- ;0xD1 - pop de
- pla ;- pop de
- sta z80_d
- pla
- sta z80_e
- ;0xD2 - jp nc,nn
- jcs nn ;- jp nc,nn
- ;0xD3 - out (n),a
- ;0xD4 - call nc,nn
- bcc *+5
- jsr %1
- ;0xD5 - push de
- lda z80_e ;- push de
- pha
- lda z80_d
- pha
- ;0xD6 - sub n
- sec ;- sub n
- sbc #n
- ;0xD7 - rst 10h
- ;0xD8 - ret c
- bcs *+3 ;- ret c
- rts
- ;0xD9 - exx
- lda z80_c ;- exx
- ldx z80_cp
- stx z80_c
- sta z80_cp
- lda z80_b
- ldx z80_bp
- stx z80_b
- sta z80_bp
- lda z80_e
- ldx z80_ep
- stx z80_e
- sta z80_ep
- lda z80_d
- ldx z80_dp
- stx z80_d
- sta z80_dp
- lda z80_l
- ldx z80_lp
- stx z80_l
- sta z80_lp
- lda z80_h
- ldx z80_hp
- stx z80_h
- sta z80_hp
- ;0xDA - jp c,nn
- jcc %1
- ;0xDB - in a,(n)
- ;0xDC - call c,nn
- bcs *+5
- jsr %1
- ;0xDE - sbc a,n
- ;0xDF - rst 18h
- ;0xE0 - ret po
- ;0xE1 - pop hl
- pla ;- pop hl
- sta z80_h
- pla
- sta z80_l
- ;0xE2 - jp po,nn
- ;0xE3 - ex (sp),hl
- tsx ;- ex (sp),hl
- lda $0103,x
- ldy z80_h
- sta z80_h
- tya
- sta $0103,x
- lda $0104,x
- ldy z80_l
- sta z80_l
- tya
- sta $104,x
- ;0xE4 - call po,nn
- ;0xE5 - push hl
- lda z80_l ;- push hl
- pha
- lda z80_h
- pha
- ;0xE6 - and n
- and #n ;- and n
- ;0xE7 - rst 20h
- ;0xE8 - ret pe
- ;0xE9 - jp (hl)
- jmp (z80_hl) ;- jp (hl)
- ;0xEA - jp pe,nn
- ;0xEB - ex de,hl
- lda z80_e ;- ex de,hl
- ldx z80_l
- stx z80_e
- sta z80_l
- lda z80_d
- ldx z80_h
- stx z80_d
- sta z80_h
- ;0xEC - call pe,nn
- ;0xEE - xor n
- eor #n ;- xor n
- ;0xEF - rst 28h
- ;0xF0 - ret p
- bmi *+3 ;- ret p
- rts
- ;0xF1 - pop af
- plp ;- pop af
- pha
- ;0xF2 - jp p,nn
- jpl %nn
- ;0xF3 - di
- ;0xF4 - call p,nn
- ;0xF5 - push af
- pha ;- push af
- php
- ;0xF6 - or n
- ora #n ;- or n
- ;0xF7 - rst 30h
- ;0xF8 - ret m
- bpl *+3 ;- ret m
- rts
- ;0xF9 - ld sp,hl
- ;0xFA - jp m,nn
- jmi %nn ;- jp m,nn
- ;0xFB - ei
- ;0xFC - call m,nn
- ;0xFE - cp n
- cmp #n
- ;0xFF - rst 38h
- ;--------------------- extended opcodes - ED -----------------------------------
- ;0x40 - in b,(c)
- ;0x41 - out (c),b
- ;0x42 - sbc hl,bc
- lda z80_l ;- sbc hl,bc
- sbc z80_c
- sta z80_l
- lda z80_h
- sbc z80_b
- sta z80_h
- ;0x43 - ld (nn),bc
- lda z80_c ;- ld (nn),bc
- sta nn
- lda z80_b
- sta nn+1
- ;0x44 - neg
- eor #$ff ;- neg
- clc
- adc #$01
- ;0x45 - retn
- ;0x46 - im0
- ;0x47 - ld i,a
- ;0x48 - in c,(c)
- ;0x49 - out (c),c
- ;0x4A - adc hl,bc
- ;0x4B - ld bc,(nn)
- lda nn ;- ld bc,(nn)
- sta z80_c
- lda nn+1
- sta z80_b
- ;0x4C - neg
- eor #$ff ;- neg
- clc
- adc #$01
- ;0x4D - reti
- ;0x4E - im 0/1
- ;0x4F - ld r,a
- ;0x50 - in d,(c)
- ;0x51 - out (c),d
- ;0x52 - sbc hl,de
- lda z80_l ;- sbc hl,de
- sbc z80_e
- sta z80_l
- lda z80_h
- sbc z80_d
- sta z80_h
- ;0x53 - ld (nn),de
- lda z80_e ;- ld (nn),de
- sta nn
- lda z80_d
- sta nn+1
- ;0x54 - neg
- eor #$ff
- clc
- adc #$01
- ;0x55 - retn
- ;0x56 - im 1
- ;0x57 - ld a,i
- ;0x58 - in e,(c)
- ;0x59 - out (c),e
- ;0x5A - adc hl,de
- ;0x5B - ld de,(nn)
- lda nn ;- ld de,(nn)
- sta z80_e
- lda nn+1
- sta z80_d
- ;0x5C - neg
- eor #$ff
- clc
- adc #$01
- ;0x5D - retn
- ;0x5E - im 2
- ;0x5F - ld a,r
- ;0x60 - in h,(c)
- ;0x61 - out (c),h
- ;0x62 - sbc hl,hl
- ;0x63 - ld (nn),hl
- lda z80_l ;- ld (nn),hl
- sta nn
- lda z80_h
- sta nn+1
- ;0x64 - nec
- ;0x65 - retn
- ;0x66 - im 0
- ;0x67 - rrd
- ;0x68 - in l,(c)
- ;0x69 - out (c),l
- ;0x6A - adc hl,hl
- ;0x6B - ld hl,(nn)
- lda nn ;- ld hl,(nn)
- sta z80_l
- lda nn+1
- sta z80_h
- ;0x6C - neg
- eor #$ff ;- neg
- clc
- adc #$01
- ;0x6D - retn
- ;0x6E - im 0/1
- ;0x6F - rld
- ;0x70 - in (c)
- ;0x71 - out (c),0
- ;0x72 - sbc hl,sp
- ;0x73 - ld (nn),sp
- ;0x74 - neg
- ;0x75 - retn
- ;0x76 - im 1
- ;0x78 - in a,(c)
- ;0x79 - out (c),a
- ;0x7A - adc hl,sp
- ;0x7B - ld sp,(nn)
- ;0x7C - neg
- ;0x7D - retn
- ;0x7E - im 2
- ;0xA0 - ldi
- ;0xA1 - cpi
- ;0xA2 - ini
- ;0xA3 - outi
- ;0xA8 - ldd
- ;0xA9 - cpd
- ;0xAA - ind
- ;0xAB - outd
- ;0xB0 - ldir
- ;0xB1 - cpir
- ;0xB2 - inir
- ;0xB3 - otir
- ;0xB8 - lddr
- ;0xB9 - cpdr
- ;0xBA - indr
- ;0xBB - otdr
- ;-------------------------------------------------------------------------------
- ;--------------------- extended opcodes - CB -----------------------------------
- ;0x00 - rlc b
- ;0x01 - rlc c
- ;0x02 - rlc d
- ;0x03 - rlc e
- ;0x04 - rlc h
- ;0x05 - rlc l
- ;0x06 - rlc (hl)
- ;0x07 - rlc a
- ;0x08 - rrc b
- ;0x09 - rrc c
- ;0x0A - rrc d
- ;0x0B - rrc e
- ;0x0C - rrc h
- ;0x0D - rrc l
- ;0x0E - rrc (hl)
- ;0x0F - rrc a
- ;0x10 - rl b
- rol z80_b ;- rl b
- ;0x11 - rl c
- rol z80_c ;- rl c
- ;0x12 - rl d
- rol z80_d ;- rl d
- ;0x13 - rl e
- rol z80_e ;- rl e
- ;0x14 - rl h
- rol z80_h ;- rl h
- ;0x15 - rl l
- rol z80_l ;- rl l
- ;0x16 - rl (hl)
- lda z80_b ;- rl (hl)
- rol a
- ldy #$00
- sta (z80_hl),y
- ;0x17 - rl a
- rol z80_a ;- rl a
- ;0x18 - rr b
- ror z80_b ;- rr b
- ;0x19 - rr c
- ror z80_c ;- rr c
- ;0x1A - rr d
- ror z80_d ;- rr d
- ;0x1B - rr e
- ror z80_e ;- rr e
- ;0x1C - rr h
- ror z80_h ;- rr h
- ;0x1D - rr l
- ror z80_l ;- rr l
- ;0x1E - rr (hl)
- lda z80_b ;- rr (hl)
- ror a
- ldy #$00
- sta (z80_hl),y
- ;0x1F - rr a
- ror z80_a ;- rr a
- ;0x20 - sla b
- asl z80_b ;- sla b
- ;0x21 - sla c
- asl z80_c ;- sla c
- ;0x22 - sla d
- asl z80_d ;- sla d
- ;0x23 - sla e
- asl z80_e ;- sla e
- ;0x24 - sla h
- asl z80_h ;- sla h
- ;0x25 - sla l
- asl z80_l ;- sla l
- ;0x26 - sla (hl)
- lda (z80_hl) ;- sla (hl)
- asl a
- sta (z80_hl)
- ;0x27 - sla a
- asl z80_a ;- sla a
- ;0x28 - sra b
- ;0x29 - sra c
- ;0x2A - sra d
- ;0x2B - sra e
- ;0x2C - sra h
- ;0x2D - sra l
- ;0x2E - sra (hl)
- ;0x2F - sra a
- ;0x30 - sll b
- ;0x31 - sll c
- ;0x32 - sll d
- ;0x33 - sll e
- ;0x34 - sll h
- ;0x35 - sll l
- ;0x36 - sll (hl)
- ;0x37 - sll a
- ;0x38 - srl b
- lsr z80_b ;- srl b
- ;0x39 - srl c
- lsr z80_c ;- srl c
- ;0x3A - srl d
- lsr z80_d ;- srl d
- ;0x3B - srl e
- ;0x3C - srl h
- ;0x3D - srl l
- ;0x3E - srl (hl)
- ;0x3F - srl a
- ;0x40 - bit 0,b
- lda z80_b ;- bit 0,b
- bit 0
- ;0x41 - bit 0,c
- lda z80_c ;- bit 0,c
- bit 0
- ;0x42 - bit 0,d
- lda z80_d ;- bit 0,d
- bit 0
- ;0x43 - bit 0,e
- lda z80_e ;- bit 0,e
- bit 0
- ;0x44 - bit 0,h
- lda z80_h ;- bit 0,h
- bit 0
- ;0x45 - bit 0,l
- lda z80_l ;- bit 0,l
- bit 0
- ;0x46 - bit 0,(hl)
- ;0x47 - bit 0,a
- lda z80_a ;- bit 0,a
- bit 0
- ;0x48 - bit 1,b
- ;0x49 - bit 1,c
- ;0x4A - bit 1,d
- ;0x4B - bit 1,e
- ;0x4C - bit 1,h
- ;0x4D - bit 1,l
- ;0x4E - bit 1,(hl)
- ;0x4F - bit 1,a
- lda z80_a ;- bit 1,a
- bit 1
- ;0x50 - bit 2 b
- ;0x51 - bit 2 c
- ;0x52 - bit 2 d
- ;0x53 - bit 2 e
- ;0x54 - bit 2 h
- ;0x55 - bit 2 l
- ;0x56 - bit 2 (hl)
- ;0x57 - bit 2 a
- ;0x58 - bit 3 b
- ;0x59 - bit 3 c
- ;0x5A - bit 3 d
- ;0x5B - bit 3 e
- ;0x5C - bit 3 h
- ;0x5D - bit 3 l
- ;0x5E - bit 3 (hl)
- ;0x5F - bit 3 a
- ;0x60 - bit 4 b
- ;0x61 - bit 4 c
- ;0x62 - bit 4 d
- ;0x63 - bit 4 e
- ;0x64 - bit 4 h
- ;0x65 - bit 4 l
- ;0x66 - bit 4 (hl)
- ;0x67 - bit 4 a
- ;0x68 - bit 5 b
- ;0x69 - bit 5 c
- ;0x6A - bit 5 d
- ;0x6B - bit 5 e
- ;0x6C - bit 5 h
- ;0x6D - bit 5 l
- ;0x6E - bit 5 (hl)
- ;0x6F - bit 5 a
- ;0x70 - bit 6 b
- ;0x71 - bit 6 c
- ;0x72 - bit 6 d
- ;0x73 - bit 6 e
- ;0x74 - bit 6 h
- ;0x75 - bit 6 l
- ;0x76 - bit 6 (hl)
- ;0x77 - bit 6 a
- ;0x78 - bit 7 b
- ;0x79 - bit 7 c
- ;0x7A - bit 7,d
- lda z80_d ;- bit 7,d
- bit 7
- ;0x7B - bit 7 e
- ;0x7C - bit 7 h
- lda z80_h ;- bit 7,h
- bit 7
- ;0x7D - bit 7 l
- ;0x7E - bit 7 (hl)
- ;0x7F - bit 7 a
- ;0x80 - res 0,b
- lda z80_b ;- res 0,b
- and #$FF-$01
- sta z80_b
- ;0x81 - res 0 c
- lda z80_c ;- res 0,c
- and #$FF-$01
- sta z80_c
- ;0x82 - res 0 d
- lda z80_d ;- res 0,d
- and #$FF-$01
- sta z80_d
- ;0x83 - res 0 e
- lda z80_e ;- res 0,e
- and #$FF-$01
- sta z80_e
- ;0x84 - res 0 h
- lda z80_h ;- res 0,h
- and #$FF-$01
- sta z80_h
- ;0x85 - res 0 l
- lda z80_l ;- res 0,l
- and #$FF-$01
- sta z80_l
- ;0x86 - res 0 (hl)
- ;0x87 - res 0 a
- lda z80_a ;- res 0,a
- and #$FF-$01
- sta z80_a
- ;0x88 - res 1 b
- lda z80_b ;- res 1,b
- and #$FF-$02
- sta z80_b
- ;0x89 - res 1 c
- lda z80_c ;- res 1,c
- and #$FF-$02
- sta z80_c
- ;0x8A - res 1 d
- lda z80_d ;- res 1,d
- and #$FF-$02
- sta z80_d
- ;0x8B - res 1 e
- lda z80_e ;- res 1,e
- and #$FF-$02
- sta z80_e
- ;0x8C - res 1 h
- lda z80_h ;- res 1,h
- and #$FF-$02
- sta z80_h
- ;0x8D - res 1 l
- lda z80_l ;- res 1,l
- and #$FF-$02
- sta z80_l
- ;0x8E - res 1 (hl)
- ;0x8F - res 1 a
- lda z80_a ;- res 1,a
- and #$FF-$02
- sta z80_a
- ;0x90 - res 2 b
- lda z80_b ;- res 2,b
- and #$FB
- sta z80_b
- ;0x91 - res 2 c
- lda z80_c ;- res 2,c
- and #$FB
- sta z80_c
- ;0x92 - res 2 d
- lda z80_d ;- res 2,d
- and #$FB
- sta z80_d
- ;0x93 - res 2 e
- lda z80_e ;- res 2,e
- and #$FB
- sta z80_e
- ;0x94 - res 2 h
- lda z80_h ;- res 2,h
- and #$FB
- sta z80_h
- ;0x95 - res 2 l
- lda z80_l ;- res 2,l
- and #$FB
- sta z80_l
- ;0x96 - res 2,(hl)
- ldy #$00 ;- res 2,(hl)
- lda (z80_hl),y
- and #$FB
- sta (z80_hl),y
- ;0x97 - res 2 a
- lda z80_a ;- res 2,a
- and #$FB
- sta z80_a
- ;0x98 - res 3 b
- lda z80_b ;- res 3,b
- and #$F7
- sta z80_b
- ;0x99 - res 3 c
- lda z80_c ;- res 3,c
- and #$F7
- sta z80_c
- ;0x9A - res 3,d
- lda z80_d ;- res 3,d
- and #$F7
- sta z80_d
- ;0x9B - res 3,e
- lda z80_e ;- res 3,e
- and #$F7
- sta z80_e
- ;0x9C - res 3,h
- lda z80_h ;- res 3,h
- and #$F7
- sta z80_h
- ;0x9D - res 3,l
- lda z80_l ;- res 3,l
- and #$F7
- sta z80_l
- ;0x9E - res 3,(hl)
- ldy #$00 ;- res 3,(hl)
- lda (z80_hl),y
- and #$F7
- sta (z80_hl),y
- ;0x9F - res 3,a
- lda z80_a ;- res 3,a
- and #$F7
- sta z80_a
- ;0xA0 - res 4,b
- lda z80_b ;- res 4,b
- and #$EF
- sta z80_b
- ;0xA1 - res 4,c
- lda z80_c ;- res 4,c
- and #$EF
- sta z80_c
- ;0xA2 - res 4,d
- lda z80_d ;- res 4,d
- and #$EF
- sta z80_d
- ;0xA3 - res 4,e
- lda z80_e ;- res 4,e
- and #$EF
- sta z80_e
- ;0xA4 - res 4,h
- lda z80_h ;- res 4,h
- and #$EF
- sta z80_h
- ;0xA5 - res 4,l
- lda z80_l ;- res 4,l
- and #$EF
- sta z80_l
- ;0xA6 - res 4,(hl)
- ldy #$00 ;- res 4,(hl)
- lda (z80_hl),y
- and #$EF
- sta (z80_hl),y
- ;0xA7 - res 4,a
- lda z80_a ;- res 4,a
- and #$EF
- sta z80_a
- ;0xA8 - res 5,b
- lda z80_b ;- res 5,b
- and #$DF
- sta z80_b
- ;0xA9 - res 5,c
- lda z80_c ;- res 5,c
- and #$DF
- sta z80_c
- ;0xAA - res 5,d
- lda z80_d ;- res 5,d
- and #$DF
- sta z80_d
- ;0xAB - res 5,e
- lda z80_e ;- res 5,e
- and #$DF
- sta z80_e
- ;0xAC - res 5,h
- lda z80_h ;- res 5,h
- and #$DF
- sta z80_h
- ;0xAD - res 5,l
- lda z80_l ;- res 5,l
- and #$DF
- sta z80_l
- ;0xAE - res 5,(hl)
- ldy #$00 ;- res 5,(hl)
- lda (z80_hl),y
- and #$DF
- sta (z80_hl),y
- ;0xAF - res 5,a
- lda z80_a ;- res 5,a
- and #$DF
- sta z80_a
- ;0xB0 - res 6,b
- lda z80_b ;- res 6,b
- and #$FF-$40
- sta z80_b
- ;0xB1 - res 6,c
- lda z80_c ;- res 6,c
- and #$FF-$40
- sta z80_c
- ;0xB2 - res 6,d
- lda z80_d ;- res 6,d
- and #$FF-$40
- sta z80_d
- ;0xB3 - res 6,e
- lda z80_e ;- res 6,e
- and #$FF-$40
- sta z80_e
- ;0xB4 - res 6,h
- lda z80_h ;- res 6,h
- and #$FF-$40
- sta z80_h
- ;0xB5 - res 6,l
- lda z80_l ;- res 6,l
- and #$FF-$40
- sta z80_l
- ;0xB6 - res 6,(hl)
- ;0xB7 - res 6,a
- lda z80_a ;- res 6,a
- and #$FF-$40
- sta z80_a
- ;0xB8 - res 7,b
- lda z80_b ;- res 7,b
- and #$FF-$80
- sta z80_b
- ;0xB9 - res 7,c
- lda z80_c ;- res 7,c
- and #$FF-$80
- sta z80_c
- ;0xBA - res 7,d
- lda z80_d ;- res 7,d
- and #$FF-$80
- sta z80_d
- ;0xBB - res 7,e
- lda z80_e ;- res 7,e
- and #$FF-$80
- sta z80_e
- ;0xBC - res 7,h
- lda z80_h ;- res 7,h
- and #$FF-$80
- sta z80_h
- ;0xBD - res 7,l
- lda z80_l ;- res 7,l
- and #$FF-$80
- sta z80_l
- ;0xBE - res 7,(hl)
- ;0xBF - res 7,a
- lda z80_a ;- res 7,a
- and #$FF-$80
- sta z80_a
- ;0xC0 - set 0,b
- lda z80_b ;- set 0,b
- ora #$01
- sta z80_b
- ;0xC1 - set 0,c
- lda z80_c ;- set 0,c
- ora #$01
- sta z80_c
- ;0xC2 - set 0,d
- lda z80_d ;- set 0,d
- ora #$01
- sta z80_d
- ;0xC3 - set 0,e
- lda z80_e ;- set 0,e
- ora #$01
- sta z80_e
- ;0xC4 - set 0,h
- lda z80_h ;- set 0,h
- ora #$01
- sta z80_h
- ;0xC5 - set 0,l
- lda z80_l ;- set 0,l
- ora #$01
- sta z80_l
- ;0xC6 - set 0,(hl)
- ldy #$00 ;- set 0,(hl)
- lda (z80_hl),y
- ora #$01
- sta (z80_hl),y
- ;0xC7 - set 0,a
- lda z80_a ;- set 0,a
- ora #$01
- sta z80_a
- ;0xC8 - set 1,b
- lda z80_b ;- set 1,b
- ora #$02
- sta z80_b
- ;0xC9 - set 1,c
- lda z80_c ;- set 1,c
- ora #$02
- sta z80_c
- ;0xCA - set 1,d
- lda z80_d ;- set 1,d
- ora #$02
- sta z80_d
- ;0xCB - set 1,e
- lda z80_e ;- set 1,e
- ora #$02
- sta z80_e
- ;0xCC - set 1,h
- lda z80_h ;- set 1,h
- ora #$02
- sta z80_h
- ;0xCD - set 1,l
- lda z80_l ;- set 1,l
- ora #$02
- sta z80_l
- ;0xCE - set 1,(hl)
- ldy #$00 ;- set 1,(hl)
- lda (z80_hl),y
- ora #$02
- sta (z80_hl),y
- ;0xCF - set 1,a
- lda z80_a ;- set 1,a
- ora #$02
- sta z80_a
- ;0xD0 - set 2,b
- lda z80_b ;- set 2,b
- ora #$04
- sta z80_b
- ;0xD1 - set 2,c
- lda z80_c ;- set 2,c
- ora #$04
- sta z80_c
- ;0xD2 - set 2,d
- lda z80_d ;- set 2,d
- ora #$04
- sta z80_d
- ;0xD3 - set 2,e
- lda z80_e ;- set 2,e
- ora #$04
- sta z80_e
- ;0xD4 - set 2,h
- lda z80_h ;- set 2,h
- ora #$04
- sta z80_h
- ;0xD5 - set 2,l
- lda z80_l ;- set 2,l
- ora #$04
- sta z80_l
- ;0xD6 - set 2,(hl)
- ldy #$00 ;- set 2,(hl)
- lda (z80_hl),y
- ora #$04
- sta (z80_hl),y
- ;0xD7 - set 2,a
- lda z80_a ;- set 2,a
- ora #$04
- sta z80_a
- ;0xD8 - set 3,b
- lda z80_b ;- set 3,b
- ora #$08
- sta z80_b
- ;0xD9 - set 3,c
- lda z80_c ;- set 3,c
- ora #$08
- sta z80_c
- ;0xDA - set 3,d
- lda z80_d ;- set 3,d
- ora #$08
- sta z80_d
- ;0xDB - set 3,e
- lda z80_e ;- set 3,e
- ora #$08
- sta z80_e
- ;0xDC - set 3,h
- lda z80_h ;- set 3,h
- ora #$08
- sta z80_h
- ;0xDD - set 3,l
- lda z80_l ;- set 3,l
- ora #$08
- sta z80_l
- ;0xDE - set 3,(hl)
- ldy #$00 ;- set 3,(hl)
- lda (z80_hl),y
- ora #$08
- sta (z80_hl),y
- ;0xDF - set 3,a
- lda z80_a ;- set 3,a
- ora #$08
- sta z80_a
- ;0xE0 - set 4,b
- lda z80_b ;- set 4,b
- ora #$10
- sta z80_b
- ;0xE1 - set 4,c
- lda z80_c ;- set 4,c
- ora #$10
- sta z80_c
- ;0xE2 - set 4,d
- lda z80_d ;- set 4,d
- ora #$10
- sta z80_d
- ;0xE3 - set 4,e
- lda z80_e ;- set 4,e
- ora #$10
- sta z80_e
- ;0xE4 - set 4,h
- lda z80_h ;- set 4,h
- ora #$10
- sta z80_h
- ;0xE5 - set 4,l
- lda z80_l ;- set 4,l
- ora #$10
- sta z80_l
- ;0xE6 - set 4,(hl)
- ldy #$00 ;- set 4,(hl)
- lda (z80_hl),y
- ora #$10
- sta (z80_hl),y
- ;0xE7 - set 4,a
- lda z80_a ;- set 4,a
- ora #$10
- sta z80_a
- ;0xE8 - set 5,b
- lda z80_b ;- set 5,b
- ora #$20
- sta z80_b
- ;0xE9 - set 5,c
- lda z80_c ;- set 5,c
- ora #$20
- sta z80_c
- ;0xEA - set 5,d
- lda z80_d ;- set 5,d
- ora #$20
- sta z80_d
- ;0xEB - set 5,e
- lda z80_e ;- set 5,e
- ora #$20
- sta z80_e
- ;0xEC - set 5,h
- lda z80_h ;- set 5,h
- ora #$20
- sta z80_h
- ;0xED - set 5,l
- lda z80_l ;- set 5,l
- ora #$20
- sta z80_l
- ;0xEE - set 5,(hl)
- ldy #$00 ;- set 5,(hl)
- lda (z80_hl),y
- ora #$20
- sta (z80_hl),y
- ;0xEF - set 5,a
- lda z80_a ;- set 5,a
- ora #$20
- sta z80_a
- ;0xF0 - set 6,b
- lda z80_b ;- set 6,b
- ora #$40
- sta z80_b
- ;0xF1 - set 6,c
- lda z80_c ;- set 6,c
- ora #$40
- sta z80_c
- ;0xF2 - set 6,d
- lda z80_d ;- set 6,d
- ora #$40
- sta z80_d
- ;0xF3 - set 6,e
- lda z80_e ;- set 6,e
- ora #$40
- sta z80_e
- ;0xF4 - set 6,h
- lda z80_h ;- set 6,h
- ora #$40
- sta z80_h
- ;0xF5 - set 6,l
- lda z80_l ;- set 6,l
- ora #$40
- sta z80_l
- ;0xF6 - set 6,(hl)
- ldy #$00 ;- set 6,(hl)
- lda (z80_hl),y
- ora #$40
- sta (z80_hl),y
- ;0xF7 - set 6,a
- lda z80_a ;- set 6,a
- ora #$40
- sta z80_a
- ;0xF8 - set 7,b
- lda z80_b ;- set 7,b
- ora #$80
- sta z80_b
- ;0xF9 - set 7,c
- lda z80_c ;- set 7,c
- ora #$80
- sta z80_c
- ;0xFA - set 7,d
- lda z80_d ;- set 7,d
- ora #$80
- sta z80_d
- ;0xFB - set 7,e
- lda z80_e ;- set 7,e
- ora #$80
- sta z80_e
- ;0xFC - set 7,h
- lda z80_h ;- set 7,h
- ora #$80
- sta z80_h
- ;0xFD - set 7,l
- lda z80_l ;- set 7,l
- ora #$80
- sta z80_l
- ;0xFE - set 7,(hl)
- ldy #$00 ;- set 7,(hl)
- lda (z80_hl),y
- ora #$80
- sta (z80_hl),y
- ;0xFF - set 7,a
- lda z80_a ;- set 7,a
- ora #$80
- sta z80_a
- ;--------------------- extended opcodes - DD -----------------------------------
- ;0x09 - add ix,bc
- lda z80_ix ;- add ix,bc
- clc
- adc z80_c
- sta z80_ix
- lda z80_ix+1
- adc z80_b
- sta z80_ix+1
- ;0x19 - add ix,de
- lda z80_ix ;- add ix,de
- clc
- adc z80_e
- sta z80_ix
- lda z80_ix+1
- adc z80_d
- sta z80_ix+1
- ;0x21 - ld ix,nn
- lda #<nn ;- ld ix,nn
- sta z80_ix
- lda #>nn
- sta z80_ix+1
- ;0x22 - ld (nn),ix
- lda z80_ix ;- ld (nn),hl
- sta nn
- lda z80_ix+1
- sta nn+1
- ;0x23 - inc ix
- inc z80_ix ;- inc ix
- bne *+4
- inc z80_ix+1
- ;0x24 - inc ixh
- inc z80_ixh ;- inc ixh
- ;0x25 - dec ixh
- dec z80_ixh ;- dec ixh
- ;0x26 - ld ixh,n
- ;0x29 - add ix,ix
- ;0x2A - ld ix,(nn)
- ;0x2B - dec ix
- ;0x2C - inc ixl
- ;0x2D - dec ixl
- ;0x2E - ld ixl,n
- ;0x34 - inc (ix+n)
- ;0x35 - dec (ix+n)
- ;0x36 - ld (ix+n),n
- ;0x39 - add ix,sp
- ;0x44 - ld b,ixh
- lda z80_ixh ;- ld b,ixh
- sta z80_b
- ;0x45 - ld b,ixl
- lda z80_ixl ;- ld b,ixl
- sta z80_b
- ;0x46 - ld b,(ix+n)
- ;0x4C - ld c,ixh
- lda z80_ixh ;- ld c,ixh
- sta z80_c
- ;0x4D - ld c,ixl
- lda z80_ixl ;- ld c,ixl
- sta z80_c
- ;0x4E - ld c,(ix+n)
- ;0x54 - ld d,ixh
- lda z80_ixh ;- ld d,ixh
- sta z80_d
- ;0x55 - ld d,ixl
- lda z80_ixl ;- ld d,ixl
- sta z80_d
- ;0x56 - ld d,(ix+n)
- ;0x5C - ld e,ixh
- lda z80_ixh ;- ld e,ixh
- sta z80_e
- ;0x5D - ld e,ixl
- lda z80_ixl ;- ld e,ixl
- sta z80_e
- ;0x5E - ld e,(ix+n)
- ;0x60 - ld ixh,b
- lda z80_b ;- ld ixh,b
- sta z80_ixh
- ;0x61 - ld ixh,c
- lda z80_c ;- ld ixh,c
- sta z80_ixh
- ;0x62 - ld ixh,d
- lda z80_d ;- ld ixh,d
- sta z80_ixh
- ;0x63 - ld ixh,e
- lda z80_e ;- ld ixh,e
- sta z80_ixh
- ;0x64 - ld ixh,h
- lda z80_h ;- ld ixh,h
- sta z80_ixh
- ;0x65 - ld ixh,l
- lda z80_l ;- ld ixh,l
- sta z80_ixh
- ;0x66 - ld h,(ix+n)
- ;0x67 - ld ixh,a
- lda z80_a ;- ld ixh,a
- sta z80_ixh
- ;0x68 - ld ixl,b
- lda z80_b ;- ld ixh,b
- sta z80_ixl
- ;0x69 - ld ixl,c
- lda z80_c ;- ld ixh,c
- sta z80_ixl
- ;0x6A - ld ixl,d
- lda z80_d ;- ld ixh,d
- sta z80_ixl
- ;0x6B - ld ixl,e
- lda z80_e ;- ld ixh,e
- sta z80_ixl
- ;0x6C - ld ixl,h
- lda z80_h ;- ld ixh,h
- sta z80_ixl
- ;0x6D - ld ixl,l
- lda z80_l ;- ld ixh,l
- sta z80_ixl
- ;0x6E - ld l,(ix+n)
- ;0x6F - ld ixl,a
- lda z80_a ;- ld ixh,a
- sta z80_ixl
- ;0x70 - ld (ix+n),b
- ;0x71 - ld (ix+n),c
- ;0x72 - ld (ix+n),d
- ;0x73 - ld (ix+n),e
- ;0x74 - ld (ix+n),h
- ;0x75 - ld (ix+n),l
- ;0x77 - ld (ix+n),a
- ;0x7C - ld a,ixh
- ;0x7D - ld a,ixl
- ;0x7E - ld a,(ix+n)
- ;0x84 - add a,ixh
- clc ;- add a,ixh
- adc z80_ixh
- ;0x85 - add a,ixl
- ;0x86 - add a,(ix+n)
- ;0x8C - adc a,ixh
- ;0x8D - adc a,ixl
- ;0x8E - adc a,(ix+n)
- ;0x94 - sub ixh
- ;0x95 - sub ixl
- ;0x96 - sub (ix+n)
- ;0x9C - sbc ixh
- ;0x9D - sbc ixl
- ;0x9E - sbc (ix+n)
- ;0xA4 - and ixh
- ;0xA5 - and ixl
- ;0xA6 - and (ix+n)
- ;0xAC - xor ixh
- ;0xAD - xor ixl
- ;0xAE - xor (ix+n)
- ;0xB4 - or ixh
- ;0xB5 - or ixl
- ;0xB6 - or (ix+n)
- ;0xBC - cp ixh
- ;0xBD - cp ixl
- ;0xBE - cp (ix+n)
- ;0xE1 - pop ix
- pla ;- pop ix
- sta z80_ix+1
- pla
- sta z80_ix
- ;0xE3 - ex (sp),ix
- ;0xE5 - push ix
- lda z80_ix ;- push ix
- pha
- lda z80_ix+1
- pha
- ;0xE9 - jp (ix)
- ;0xF9 - ld sp,ix
- ;--------------------- extended opcodes - DD CB --------------------------------
- ;0x00 - rlc (ix+n),b
- ;0x01 - rlc (ix+n),c
- ;0x02 - rlc (ix+n),d
- ;0x03 - rlc (ix+n),e
- ;0x04 - rlc (ix+n),h
- ;0x05 - rlc (ix+n),l
- ;0x06 - rlc (ix+n)
- ;0x07 - rlc (ix+n),a
- ;0x08 - rrc (ix+n),b
- ;0x09 - rrc (ix+n),c
- ;0x0A - rrc (ix+n),d
- ;0x0B - rrc (ix+n),e
- ;0x0C - rrc (ix+n),h
- ;0x0D - rrc (ix+n),l
- ;0x0E - rrc (ix+n)
- ;0x0F - rrc (ix+n),a
- ;0x10 - rl (ix+n),b
- ;0x11 - rl (ix+n),c
- ;0x12 - rl (ix+n),d
- ;0x13 - rl (ix+n),e
- ;0x14 - rl (ix+n),h
- ;0x15 - rl (ix+n),l
- ;0x16 - rl (ix+n)
- ;0x17 - rl (ix+n),a
- ;0x18 - rr (ix+n),b
- ;0x19 - rr (ix+n),c
- ;0x0A - rr (ix+n),d
- ;0x1B - rr (ix+n),e
- ;0x1C - rr (ix+n),h
- ;0x1D - rr (ix+n),l
- ;0x1E - rr (ix+n)
- ;0x1F - rr (ix+n),a
- ;0x20 - sla (ix+n),b
- ;0x21 - sla (ix+n),c
- ;0x22 - sla (ix+n),d
- ;0x23 - sla (ix+n),e
- ;0x24 - sla (ix+n),h
- ;0x25 - sla (ix+n),l
- ;0x26 - sla (ix+n)
- ;0x27 - sla (ix+n),a
- ;0x28 - sra (ix+n),b
- ;0x29 - sra (ix+n),c
- ;0x2A - sra (ix+n),d
- ;0x2B - sra (ix+n),e
- ;0x2C - sra (ix+n),h
- ;0x2D - sra (ix+n),l
- ;0x2E - sra (ix+n)
- ;0x2F - sra (ix+n),a
- ;0x30 - sll (ix+n),b
- ;0x31 - sll (ix+n),c
- ;0x32 - sll (ix+n),d
- ;0x33 - sll (ix+n),e
- ;0x34 - sll (ix+n),h
- ;0x35 - sll (ix+n),l
- ;0x36 - sll (ix+n)
- ;0x37 - sll (ix+n),a
- ;0x38 - srl (ix+n),b
- ;0x39 - srl (ix+n),c
- ;0x3A - srl (ix+n),d
- ;0x3B - srl (ix+n),e
- ;0x3C - srl (ix+n),h
- ;0x3D - srl (ix+n),l
- ;0x3E - srl (ix+n)
- ;0x3F - srl (ix+n),a
- ;0x46 - bit 0,(ix+n)
- ldy #n ;- bit 0,(ix+n)
- lda (z80_ix),y
- bit #$01
- ;0x4E - bit 1,(ix+n)
- ldy #n ;- bit 1,(ix+n)
- lda (z80_ix),y
- bit #$02
- ;0x56 - bit 2,(ix+n)
- ldy #n ;- bit 2,(ix+n)
- lda (z80_ix),y
- bit #$04
- ;0x5E - bit 3,(ix+n)
- ldy #n ;- bit 3,(ix+n)
- lda (z80_ix),y
- bit #$08
- ;0x66 - bit 4,(ix+n)
- ldy #n ;- bit 4,(ix+n)
- lda (z80_ix),y
- bit #$10
- ;0x6E - bit 5,(ix+n)
- ldy #n ;- bit 5,(ix+n)
- lda (z80_ix),y
- bit #$20
- ;0x76 - bit 6,(ix+n)
- ldy #n ;- bit 6,(ix+n)
- lda (z80_ix),y
- bit #$40
- ;0x7E - bit 7,(ix+n)
- ldy #n ;- bit 7,(ix+n)
- lda (z80_ix),y
- bit #$80
- ;0x80 - res 0,(ix+n),b
- ldy #n ;- res 0,(ix+n),b
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_b
- ;0x81 - res 0,(ix+n),c
- ldy #n ;- res 0,(ix+n),c
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_c
- ;0x82 - res 0,(ix+n),d
- ldy #n ;- res 0,(ix+n),d
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_d
- ;0x83 - res 0,(ix+n),e
- ldy #n ;- res 0,(ix+n),e
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_e
- ;0x84 - res 0,(ix+n),h
- ldy #n ;- res 0,(ix+n),h
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_h
- ;0x85 - res 0,(ix+n),l
- ldy #n ;- res 0,(ix+n),l
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_l
- ;0x86 - res 0,(ix+n)
- ldy #n ;- res 0,(ix+n)
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- ;0x87 - res 0,(ix+n),a
- ldy #n ;- res 0,(ix+n),a
- lda (z80_ix),y
- and #$FE
- sta (z80_ix),y
- sta z80_a
- ;0x88 - res 1,(ix+n),b
- ldy #n ;- res 1,(ix+n),b
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_b
- ;0x89 - res 1,(ix+n),c
- ldy #n ;- res 1,(ix+n),c
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_c
- ;0x8A - res 1,(ix+n),d
- ldy #n ;- res 1,(ix+n),d
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_d
- ;0x8B - res 1,(ix+n),e
- ldy #n ;- res 1,(ix+n),e
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_e
- ;0x8C - res 1,(ix+n),h
- ldy #n ;- res 1,(ix+n),h
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_h
- ;0x8D - res 1,(ix+n),l
- ldy #n ;- res 1,(ix+n),l
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_l
- ;0x8E - res 1,(ix+n)
- ldy #n ;- res 1,(ix+n)
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- ;0x8F - res 1,(ix+n),a
- ldy #n ;- res 1,(ix+n),a
- lda (z80_ix),y
- and #$FD
- sta (z80_ix),y
- sta z80_a
- ;0x90 - res 2,(ix+n),b
- ldy #n ;- res 2,(ix+n),b
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_b
- ;0x91 - res 2,(ix+n),c
- ldy #n ;- res 2,(ix+n),c
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_c
- ;0x92 - res 2,(ix+n),d
- ldy #n ;- res 2,(ix+n),d
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_d
- ;0x93 - res 2,(ix+n),e
- ldy #n ;- res 2,(ix+n),e
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_e
- ;0x94 - res 2,(ix+n),h
- ldy #n ;- res 2,(ix+n),h
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_h
- ;0x95 - res 2,(ix+n),l
- ldy #n ;- res 2,(ix+n),l
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_l
- ;0x96 - res 2,(ix+n)
- ldy #n ;- res 2,(ix+n)
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- ;0x97 - res 2,(ix+n),a
- ldy #n ;- res 2,(ix+n),a
- lda (z80_ix),y
- and #$FB
- sta (z80_ix),y
- sta z80_a
- ;0x98 - res 3,(ix+n),b
- ldy #n ;- res 3,(ix+n),b
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_b
- ;0x99 - res 3,(ix+n),c
- ldy #n ;- res 3,(ix+n),c
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_c
- ;0x9A - res 3,(ix+n),d
- ldy #n ;- res 3,(ix+n),d
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_d
- ;0x9B - res 3,(ix+n),e
- ldy #n ;- res 3,(ix+n),e
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_e
- ;0x9C - res 3,(ix+n),h
- ldy #n ;- res 3,(ix+n),h
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_h
- ;0x9D - res 3,(ix+n),l
- ldy #n ;- res 3,(ix+n),l
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_l
- ;0x9E - res 3,(ix+n)
- ldy #n ;- res 3,(ix+n)
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- ;0x9F - res 3,(ix+n),a
- ldy #n ;- res 3,(ix+n),a
- lda (z80_ix),y
- and #$F7
- sta (z80_ix),y
- sta z80_a
- ;0xA0 - res 4,(ix+n),b
- ldy #n ;- res 4,(ix+n),b
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_b
- ;0xA1 - res 4,(ix+n),c
- ldy #n ;- res 4,(ix+n),c
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_c
- ;0xA2 - res 4,(ix+n),d
- ldy #n ;- res 4,(ix+n),d
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_d
- ;0xA3 - res 4,(ix+n),e
- ldy #n ;- res 4,(ix+n),e
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_e
- ;0xA4 - res 4,(ix+n),h
- ldy #n ;- res 4,(ix+n),h
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_h
- ;0xA5 - res 4,(ix+n),l
- ldy #n ;- res 4,(ix+n),l
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_l
- ;0xA6 - res 4,(ix+n)
- ldy #n ;- res 4,(ix+n)
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- ;0xA7 - res 4,(ix+n),a
- ldy #n ;- res 4,(ix+n),a
- lda (z80_ix),y
- and #$EF
- sta (z80_ix),y
- sta z80_a
- ;0xA8 - res 5,(ix+n),b
- ldy #n ;- res 5,(ix+n),b
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_b
- ;0xA9 - res 5,(ix+n),c
- ldy #n ;- res 5,(ix+n),c
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_c
- ;0xAA - res 5,(ix+n),d
- ldy #n ;- res 5,(ix+n),d
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_d
- ;0xAB - res 5,(ix+n),e
- ldy #n ;- res 5,(ix+n),e
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_e
- ;0xAC - res 5,(ix+n),h
- ldy #n ;- res 5,(ix+n),h
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_h
- ;0xAD - res 5,(ix+n),l
- ldy #n ;- res 5,(ix+n),l
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_l
- ;0xAE - res 5,(ix+n)
- ldy #n ;- res 5,(ix+n)
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- ;0xAF - res 5,(ix+n),a
- ldy #n ;- res 5,(ix+n),a
- lda (z80_ix),y
- and #$DF
- sta (z80_ix),y
- sta z80_a
- ;0xB0 - res 6,(ix+n),b
- ldy #n ;- res 6,(ix+n),b
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_b
- ;0xB1 - res 6,(ix+n),c
- ldy #n ;- res 6,(ix+n),c
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_c
- ;0xB2 - res 6,(ix+n),d
- ldy #n ;- res 6,(ix+n),d
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_d
- ;0xB3 - res 6,(ix+n),e
- ldy #n ;- res 6,(ix+n),e
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_e
- ;0xB4 - res 6,(ix+n),h
- ldy #n ;- res 6,(ix+n),h
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_h
- ;0xB5 - res 6,(ix+n),l
- ldy #n ;- res 6,(ix+n),l
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_l
- ;0xB6 - res 6,(ix+n)
- ldy #n ;- res 6,(ix+n)
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- ;0xB7 - res 6,(ix+n),a
- ldy #n ;- res 6,(ix+n),a
- lda (z80_ix),y
- and #$BF
- sta (z80_ix),y
- sta z80_a
- ;0xB8 - res 7,(ix+n),b
- ldy #n ;- res 7,(ix+n),b
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_b
- ;0xB9 - res 7,(ix+n),c
- ldy #n ;- res 7,(ix+n),c
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_c
- ;0xBA - res 7,(ix+n),d
- ldy #n ;- res 7,(ix+n),d
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_d
- ;0xBB - res 7,(ix+n),e
- ldy #n ;- res 7,(ix+n),e
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_e
- ;0xBC - res 7,(ix+n),h
- ldy #n ;- res 7,(ix+n),h
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_h
- ;0xBD - res 7,(ix+n),l
- ldy #n ;- res 7,(ix+n),l
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_l
- ;0xBE - res 7,(ix+n)
- ldy #n ;- res 7,(ix+n)
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- ;0xBF - res 7,(ix+n),a
- ldy #n ;- res 7,(ix+n),a
- lda (z80_ix),y
- and #$7F
- sta (z80_ix),y
- sta z80_a
- ;0xC0 - set 0,(ix+n),b
- ldy #n ;- set 0,(ix+n),b
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_b
- ;0xC1 - set 0,(ix+n),c
- ldy #n ;- set 0,(ix+n),c
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_c
- ;0xC2 - set 0,(ix+n),d
- ldy #n ;- set 0,(ix+n),d
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_d
- ;0xC3 - set 0,(ix+n),e
- ldy #n ;- set 0,(ix+n),e
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_e
- ;0xC4 - set 0,(ix+n),h
- ldy #n ;- set 0,(ix+n),h
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_h
- ;0xC5 - set 0,(ix+n),l
- ldy #n ;- set 0,(ix+n),l
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_l
- ;0xC6 - set 0,(ix+n)
- ldy #n ;- set 0,(ix+n)
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- ;0xC7 - set 0,(ix+n),a
- ldy #n ;- set 0,(ix+n),a
- lda (z80_ix),y
- ora $01
- sta (z80_ix),y
- sta z80_a
- ;0xC8 - set 1,(ix+n),b
- ldy #n ;- set 1,(ix+n),b
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_b
- ;0xC9 - set 1,(ix+n),c
- ldy #n ;- set 1,(ix+n),c
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_c
- ;0xCA - set 1,(ix+n),d
- ldy #n ;- set 1,(ix+n),d
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_d
- ;0xCB - set 1,(ix+n),e
- ldy #n ;- set 1,(ix+n),e
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_e
- ;0xCC - set 1,(ix+n),h
- ldy #n ;- set 1,(ix+n),h
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_h
- ;0xCD - set 1,(ix+n),l
- ldy #n ;- set 1,(ix+n),l
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_l
- ;0xCE - set 1,(ix+n)
- ldy #n ;- set 1,(ix+n)
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- ;0xCF - set 1,(ix+n),a
- ldy #n ;- set 1,(ix+n),a
- lda (z80_ix),y
- ora $02
- sta (z80_ix),y
- sta z80_a
- ;0xD0 - set 2,(ix+n),b
- ldy #n ;- set 2,(ix+n),b
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_b
- ;0xD1 - set 2,(ix+n),c
- ldy #n ;- set 2,(ix+n),c
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_c
- ;0xD2 - set 2,(ix+n),d
- ldy #n ;- set 2,(ix+n),d
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_d
- ;0xD3 - set 2,(ix+n),e
- ldy #n ;- set 2,(ix+n),e
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_e
- ;0xD4 - set 2,(ix+n),h
- ldy #n ;- set 2,(ix+n),h
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_h
- ;0xD5 - set 2,(ix+n),l
- ldy #n ;- set 2,(ix+n),l
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_l
- ;0xD6 - set 2,(ix+n)
- ldy #n ;- set 2,(ix+n)
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- ;0xD7 - set 2,(ix+n),a
- ldy #n ;- set 2,(ix+n),a
- lda (z80_ix),y
- ora $04
- sta (z80_ix),y
- sta z80_a
- ;0xD8 - set 3,(ix+n),b
- ldy #n ;- set 3,(ix+n),b
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_b
- ;0xD9 - set 3,(ix+n),c
- ldy #n ;- set 3,(ix+n),c
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_c
- ;0xDA - set 3,(ix+n),d
- ldy #n ;- set 3,(ix+n),d
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_d
- ;0xDB - set 3,(ix+n),e
- ldy #n ;- set 3,(ix+n),e
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_e
- ;0xDC - set 3,(ix+n),h
- ldy #n ;- set 3,(ix+n),h
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_h
- ;0xDD - set 3,(ix+n),l
- ldy #n ;- set 3,(ix+n),l
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_l
- ;0xDE - set 3,(ix+n)
- ldy #n ;- set 3,(ix+n)
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- ;0xDF - set 3,(ix+n),a
- ldy #n ;- set 3,(ix+n),a
- lda (z80_ix),y
- ora $08
- sta (z80_ix),y
- sta z80_a
- ;0xE0 - set 4,(ix+n),b
- ldy #n ;- set 4,(ix+n),b
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_b
- ;0xE1 - set 4,(ix+n),c
- ldy #n ;- set 4,(ix+n),c
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_c
- ;0xE2 - set 4,(ix+n),d
- ldy #n ;- set 4,(ix+n),d
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_d
- ;0xE3 - set 4,(ix+n),e
- ldy #n ;- set 4,(ix+n),e
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_e
- ;0xE4 - set 4,(ix+n),h
- ldy #n ;- set 4,(ix+n),h
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_h
- ;0xE5 - set 4,(ix+n),l
- ldy #n ;- set 4,(ix+n),l
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_l
- ;0xE6 - set 4,(ix+n)
- ldy #n ;- set 4,(ix+n)
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- ;0xE7 - set 4,(ix+n),a
- ldy #n ;- set 4,(ix+n),a
- lda (z80_ix),y
- ora $10
- sta (z80_ix),y
- sta z80_a
- ;0xE8 - set 5,(ix+n),b
- ldy #n ;- set 5,(ix+n),b
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_b
- ;0xE9 - set 5,(ix+n),c
- ldy #n ;- set 5,(ix+n),c
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_c
- ;0xEA - set 5,(ix+n),d
- ldy #n ;- set 5,(ix+n),d
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_d
- ;0xEB - set 5,(ix+n),e
- ldy #n ;- set 5,(ix+n),e
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_e
- ;0xEC - set 5,(ix+n),h
- ldy #n ;- set 5,(ix+n),h
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_h
- ;0xED - set 5,(ix+n),l
- ldy #n ;- set 5,(ix+n),l
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_l
- ;0xEE - set 5,(ix+n)
- ldy #n ;- set 5,(ix+n)
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- ;0xEF - set 5,(ix+n),a
- ldy #n ;- set 5,(ix+n),a
- lda (z80_ix),y
- ora $20
- sta (z80_ix),y
- sta z80_a
- ;0xF0 - set 6,(ix+n),b
- ldy #n ;- set 6,(ix+n),b
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_b
- ;0xF1 - set 6,(ix+n),c
- ldy #n ;- set 6,(ix+n),c
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_c
- ;0xF2 - set 6,(ix+n),d
- ldy #n ;- set 6,(ix+n),d
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_d
- ;0xF3 - set 6,(ix+n),e
- ldy #n ;- set 6,(ix+n),e
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_e
- ;0xF4 - set 6,(ix+n),h
- ldy #n ;- set 6,(ix+n),h
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_h
- ;0xF5 - set 6,(ix+n),l
- ldy #n ;- set 6,(ix+n),l
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_l
- ;0xF6 - set 6,(ix+n)
- ldy #n ;- set 6,(ix+n)
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- ;0xF7 - set 6,(ix+n),a
- ldy #n ;- set 6,(ix+n),a
- lda (z80_ix),y
- ora $40
- sta (z80_ix),y
- sta z80_a
- ;0xF8 - set 7,(ix+n),b
- ldy #n ;- set 7,(ix+n),b
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_b
- ;0xF9 - set 7,(ix+n),c
- ldy #n ;- set 7,(ix+n),c
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_c
- ;0xFA - set 7,(ix+n),d
- ldy #n ;- set 7,(ix+n),d
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_d
- ;0xFB - set 7,(ix+n),e
- ldy #n ;- set 7,(ix+n),e
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_e
- ;0xFC - set 7,(ix+n),h
- ldy #n ;- set 7,(ix+n),h
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_h
- ;0xFD - set 7,(ix+n),l
- ldy #n ;- set 7,(ix+n),l
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_l
- ;0xFE - set 7,(ix+n)
- ldy #n ;- set 7,(ix+n)
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- ;0xFF - set 7,(ix+n),a
- ldy #n ;- set 7,(ix+n),a
- lda (z80_ix),y
- ora $80
- sta (z80_ix),y
- sta z80_a
- ;--------------------- extended opcodes - FD -----------------------------------
- ;0x09 - add iy,bc
- ;0x19 - add iy,de
- ;0x21 - ld iy,nn
- ;0x22 - ld (nn),iy
- ;0x23 - inc iy
- ;0x24 - inc iyh
- ;0x25 - dec iyh
- ;0x26 - ld iyh,n
- ;0x29 - add iy,iy
- ;0x2A - ld iy,(nn)
- ;0x2B - dec iy
- ;0x2C - inc iyl
- ;0x2D - dec iyl
- ;0x2E - ld iyl,n
- ;0x34 - inc (iy+n)
- ;0x35 - dec (iy+n)
- ;0x36 - ld (iy+n),n
- ;0x39 - add iy,sp
- ;0x44 - ld b,iyh
- ;0x45 - ld b,iyl
- ;0x46 - ld b,(iy+n)
- ;0x4C - ld c,iyh
- ;0x4D - ld c,iyl
- ;0x4E - ld c,(iy+n)
- ;0x54 - ld d,iyh
- ;0x55 - ld d,iyl
- ;0x56 - ld d,(iy+n)
- ;0x5C - ld e,iyh
- ;0x5D - ld e,iyl
- ;0x5E - ld e,(iy+n)
- ;0x60 - ld iyh,b
- ;0x61 - ld iyh,c
- ;0x62 - ld iyh,d
- ;0x63 - ld iyh,e
- ;0x64 - ld iyh,h
- ;0x65 - ld iyh,l
- ;0x66 - ld h,(iy+n)
- ;0x67 - ld iyh,a
- ;0x68 - ld iyl,b
- ;0x69 - ld iyl,c
- ;0x6A - ld iyl,d
- ;0x6B - ld iyl,e
- ;0x6C - ld iyl,h
- ;0x6D - ld iyl,l
- ;0x6E - ld l,(iy+n)
- ;0x6F - ld iyl,a
- ;0x70 - ld (iy+n),b
- ;0x71 - ld (iy+n),c
- ;0x72 - ld (iy+n),d
- ;0x73 - ld (iy+n),e
- ;0x74 - ld (iy+n),h
- ;0x75 - ld (iy+n),l
- ;0x77 - ld (iy+n),a
- ;0x7C - ld a,iyh
- ;0x7D - ld a,iyl
- ;0x7E - ld a,(iy+n)
- ;0x84 - add a,iyh
- ;0x85 - add a,iyl
- ;0x86 - add a,(iy+n)
- ;0x8C - adc a,iyh
- ;0x8D - adc a,iyl
- ;0x8E - adc a,(iy+n)
- ;0x94 - sub iyh
- ;0x95 - sub iyl
- ;0x96 - sub (iy+n)
- ;0x9C - sbc iyh
- ;0x9D - sbc iyl
- ;0x9E - sbc (iy+n)
- ;0xA4 - and iyh
- ;0xA5 - and iyl
- ;0xA6 - and (iy+n)
- ;0xAC - xor iyh
- ;0xAD - xor iyl
- ;0xAE - xor (iy+n)
- ;0xB4 - or iyh
- ;0xB5 - or iyl
- ;0xB6 - or (iy+n)
- ;0xBC - cp iyh
- ;0xBD - cp iyl
- ;0xBE - cp (iy+n)
- ;0xE1 - pop iy
- ;0xE3 - ex (sp),iy
- ;0xE5 - push iy
- lda z80_iy ;- push iy
- pha
- lda z80_iy+1
- pha
- ;0xE9 - jp (iy)
- ;0xF9 - ld sp,iy
- ;--------------------- extended opcodes - FD CB --------------------------------
- ;0x00 - rlc (iy+n),b
- ;0x01 - rlc (iy+n),c
- ;0x02 - rlc (iy+n),d
- ;0x03 - rlc (iy+n),e
- ;0x04 - rlc (iy+n),h
- ;0x05 - rlc (iy+n),l
- ;0x06 - rlc (iy+n)
- ;0x07 - rlc (iy+n),a
- ;0x08 - rrc (iy+n),b
- ;0x09 - rrc (iy+n),c
- ;0x0A - rrc (iy+n),d
- ;0x0B - rrc (iy+n),e
- ;0x0C - rrc (iy+n),h
- ;0x0D - rrc (iy+n),l
- ;0x0E - rrc (iy+n)
- ;0x0F - rrc (iy+n),a
- ;0x10 - rl (iy+n),b
- ;0x11 - rl (iy+n),c
- ;0x12 - rl (iy+n),d
- ;0x13 - rl (iy+n),e
- ;0x14 - rl (iy+n),h
- ;0x15 - rl (iy+n),l
- ;0x16 - rl (iy+n)
- ;0x17 - rl (iy+n),a
- ;0x18 - rr (iy+n),b
- ;0x19 - rr (iy+n),c
- ;0x0A - rr (iy+n),d
- ;0x1B - rr (iy+n),e
- ;0x1C - rr (iy+n),h
- ;0x1D - rr (iy+n),l
- ;0x1E - rr (iy+n)
- ;0x1F - rr (iy+n),a
- ;0x20 - sla (iy+n),b
- ;0x21 - sla (iy+n),c
- ;0x22 - sla (iy+n),d
- ;0x23 - sla (iy+n),e
- ;0x24 - sla (iy+n),h
- ;0x25 - sla (iy+n),l
- ;0x26 - sla (iy+n)
- ;0x27 - sla (iy+n),a
- ;0x28 - sra (iy+n),b
- ;0x29 - sra (iy+n),c
- ;0x2A - sra (iy+n),d
- ;0x2B - sra (iy+n),e
- ;0x2C - sra (iy+n),h
- ;0x2D - sra (iy+n),l
- ;0x2E - sra (iy+n)
- ;0x2F - sra (iy+n),a
- ;0x30 - sll (iy+n),b
- ;0x31 - sll (iy+n),c
- ;0x32 - sll (iy+n),d
- ;0x33 - sll (iy+n),e
- ;0x34 - sll (iy+n),h
- ;0x35 - sll (iy+n),l
- ;0x36 - sll (iy+n)
- ;0x37 - sll (iy+n),a
- ;0x38 - srl (iy+n),b
- ;0x39 - srl (iy+n),c
- ;0x3A - srl (iy+n),d
- ;0x3B - srl (iy+n),e
- ;0x3C - srl (iy+n),h
- ;0x3D - srl (iy+n),l
- ;0x3E - srl (iy+n)
- ;0x3F - srl (iy+n),a
- ;0x46 - bit 0,(iy+n)
- ldy #n ;- bit 0,(iy+n)
- lda (z80_iy),y
- bit #$01
- ;0x4E - bit 1,(iy+n)
- ldy #n ;- bit 1,(iy+n)
- lda (z80_iy),y
- bit #$02
- ;0x56 - bit 2,(iy+n)
- ldy #n ;- bit 2,(iy+n)
- lda (z80_iy),y
- bit #$04
- ;0x5E - bit 3,(iy+n)
- ldy #n ;- bit 3,(iy+n)
- lda (z80_iy),y
- bit #$08
- ;0x66 - bit 4,(iy+n)
- ldy #n ;- bit 4,(iy+n)
- lda (z80_iy),y
- bit #$10
- ;0x6E - bit 5,(iy+n)
- ldy #n ;- bit 5,(iy+n)
- lda (z80_iy),y
- bit #$20
- ;0x76 - bit 6,(iy+n)
- ldy #n ;- bit 6,(iy+n)
- lda (z80_iy),y
- bit #$40
- ;0x7E - bit 7,(iy+n)
- ldy #n ;- bit 7,(iy+n)
- lda (z80_iy),y
- bit #$80
- ;0x80 - res 0,(iy+n),b
- ldy #n ;- res 0,(iy+n),b
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_b
- ;0x81 - res 0,(iy+n),c
- ldy #n ;- res 0,(iy+n),c
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_c
- ;0x82 - res 0,(iy+n),d
- ldy #n ;- res 0,(iy+n),d
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_d
- ;0x83 - res 0,(iy+n),e
- ldy #n ;- res 0,(iy+n),e
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_e
- ;0x84 - res 0,(iy+n),h
- ldy #n ;- res 0,(iy+n),h
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_h
- ;0x85 - res 0,(iy+n),l
- ldy #n ;- res 0,(iy+n),l
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_l
- ;0x86 - res 0,(iy+n)
- ldy #n ;- res 0,(iy+n)
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- ;0x87 - res 0,(iy+n),a
- ldy #n ;- res 0,(iy+n),a
- lda (z80_iy),y
- and #$FE
- sta (z80_iy),y
- sta z80_a
- ;0x88 - res 1,(iy+n),b
- ldy #n ;- res 1,(iy+n),b
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_b
- ;0x89 - res 1,(iy+n),c
- ldy #n ;- res 1,(iy+n),c
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_c
- ;0x8A - res 1,(iy+n),d
- ldy #n ;- res 1,(iy+n),d
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_d
- ;0x8B - res 1,(iy+n),e
- ldy #n ;- res 1,(iy+n),e
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_e
- ;0x8C - res 1,(iy+n),h
- ldy #n ;- res 1,(iy+n),h
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_h
- ;0x8D - res 1,(iy+n),l
- ldy #n ;- res 1,(iy+n),l
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_l
- ;0x8E - res 1,(iy+n)
- ldy #n ;- res 1,(iy+n)
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- ;0x8F - res 1,(iy+n),a
- ldy #n ;- res 1,(iy+n),a
- lda (z80_iy),y
- and #$FD
- sta (z80_iy),y
- sta z80_a
- ;0x90 - res 2,(iy+n),b
- ldy #n ;- res 2,(iy+n),b
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_b
- ;0x91 - res 2,(iy+n),c
- ldy #n ;- res 2,(iy+n),c
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_c
- ;0x92 - res 2,(iy+n),d
- ldy #n ;- res 2,(iy+n),d
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_d
- ;0x93 - res 2,(iy+n),e
- ldy #n ;- res 2,(iy+n),e
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_e
- ;0x94 - res 2,(iy+n),h
- ldy #n ;- res 2,(iy+n),h
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_h
- ;0x95 - res 2,(iy+n),l
- ldy #n ;- res 2,(iy+n),l
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_l
- ;0x96 - res 2,(iy+n)
- ldy #n ;- res 2,(iy+n)
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- ;0x97 - res 2,(iy+n),a
- ldy #n ;- res 2,(iy+n),a
- lda (z80_iy),y
- and #$FB
- sta (z80_iy),y
- sta z80_a
- ;0x98 - res 3,(iy+n),b
- ldy #n ;- res 3,(iy+n),b
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_b
- ;0x99 - res 3,(iy+n),c
- ldy #n ;- res 3,(iy+n),c
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_c
- ;0x9A - res 3,(iy+n),d
- ldy #n ;- res 3,(iy+n),d
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_d
- ;0x9B - res 3,(iy+n),e
- ldy #n ;- res 3,(iy+n),e
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_e
- ;0x9C - res 3,(iy+n),h
- ldy #n ;- res 3,(iy+n),h
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_h
- ;0x9D - res 3,(iy+n),l
- ldy #n ;- res 3,(iy+n),l
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_l
- ;0x9E - res 3,(iy+n)
- ldy #n ;- res 3,(iy+n)
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- ;0x9F - res 3,(iy+n),a
- ldy #n ;- res 3,(iy+n),a
- lda (z80_iy),y
- and #$F7
- sta (z80_iy),y
- sta z80_a
- ;0xA0 - res 4,(iy+n),b
- ldy #n ;- res 4,(iy+n),b
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_b
- ;0xA1 - res 4,(iy+n),c
- ldy #n ;- res 4,(iy+n),c
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_c
- ;0xA2 - res 4,(iy+n),d
- ldy #n ;- res 4,(iy+n),d
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_d
- ;0xA3 - res 4,(iy+n),e
- ldy #n ;- res 4,(iy+n),e
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_e
- ;0xA4 - res 4,(iy+n),h
- ldy #n ;- res 4,(iy+n),h
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_h
- ;0xA5 - res 4,(iy+n),l
- ldy #n ;- res 4,(iy+n),l
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_l
- ;0xA6 - res 4,(iy+n)
- ldy #n ;- res 4,(iy+n)
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- ;0xA7 - res 4,(iy+n),a
- ldy #n ;- res 4,(iy+n),a
- lda (z80_iy),y
- and #$EF
- sta (z80_iy),y
- sta z80_a
- ;0xA8 - res 5,(iy+n),b
- ldy #n ;- res 5,(iy+n),b
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_b
- ;0xA9 - res 5,(iy+n),c
- ldy #n ;- res 5,(iy+n),c
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_c
- ;0xAA - res 5,(iy+n),d
- ldy #n ;- res 5,(iy+n),d
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_d
- ;0xAB - res 5,(iy+n),e
- ldy #n ;- res 5,(iy+n),e
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_e
- ;0xAC - res 5,(iy+n),h
- ldy #n ;- res 5,(iy+n),h
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_h
- ;0xAD - res 5,(iy+n),l
- ldy #n ;- res 5,(iy+n),l
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_l
- ;0xAE - res 5,(iy+n)
- ldy #n ;- res 5,(iy+n)
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- ;0xAF - res 5,(iy+n),a
- ldy #n ;- res 5,(iy+n),a
- lda (z80_iy),y
- and #$DF
- sta (z80_iy),y
- sta z80_a
- ;0xB0 - res 6,(iy+n),b
- ldy #n ;- res 6,(iy+n),b
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_b
- ;0xB1 - res 6,(iy+n),c
- ldy #n ;- res 6,(iy+n),c
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_c
- ;0xB2 - res 6,(iy+n),d
- ldy #n ;- res 6,(iy+n),d
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_d
- ;0xB3 - res 6,(iy+n),e
- ldy #n ;- res 6,(iy+n),e
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_e
- ;0xB4 - res 6,(iy+n),h
- ldy #n ;- res 6,(iy+n),h
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_h
- ;0xB5 - res 6,(iy+n),l
- ldy #n ;- res 6,(iy+n),l
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_l
- ;0xB6 - res 6,(iy+n)
- ldy #n ;- res 6,(iy+n)
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- ;0xB7 - res 6,(iy+n),a
- ldy #n ;- res 6,(iy+n),a
- lda (z80_iy),y
- and #$BF
- sta (z80_iy),y
- sta z80_a
- ;0xB8 - res 7,(iy+n),b
- ldy #n ;- res 7,(iy+n),b
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_b
- ;0xB9 - res 7,(iy+n),c
- ldy #n ;- res 7,(iy+n),c
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_c
- ;0xBA - res 7,(iy+n),d
- ldy #n ;- res 7,(iy+n),d
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_d
- ;0xBB - res 7,(iy+n),e
- ldy #n ;- res 7,(iy+n),e
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_e
- ;0xBC - res 7,(iy+n),h
- ldy #n ;- res 7,(iy+n),h
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_h
- ;0xBD - res 7,(iy+n),l
- ldy #n ;- res 7,(iy+n),l
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_l
- ;0xBE - res 7,(iy+n)
- ldy #n ;- res 7,(iy+n)
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- ;0xBF - res 7,(iy+n),a
- ldy #n ;- res 7,(iy+n),a
- lda (z80_iy),y
- and #$7F
- sta (z80_iy),y
- sta z80_a
- ;0xC0 - set 0,(iy+n),b
- ldy #n ;- set 0,(iy+n),b
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_b
- ;0xC1 - set 0,(iy+n),c
- ldy #n ;- set 0,(iy+n),c
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_c
- ;0xC2 - set 0,(iy+n),d
- ldy #n ;- set 0,(iy+n),d
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_d
- ;0xC3 - set 0,(iy+n),e
- ldy #n ;- set 0,(iy+n),e
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_e
- ;0xC4 - set 0,(iy+n),h
- ldy #n ;- set 0,(iy+n),h
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_h
- ;0xC5 - set 0,(iy+n),l
- ldy #n ;- set 0,(iy+n),l
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_l
- ;0xC6 - set 0,(iy+n)
- ldy #n ;- set 0,(iy+n)
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- ;0xC7 - set 0,(iy+n),a
- ldy #n ;- set 0,(iy+n),a
- lda (z80_iy),y
- ora $01
- sta (z80_iy),y
- sta z80_a
- ;0xC8 - set 1,(iy+n),b
- ldy #n ;- set 1,(iy+n),b
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_b
- ;0xC9 - set 1,(iy+n),c
- ldy #n ;- set 1,(iy+n),c
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_c
- ;0xCA - set 1,(iy+n),d
- ldy #n ;- set 1,(iy+n),d
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_d
- ;0xCB - set 1,(iy+n),e
- ldy #n ;- set 1,(iy+n),e
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_e
- ;0xCC - set 1,(iy+n),h
- ldy #n ;- set 1,(iy+n),h
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_h
- ;0xCD - set 1,(iy+n),l
- ldy #n ;- set 1,(iy+n),l
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_l
- ;0xCE - set 1,(iy+n)
- ldy #n ;- set 1,(iy+n)
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- ;0xCF - set 1,(iy+n),a
- ldy #n ;- set 1,(iy+n),a
- lda (z80_iy),y
- ora $02
- sta (z80_iy),y
- sta z80_a
- ;0xD0 - set 2,(iy+n),b
- ldy #n ;- set 2,(iy+n),b
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_b
- ;0xD1 - set 2,(iy+n),c
- ldy #n ;- set 2,(iy+n),c
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_c
- ;0xD2 - set 2,(iy+n),d
- ldy #n ;- set 2,(iy+n),d
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_d
- ;0xD3 - set 2,(iy+n),e
- ldy #n ;- set 2,(iy+n),e
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_e
- ;0xD4 - set 2,(iy+n),h
- ldy #n ;- set 2,(iy+n),h
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_h
- ;0xD5 - set 2,(iy+n),l
- ldy #n ;- set 2,(iy+n),l
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_l
- ;0xD6 - set 2,(iy+n)
- ldy #n ;- set 2,(iy+n)
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- ;0xD7 - set 2,(iy+n),a
- ldy #n ;- set 2,(iy+n),a
- lda (z80_iy),y
- ora $04
- sta (z80_iy),y
- sta z80_a
- ;0xD8 - set 3,(iy+n),b
- ldy #n ;- set 3,(iy+n),b
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_b
- ;0xD9 - set 3,(iy+n),c
- ldy #n ;- set 3,(iy+n),c
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_c
- ;0xDA - set 3,(iy+n),d
- ldy #n ;- set 3,(iy+n),d
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_d
- ;0xDB - set 3,(iy+n),e
- ldy #n ;- set 3,(iy+n),e
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_e
- ;0xDC - set 3,(iy+n),h
- ldy #n ;- set 3,(iy+n),h
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_h
- ;0xDD - set 3,(iy+n),l
- ldy #n ;- set 3,(iy+n),l
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_l
- ;0xDE - set 3,(iy+n)
- ldy #n ;- set 3,(iy+n)
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- ;0xDF - set 3,(iy+n),a
- ldy #n ;- set 3,(iy+n),a
- lda (z80_iy),y
- ora $08
- sta (z80_iy),y
- sta z80_a
- ;0xE0 - set 4,(iy+n),b
- ldy #n ;- set 4,(iy+n),b
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_b
- ;0xE1 - set 4,(iy+n),c
- ldy #n ;- set 4,(iy+n),c
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_c
- ;0xE2 - set 4,(iy+n),d
- ldy #n ;- set 4,(iy+n),d
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_d
- ;0xE3 - set 4,(iy+n),e
- ldy #n ;- set 4,(iy+n),e
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_e
- ;0xE4 - set 4,(iy+n),h
- ldy #n ;- set 4,(iy+n),h
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_h
- ;0xE5 - set 4,(iy+n),l
- ldy #n ;- set 4,(iy+n),l
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_l
- ;0xE6 - set 4,(iy+n)
- ldy #n ;- set 4,(iy+n)
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- ;0xE7 - set 4,(iy+n),a
- ldy #n ;- set 4,(iy+n),a
- lda (z80_iy),y
- ora $10
- sta (z80_iy),y
- sta z80_a
- ;0xE8 - set 5,(iy+n),b
- ldy #n ;- set 5,(iy+n),b
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_b
- ;0xE9 - set 5,(iy+n),c
- ldy #n ;- set 5,(iy+n),c
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_c
- ;0xEA - set 5,(iy+n),d
- ldy #n ;- set 5,(iy+n),d
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_d
- ;0xEB - set 5,(iy+n),e
- ldy #n ;- set 5,(iy+n),e
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_e
- ;0xEC - set 5,(iy+n),h
- ldy #n ;- set 5,(iy+n),h
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_h
- ;0xED - set 5,(iy+n),l
- ldy #n ;- set 5,(iy+n),l
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_l
- ;0xEE - set 5,(iy+n)
- ldy #n ;- set 5,(iy+n)
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- ;0xEF - set 5,(iy+n),a
- ldy #n ;- set 5,(iy+n),a
- lda (z80_iy),y
- ora $20
- sta (z80_iy),y
- sta z80_a
- ;0xF0 - set 6,(iy+n),b
- ldy #n ;- set 6,(iy+n),b
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_b
- ;0xF1 - set 6,(iy+n),c
- ldy #n ;- set 6,(iy+n),c
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_c
- ;0xF2 - set 6,(iy+n),d
- ldy #n ;- set 6,(iy+n),d
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_d
- ;0xF3 - set 6,(iy+n),e
- ldy #n ;- set 6,(iy+n),e
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_e
- ;0xF4 - set 6,(iy+n),h
- ldy #n ;- set 6,(iy+n),h
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_h
- ;0xF5 - set 6,(iy+n),l
- ldy #n ;- set 6,(iy+n),l
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_l
- ;0xF6 - set 6,(iy+n)
- ldy #n ;- set 6,(iy+n)
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- ;0xF7 - set 6,(iy+n),a
- ldy #n ;- set 6,(iy+n),a
- lda (z80_iy),y
- ora $40
- sta (z80_iy),y
- sta z80_a
- ;0xF8 - set 7,(iy+n),b
- ldy #n ;- set 7,(iy+n),b
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_b
- ;0xF9 - set 7,(iy+n),c
- ldy #n ;- set 7,(iy+n),c
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_c
- ;0xFA - set 7,(iy+n),d
- ldy #n ;- set 7,(iy+n),d
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_d
- ;0xFB - set 7,(iy+n),e
- ldy #n ;- set 7,(iy+n),e
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_e
- ;0xFC - set 7,(iy+n),h
- ldy #n ;- set 7,(iy+n),h
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_h
- ;0xFD - set 7,(iy+n),l
- ldy #n ;- set 7,(iy+n),l
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_l
- ;0xFE - set 7,(iy+n)
- ldy #n ;- set 7,(iy+n)
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- ;0xFF - set 7,(iy+n),a
- ldy #n ;- set 7,(iy+n),a
- lda (z80_iy),y
- ora $80
- sta (z80_iy),y
- sta z80_a
- ;---------------------------------------------------
|