Cov txheej txheem:

Koj xam qhov chaw nyob zoo li cas?
Koj xam qhov chaw nyob zoo li cas?

Video: Koj xam qhov chaw nyob zoo li cas?

Video: Koj xam qhov chaw nyob zoo li cas?
Video: Saib Thaj Chaw Ua Tsev Nyob Li Ca Thiaj Zoo 20-10-2021 2024, Kaum ib hlis
Anonim

Hauv Kwv Tij Chaw nyob Hom, Qhov Program Counter (PC) yog tus sau npe implicitly. Yog li, cov chaw nyob zoo yog tsim los ntawm kev ntxiv cov lus qhia tom ntej chaw nyob mus rau chaw nyob teb. Vim li no, Qhov Chaw Nyob Zoo = 302 + 400 = 702.

Ntxiv rau qhov no, koj yuav suav li cas qhov chaw nyob thiab chaw nyob ntawm lub cev?

Txhawm rau xam qhov chaw nyob ntawm lub cev:

  1. saib tus lej nplooj ntawv hauv nplooj ntawv thiab tau txais tus lej ncej.
  2. los tsim qhov chaw nyob, ncej = 17 khoom; offset = 12 ntsis; ces 512 = 29. 1m = 220 => 0 - (229-1) yog lub ntsiab nco yog 512 k, ces qhov chaw nyob yog 29 khoom.

xam qhov chaw nyob ntawm lub cev li cas? Yog li ntawd, Chaw nyob ntawm lub cev = Base Chaw nyob + Offset. Piv txwv li cov ntaub ntawv ntu tuav lub Base Aaddress li 1000h thiab cov ntaub ntawv koj xav tau tam sim no nyob rau hauv 0020h qhov chaw nco (Offset) ntawm Cov Ntaub Ntawv Ntu. Cov xam ntawm qhov tseeb chaw nyob yog ua raws li nram no. Yog li qhov tseeb chaw nyob yog 10020h.

Kuj nug, qhov chaw nyob zoo ntawm lub hauv paus sau npe suav li cas?

Base register chaw nyob hom: Base register chaw nyob hom yog siv los siv inter segment hloov chaw tswj. Nyob hauv hom no chaw nyob zoo yog tau los ntawm kev ntxiv base register nqi rau chaw nyob teb tus nqi. UA = Base sau npe + Chaw nyob teb tus nqi. PC = Base sau npe + Tus nqi txheeb ze.

Qhov chaw nyob zoo hauv microprocessor yog dab tsi?

Chaw Nyob zoo los yog Offset Chaw nyob : Qhov offset rau lub cim xeeb operand yog hu ua operand's chaw nyob zoo los yog EA. Nws yog tus lej 16 uas tsis tau muab teev tseg uas qhia txog qhov kev ua haujlwm qhov deb hauv bytes los ntawm qhov pib ntawm ntu uas nws nyob. Hauv 8086 peb muaj cov ntawv sau npe thiab cov ntawv sau npe.

Pom zoo: