freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

匯編語言課后習題解答-在線瀏覽

2024-09-15 08:33本頁面
  

【正文】 e cs:codedata segment dw 2 dup (0)data endscode segment start: mov ax, data mov ds, ax mov bx,0 jmp word ptr [bx+1]code endsend start若要使jmp指令執(zhí)行后,CS:IP指向程序的第一條指令,在data段中應(yīng)該定義哪些數(shù)據(jù)? 答案①db 3 dup (0)答案②dw 2 dup (0)答案③dd 0jmp word ptr [bx+1]為段內(nèi)轉(zhuǎn)移,要CS:IP指向程序的第一條指令,應(yīng)設(shè)置ds:[bx+1]的字單元(2個字節(jié))存放數(shù)據(jù)應(yīng)為0,則(ip)=ds:[bx+1]=0簡單來說就是,只要ds:[bx+1]起始地址的兩個字節(jié)為0就可以了 (2) 程序如下:assume cs:codedata segment dd 12345678hdata endscode segment start: mov ax,data mov ds,ax mov bx,0 mov [bx], bx ?;騧ov [bx], offset start mov [bx+2], cs ?;騧ov [bx+2], seg code jmp dword ptr ds:[0]code endsend start補全程序,使用jmp指令執(zhí)行后,CS:IP指向程序的第一條指令。第二格可填①mov [bx+2],cs ②mov [bx+2],cs ③mov [bx+2],seg code等。assume cs:codecode segment start: mov ax,2000h mov ds, ax mov bx,0 s: mov ch,0 mov cl,[bx] jcxz ok 。assume cs:codecode segmentstart: mov ax,2000h mov ds, ax mov bx,0 s:mov cl,[bx] mov ch,0 inc cx 。assume cs:codestack segment db 16 dup (0)stack endscode segmentstart: mov ax, stack mov ss, ax mov sp,16 mov ax, 1000h push ax mov ax, 0 push ax retfcode endsend start 執(zhí)行reft指令時,相當于進行:pop ippop cs根據(jù)棧先進后出原則,應(yīng)先將段地址cs入棧,再將偏移地址ip入棧。(第192頁)下面的程序執(zhí)行后,ax中的數(shù)值為多少? 內(nèi)存地址 機器碼 匯編指令 執(zhí)行后情況 1000:0 b8 00 00 mov ax,0 ax=0, ip指向1000:31000:3 9a 09 00 00 10 call far ptr s pop cs,pop ip,ip指向1000:91000:8 40 inc ax1000:9 58 s: pop ax ax=8h add ax,ax ax=10h pop bx bx=1000h add ax,bx ax=1010h(第194頁)下面的程序執(zhí)行后,ax中的數(shù)值為多少?內(nèi)存地址 機器碼 匯編指令 執(zhí)行后情況1000:0 b8 06 00 mov ax,6 ax=6, ip指向1000:31000:3 ff d0 call ax pop ip, ip指向1000:61000:5 40 inc ax1000:6 58 mov bp ,sp bp=sp=fffeh 。編譯無法通過,只能理論分析.(第195頁)(1) 下面的程序執(zhí)行后,ax中的數(shù)值為多少?assume cs:codestack segment dw 8 dup (0)stack endscode segmentstart: mov ax, stack mov ss, ax mov sp,16 mov ds, ax mov ax,0 call word ptr ds:[0eh] inc ax inc axinc ax mov ax,4c00hint 21hcode endsend start 當程序執(zhí)行call word ptr ds:[0EH]語句時,相當于進行: 1: PUSH IP(此時IP的值為CALL語句下一條語句的偏移地址,也就是INC AX的偏移地址) 2: JMP WORD PTR SS(因為DS等于SS):[0EH],此時程序跳轉(zhuǎn)到CS:SS:[OEH]處執(zhí)行,因為 SS:[0EH]的值為0,所以跳轉(zhuǎn)到CS:0處開始執(zhí)行,也就是程序的第一條語句MOV AX, STACK,當程序再一次執(zhí)行到call word ptr ds:[0EH]時,又進行上面的兩步,但是此時SS:[OEH]的值已經(jīng)不是0了,而是上一次執(zhí) 行PUSH IP時,壓入的IP的值,而這個IP正是CALL語句下一條語句的偏移地址,也就是INC AX處執(zhí)行,所以AX的值為3. (2) 下面的程序執(zhí)行后,ax和bx中的數(shù)值為多少?assume cs:codesgstack segment dw 8 dup(0)stack endscodesg segmentstart: mov ax, stack mov ss, ax mov sp,10h mov word ptr ss:[0],offset s 。(ss:[2])=cs call dword ptr ss:[0] 。 ss:[0ch] = 19h ss:[0eh] = cs nops: mov ax, offset s 。ax=1ah(ss:[0ch])=1ah19h=1 mov bx, cs 。bx=cscs=0 mov ax,4c00h int 21hcodesg endsend start(第216頁)寫出下面每條指令執(zhí)行后,ZF、PF、SF、等標志位的值。mov 指令不改變標志位 ZF=1 PF=1
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1