School assembly, many beginners on the PC are addressed and not understand, or even difficult to understand. Indeed, this knowledge is very abstract, and require relatively strong spatial imagination. In particular, we in the input string, that is how these characters arranged it? For this problem, I believe that many beginners is difficult to imagine how the arrangement. However, I can metaphor: memory is a lot of buildings, "buildings", "building" the proponents of "unit number", "door number" form, that "building" is equivalent to the memory address of the segment address, "Unit No." equivalent to the offset memory address, "Portal No. (home)" is equivalent to "change address", and each unit has 16 "door number (home)" and then when we find a "gateway number (home) "after entering into a" gateway number (home), "they will see that there will be a" people ", but we are talking about people that register within the meaning of" content ", I draw a diagram to show you will clear up.
D, with the DEBUG command come to this effect:
|----------> 0B1F is "building "------> segment address
|
| |------> The right is the "unit number "---> offset address
| |
| | |--------> This part is the "gateway to No. "-----> change address
| | |<------------------------------------------>|
0B1F: 0100 00 80 FF 02 75 05 C6 46-00 00 C3 E8 8C EB B4 3B
0B1F: 0110 CD 21 72 39 8B FA 33 C0-8B C8 49 26 34 00 0E 0B
''
''
''
[Omitted]
After reading this map, is not very aware of it? But smart people will have doubts, then how do we enter "the portal number (home)" mean? Good question, so the order can be entered " Portal No. (home), "appeared in called" addressing mode "concept! it plainly, is to teach you how to find this" gateway number (home). "Ha ha!
Well now understand? That you will see how I understand the PC's addressing modes (easy to understand):
In this I will only introduce more difficult to understand the:
1: register direct addressing:
You want to: in fact you have stood you are looking for a "gateway number (home)" in front of a direct knock on the door went up on the OK!
Examples: MOV AX, [2000H]
MOV AX, 2000H -> 2000H for storing the operand address unit number of symbols
The above two are not equivalent
2: Register indirect addressing mode:
You want to: you have stood you are looking for a "gateway number (home)" and "unit number", you have to find it, must know it in the current "unit number" several floor. If瀹冨湪6妤?閭d綘灏变笂鍒?妤煎氨OK浜?!娉ㄦ剰,鏈?珮鍙湁16妤?鍥犱负浠?箞鍛?閭e氨鐢―EBUG鐨凞鍛戒护鐪嬬湅鍛?鎱㈡參鏁板摝,鍛靛懙!!
渚嬪瓙: MOV AX,[BX]
璁$畻鍏紡: 鐗╃悊鍦板潃=16d*(DS)+(BX)
鐗╃悊鍦板潃=16d*(DS)+(SI)
鐗╃悊鍦板潃=16d*(DS)+(DI)
鐗╃悊鍦板潃=16d*(SS)+(BP)
3:瀵勫瓨鍣ㄧ浉瀵瑰鍧?柟寮?
浣犲氨鎯虫垚:浣犺鎵剧殑"闂ㄦ埛鍙?瀹?"鍏跺疄灏卞湪浣犲鐨勬ゼ涓婃垨鑰呮ゼ涓?浣犺鎵惧埌瀹?灏?蹇呴』鐭ラ亾瀹冨湪浣犳ゼ涓婂嚑妤?鎴栬?鍦ㄦゼ涓嬪嚑妤?灏監K浜?
渚嬪瓙: MOV AX,COUNT[SI]
MOV AX,[COUNT+SI]
鍏朵腑 COUNT涓轰綅绉婚噺鐨勭鍙峰湴鍧?br />
璁$畻鍏紡: 鐗╃悊鍦板潃=16d*(DS)+(BX)+8浣嶄綅绉婚噺
鎴?(SI) 鎴?16浣嶄綅鍋忕Щ閲?br />鎴?(DI)
鐗╃悊鍦板潃=16d*(SS)+(BP)+8浣嶅亸绉婚噺
4:鍩哄潃鍙樺潃瀵诲潃鏂瑰紡:
浣犲氨鎯虫垚:浣犺鎵剧殑"闂ㄦ埛鍙?瀹?"鏄窡浣忓湪鍚屼竴鏍嬫ゼ鐨勪笉鍚?amp;quot;鍗曞厓鍙?amp;quot;,浣犺鎵惧埌瀹?灏卞繀椤荤煡閬撳畠鏄鏍嬬殑鍝釜"鍗曞厓鍙?amp;quot;,骞朵笖浣忓湪鍑犳ゼ!閭f牱浣犲氨鍙互鎵惧埌瀹冧簡 !
渚嬪瓙: MOV AX,[BX][DI]
MOV AX,[BX+DI]
璁$畻鍏紡: 鐗╃悊鍦板潃=16d*(DS)+(BX)+(SI)
鎴?(DI)
鐗╃悊鍦板潃=16d*(SS)+(BP)+(SI)
鎴?(DI)
5:鐩稿鍩哄潃鍙樺潃瀵诲潃鏂瑰紡:
浣犲氨鎯虫垚:浣犲氨鎯虫垚:浣犺鎵剧殑"闂ㄦ埛鍙?瀹?"鏄窡浣忓湪鍚屼竴鏍嬫ゼ鐨勪笉鍚?amp;quot;鍗曞厓鍙?amp;quot;,瀹冩瘮浣犻珮鍑犲眰妤兼垨鑰呬綆鍑犲眰妤?鐒跺悗鐢ㄧ殑浣犵洰鍓嶇殑妤兼暟+/-灏卞彲浠ュ緱鍑轰綘瑕佹壘鐨勪綇鍦ㄥ嚑妤间簡!
渚嬪瓙: MOV,AX,MASK[BX][SI]
MOV,AX,MASK[BX+SI]
MOV,AX,[MASK+BX+SI]
浠ヤ笂涓変釜渚嬪瓙鏄瓑鏁堢殑!!
璁$畻鍏紡: 鐗╃悊鍦板潃=16d*(DS)+(BX)+(SI)+8浣嶄綅绉婚噺
鎴?(DI) 鎴?16浣嶄綅鍋忕Щ閲?br />鐗╃悊鍦板潃=16d*(SS)+(BP)+(SI)+8浣嶄綅绉婚噺
鎴?(DI) 鎴?16浣嶄綅鍋忕Щ閲?br />-------------------------------------------------- -------------------
鍛靛懙,缁堜簬鍐欏畬浜嗚繖绡囨暀绋?濂界疮鍝?! 鏄笉鏄寰楁垜鐨勬?缁村緢鍙︾被鍛?瑕佸垱鏂板憖!
涔︿笂澶悊璁轰簡,鎴戝氨鍒涙柊涓?釜,涓嶇煡閬撲綘浠湅寰楁噦鍚?
鍛靛懙,鍙嶆浣犱滑涓嶈!@##)(#$*!@(@鎴戝氨琛屼簡,鎴戝緢鍔姏鍐欎簡!!!
涓嬮潰,鎴戜妇涓▼搴忎緥瀛?璁╀綘浠姞娣卞嵃璞?!!
-------------------------------------------------- --------------------
缂栫▼姝ラ:
1: 寤虹珛缂撳啿鍖?涓鸿緭鍏ュ瓧绗︿覆(鏈?鑳借緭鍏?涓?
2: 鍙栫紦鍐插尯鐨勯鍦板潃,浠ヤ究鍚庨潰杩涜"瀵勫瓨鍣ㄩ棿鎺ュ鍧?柟寮?amp;quot;
3: 鍒╃敤"瀵勫瓨鍣ㄩ棿鎺ュ鍧?柟寮?amp;quot;鍙栧緱瀹為檯杈撳叆瀛楃涓暟,浠ヤ究纭寰幆娆℃暟
4: 鍒╃敤"瀵勫瓨鍣ㄩ棿鎺ュ鍧?柟寮?amp;quot;杈撳叆瀛楃涓茬殑鏈?悗涓?釜瀛楃
5: 鍒╃敤LOOP鎸囦护鍜?鍙锋樉绀哄姛鑳芥潵杩涜鍊掔潃鏄剧ず
-------------------------------------------------- --------------------
;绋嬪簭鍔熻兘锛氫换鎰忚緭鍏ュ嚑涓瓧绗?鏈?鑳借緭鍏?涓?锛屾寜鍥炶溅鍒欏?鐫?緭鍑猴紒
data segment
user_string db 10,0,10 dup(?)
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds, ax
lea dx,user_string ;寤虹珛杈撳叆瀛楃涓茬紦鍐插尯
mov ah,0ah
int 21h
xor si,si
xor bx, bx
mov bx,dx
mov cx,[bx+si+1] ;鐪嬭繖涓氨鏄?amp;quot;瀵勫瓨鍣ㄩ棿鎺ュ鍧?柟寮?amp;quot;
xor ch,ch ;鍏剁洰鐨勫氨鏄彇瀹為檯杈撳叆瀛楃涓暟
mov di,cx
lop: mov ah,2
mov dx,[bx+di+1];鐪嬭繖鍙堟槸"瀵勫瓨鍣ㄩ棿鎺ュ鍧?柟寮?amp;quot;
int 21h ;鍏剁洰鐨勫氨鏄彇杈撳叆瀛楃涓茬殑鏈?悗涓?釜瀛楃
dec di
loop lop ;渚濇寰幆鍊掔潃杈撳嚭瀛楃
mov ah, 4ch
int 21h
code ends
end start
-----------------------------------------------------------------------
5~~~~~~~~~~杩欐鐪熺殑瀹屽伐浜?浣犱滑鏈変粈涔堟剰瑙佸悧?缁欐垜瑙佹剰瑙佸憖!!鎴戝啓寰楀彲鑳戒笉鏄緢濂?!!!!
涓嶈繃,鎴戣繕鏄笇鏈涘緱鍒颁綘浠殑鏀寔浜?!!!!!!
相关链接:
avc-free
Experts advise: The Dragon Boat Festival computers do, "prevention" work
mov video
Contract should pay ATTENTION to what
Clean up your css
Directory Cartoons - Screen Savers
Converter Avi To 3gp
Lists People - Screen Savers
News about Web Or Video Cams
"Torch Light," the game features seven new
National Social Security card can break the ice in the Yangtze River Delta region
Evaluate Calculators And Converters
What is mkv file
C language library function (K class letters)
Charles Zhang: Sohu is looking for the next opponent
No comments:
Post a Comment