Computers, Programming
Assembler - tsawg-qib commands rau novice programmers
Tag nrho cov commands yuav tseg nkaus xwb los ntawm ib lub tshuab hom lus. Assembler txib - ib lub cim sawv cev ntawm cov lus. Nrog nws, sau me me, tab sis ceev heev kev pab cuam. Tab sis txawm lawv loj, cov kev sau ntawv yog heev lub sij hawm siv.
Xam commands siv nyob rau hauv los ua ke
Dua li no paradox, raws li universality, tsuas 4 xam assembler kev qhia yog thiab yuav siv tau los ntawm cov. Cuaj kaum, lawv tau tsim los ntawm ib tug high-theem programming lus, uas ntiav computers, tsev khoom siv, xov tooj, ntse tes, laptops thiab thiaj li nyob. D. Ua hauj lwm nrog lawv yog ua tau, thiab heev ntse. assembler commands daim ntawv teev yog raws li nram no:
- Tsis tas li ntawd;
- sib rho;
- npaug;
- division.
Tsis tas li ntawd
Xam lag luam, lub npe hu txij thaum high school. Yuav kom siv tau qhov no feature koj yuav tsum xav txog xwb lub tas li ntawd, uas yog txuam nrog cov sawv cev ntawm cov folding xov tooj nyob rau hauv lub cim xeeb ntawm cov computer. Ib tug general saib ntawm lub lag luam yog raws li nram no:
Lub ADD
Cov pab neeg yuav siv sij hawm ib tug xov tooj ntawm hlwb, ntxiv rau lawv ua ke thiab sau "Yacheyku1". Tam sim no lub lag luam los ntawm cov zaj tej yam kev mob: ob tus xov tooj ntawm lub hlwb yuav tsum muaj tib lub daws teeb meem. Tsis tas li ntawd, yog hais tias muaj yog ib tug thawj register, ces koj yuav tau ntxiv rau nws tag nrho. Yog hais tias muaj yog ib tug thawj cell, ces nws yog tau mus ntxiv rau los yog tam sim ntawd operand los yog ib tug register.
Hauj lwm ntawm lub rooj sib txoos cov lus qhia thiab lawv siv yuav tsum tau ntau mus kom ze tshaj yuav muab tau ib tsab xov xwm. Los ntawm los ua ke teams, txawm lawv kev txomnyem npaum li cas, nws yog sau li ntawd, ntau phau ntawv uas muaj ntau tshaj li ib puas nplooj ntawv. Yog li ntawd, txawm yog cov khees tau yooj yim, peb xav kom koj mus nyeem ntxiv kom meej piav txog kev ua hauj lwm ntawm pab neeg IEP, uas yuav qhia rau koj paub tag nrho cov nuances rau txawv architectures.
sib rho
Qhov no lub lag luam yog ua los ntawm cov tib algorithm li yav dhau los ib tug. Txawm pab pawg zoo ib yam li cov ntaub ntawv hom:
Lub SUB
npaug
Yog hais tias lub division thiab tsis tas li ntawd tau siv tib pab neeg raws li rau unsigned thiab rau kos npe rau cov xov tooj, ces tus npaug thiab sib faib muaj ntau ntau yam algorithms rau lawv. Piv txwv li, kom muab unsigned xov tooj siv no hais kom ua:
MUL
IMUL
Koj muaj peev xwm ua tau raws li lwm yam embodiments, tab sis nws yog ntau to taub thiab paub. Qhia ob yam tseem ceeb, thiab cov tso rau hauv operand №1. Nyob rau hauv cov ntaub ntawv no, ib tug operand sau npe №1 tas protrudes thiab operand №2 - ib tug register los yog cim xeeb ntawm tes. Tab sis lwm cov kev xaiv kuj yuav tsum tau tham:
IMUL
IMUL
IMUL
Cov kev xaiv thawj yog zoo li MUL ntawm tus dais, yog li cov kev cai rau nws yuav tsum tau ntaus nqi no. Qhov thib ob xaiv tso cai rau koj mus ntsees qhia kom meej rau qhov chaw nyob - raws li ib tug tshwm sim, thiab qhov zoo tshaj yuav. Nyob rau hauv lub thib peb embodiment qhia txog ib tug register uas yuav ua tau tus thawj tau, thiab nyob rau lub txiaj ntsim ntawm lub npaug yog muab tso rau. Nyob rau hauv lub tam sim ntawd operand yog tsis meant kom meej ib qho kev register thiab tus naj npawb los ntawm cov uas mus muab operand.
division
Raws li hais saum toj no, siv mus rau faib lub ob pab ua ke. Rau unsigned tus xov tooj yog siv:
DIV
Rau kos npe rau tus xov tooj siv cov nram qab no hais kom ua:
IDIV
Daim ntawv thov feature division kev qhia no yog tias tsuas yog tus operand divider, uas ua raws li ib tug register los yog cim xeeb ntawm tes. Faib tus xov tooj yeej ib txwm muaj nws meej qhov chaw, uas yog nyob rau hauv lub xov tooj ntawm loj. Nws muaj nws qhov chaw thiab lub lag luam kev tshwm sim.
Nrhiav thiab lub ntsiab ntawm qhov chaw muaj peev xwm hais tib yam li cov lej khu: yuav tsum tau ib daim tsab xov xwm, raws li cov nqi ntawm cov ntaub ntawv yog txiav txim siab.
pab xaus
Tsis tas li ntawd dej num raws li "kuj yuav pab tau los ua ke cov lus qhia" thiab yuav tsum muaj xws li hais kom ua NEG
Thiab ke lag luam incrementing thiab decrementing (ua los yog zuj zus lawm operand unit). Increment operand yog tsim nyog los muab cov nram qab no hais kom ua:
INC
Yuav kom decrement yuav tsum muab:
Dec
Raws li yuav ua operand nco qhov chaw los yog sau npe. Kom pab ntawm cov ua hauj lwm yog hais tias lawv coj lawv tus kheej rau tsawg qhov chaw tshaj zoo xws li cov los ua ke cov lus qhia uas muab los ntawm tas li ntawd los yog kev rho tawm.
Similar articles
Trending Now