""

3.2. Ocae peeo epeca

3.2.1. a a/a "" ca a c aa a/a a ac ac caca.

c a/a pecaec a eo, o , o poae a c ca a/a.

c cac, a/a, a aca C000-CFFF. ca C000-C7FF - cc a/a. ca C800-CFFF c cc a/a, .. a c e 2 a.

a / opaeec a:

- pe epec, paee a eae BM;

- , ooe aa, caoe 7 paeax ea.

Pae epc o 0 o 6 (aee oep paea ooaaec X); a ae ae BM o ooae, cooeceo, E2-E8.

B pae 0 (E2) ocoo caoea aa epaoo poeccopa. e c apeca C000-C08F, C0F0-C0FF oee peeo epeca.

Bpe epec ec cocao ac ea oeceae paee oe opae c aapo, acce aooo, aaoo-po a, eooopo ao.

c aoo paea X (1-6) c c CX00-CXFF, C0Y0-C0YF, e Y=X+8. c c c C800-CFFF. Oa caoc oco p opae o o apec cpa CX.

c / c c a, .

3.2.2. c

e C000-C00F a c . c C000-C00F c 1, c - c (7-pap ASCII). ooeo cap pap C063 eec c cpa: o pae 1, C, 0, L. , aapa ooe paa ae oe pcce ace a, o oo o oe coppoa popao acoc o coeo opo.

C ee o c oo pacoa c c c c. e cpoa aap C010-C01F : opaee o oao poeccopa cpacae cap ee C000-C00F 0 o aa cee a.

pep opopa oa coa c aap:

     : LDA ¤C000 ; c 
        BPL M     ; c =0: aa e aaa
        BIT ¤C010 ; cc c
        ASL       ; cpoc capeo papa
        ASL ¤C063 ; C/LAT->C
        ROR       ; C/LAT->cap pap
        RTS

3.2.3.

, pacooeo opce a, ca e C030-C03F. Bce o paoa. o oao poeccopa c c c . eoc opae, .

3.2.4.

c C040-C04F , c C050-C05F - x e (a pe oee aoopo): opaee oo x o oao poeccopa. IRQ c c c 500 , NMI - c c 50 . IRQ , ccc NMI. NMI co c acoo eooopa c .

3.2.5. c cc

p ac e c acceoo aooa opa peopaec popao.

Cc - c-.

c cc c C020-C02F. ee o oa cc c c c acae oceoaeoc co. c 1 oa cc oa c c c, c 0 - c.

C cc c C060. c o coeo ac 060 c epeac c 0 1, c 0 1 , opee aco e co: C020 c eppoae c C060 .

3.2.6. -

c - () ooe a o .

C C061 C062, cooeceo, c c cax .

coc , c c C064 C065, cc. C C CTAHHX .

c pooc ce opao:

- oa cc c c C070 - C07F;

- c c C064 (/ C065), c 0.

C070 1 c e C064 (C065) .

3.2.7. Beooop paa a

opaaea a pae opa xpac a BM. Toee, a pae cea oopaaec coepoe eoopoo aca a. ec 5 peo oopae.

CP BP paa a aae 8K, ocax peo - 2K. Haa apec pao a pae ee e. oopae oeopeo co aca a o pee cee opac o apec C7XY, e XY opeeec o ae.

apec:  00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
pe !------------------------------------------------
  HP ! 00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C
  CP ! 01 -- -- -- 11 -- -- -- 21 -- -- -- 31 -- -- --
  C ! 02 06 0A 0E 12 16 1A 1E 22 26 2A 2E 32 36 3A 3E
  HC ! 82 86 8A 8E 92 96 9A 9E A2 A6 AA AE B2 B6 BA BE
  BP ! 03 -- -- -- 13 -- -- -- 23 -- -- -- 33 -- -- --

He p oca opo paeco opa pax peax coc ooae:

    MX,MY - paep paa o opoa  epa  oax pea,
    Y - oep cpo, ca o 0 o MY-1 cepx,
    X - oep o  cpoe, ca o 0 o MX-1 cea,
     - apec aaa pao a,
    A - apec aa, opeo o (X,Y).

1. C: MX = MY = ¤20

           A =  + Y * ¤40 + 2 * X   (2 aa)

B epo ae xpac o coa, o opo - eo e e 00H0M, e

 HM = 00 - epc   = 000 - ep  100 - c
      01 - epa        001 - pac 101 - oeo
      10 - opa       010 - ee 110 - oo
      11 - opa       011 - e  111 - e

2. HC: MX = ¤40, MY = ¤20

           A =  + Y * ¤40 + X

B ae xpac o coa.

Kpae ¤1000 pae oac opaac e epx coo a eo oe, epae - aoopo.

3. HP: MX = MY = ¤40

           A =  + Y * ¤20 + X/2   (oaa)

a coep 2 o: 7-4 - e, 3-0 - pa. e opec a 6-4 2-0, a C.

4. CP: MX = MY = ¤80

           A =  + Y * ¤40 + X/2   (oaa)

Kopoa aa, a HP.

5. BP: MX = MY = ¤100

           A =  + Y * ¤40 + X/8   (o 1 )

a coep 8 oceoaex oe cpo: 1 ope e e, 0 - ep.

        ""