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

正文內(nèi)容

匯編語言第六章:循環(huán)與分支程序設(shè)計-wenkub

2022-10-28 16:38:50 本頁面
 

【正文】 相鄰兩個數(shù)進行比較,如次序?qū)t不做任何操作;如次序不對則使這兩個數(shù)交換位置。 call dispchar add si ,2 loop dispdec2 mov ax ,4c00h int 21h main endp code_seg ends end start 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第二節(jié) 分支結(jié)構(gòu)程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 ( 2) 分支程序設(shè)計方法 例 在附加段中,有一個按從小到大順序排列的無符號數(shù)的數(shù)組,其首地址存放在 Dl寄存器中, 數(shù)組中的第一個單元存放著數(shù)組長度。折半查找法的效率高于順序查找法。數(shù)組的第一個元素為數(shù)組的長度 ,其余的為數(shù)組的具體內(nèi)容 dseg segment start_addr dw ?。即要判斷是否小于數(shù)組元素的最小數(shù)或大于數(shù)組元素的最大數(shù) cmp ax ,es : [di+2]。在判斷是否和最小元素相等 , 如果相等結(jié)束 stc。也就是 2。若小于最大數(shù) ,就進入折半查找 je exit_b。第二步 。判斷是否為奇數(shù) .注意數(shù)組長度的地址指定數(shù)組中間的元素 (因為數(shù)組是字數(shù)組 ) jz add_idx inc si。相等 ,就結(jié)束操作 ,同時 CF為 0 ja highter。數(shù)據(jù)元素除以 2, 減半 jmp short even_idx all_done mov si,di mov di,start_addr exit_b: ret b_search endp cseg ends end b_search 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 ( 3)跳躍表法 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 例:根據(jù) bx的數(shù)據(jù)進行跳轉(zhuǎn),從低位到高位分別判斷 bx寄存器的位數(shù)是否為 1,為 1跳轉(zhuǎn),否則繼續(xù)判斷,直到 bx寄存器為 0。將 bx寄存器的最低位傳入 CF中 jnb not_yet。139。339。539。739。 CALL指令和RET指令就完成了調(diào)用和返回的功能。 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 為避免這種錯誤的產(chǎn)生在一進入子程序后就應(yīng)該把子程序所需要使用的寄存器內(nèi)容保存在堆棧中,而在退出子程序前把寄存器的內(nèi)容恢復(fù)原狀。 mov ax,bx test ax,0ffffh jnz rotate1 repeat1: pop dx mov ah,2 int 21h loop repeat1 pop dx pop cx pop bx pop ax ret btodecdisp endp btohexdisp proc far push ax push bx push cx push dx mov ch,4 mov cl,4 rotate2: rol bx,cl mov al,bl and al,0fh cmp al,10 jc decimal2 add al,37h jmp dispp2 decimal2: add al,30h dispp2: mov dl,al mov ah,2 int 21h dec ch jnz rotate2 pop dx pop cx pop bx pop ax ret btohexdisp endp btoo proc far push ax push bx push cx push dx mov cl , 1 mov ax , bx loopto: mov bx , ax rol bx , cl cmp cl , 1 jz too and bx , 0007h jmp tooo too: and bx, 0001h tooo: xchg bl , dl add dl , 30h xchg ax ,bx mov ah , 2 int 21h xchg ax , bx shl ax , cl jz exit3 mov cl , 3 jmp loopto exit3: pop dx pop cx pop bx pop ax ret btoo endp codeb ends code segment assume cs:code main proc far mov bx,5678H call btodecdisp call btohexdisp call btoo mov ah,4ch int 21h main endp code ends end main 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 例 從鍵盤輸入十進制數(shù)據(jù),以十六進制顯示在屏幕上 文件 public xyz public crlf data segment public xyz dw 9 data ends decihex segment public assume cs:decihex crlf proc near mov dl,0dh mov ah,2 int 21h mov dl,0ah mov ah,2 int 21h ret crlf endp decihex ends end 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 文件 2: extrn crlf:near extrn xyz:word decihex segment public assume cs:decihex start: mov ax,seg xyz mov ds , ax mov ax , xyz call decibin call crlf call binihex call crlf mov ax , 4c00h int 21h decibin proc near mov bx,0 newchar: mov ah,1 int 21h sub al,30h jl exit cmp al,9d jg exit cbw xchg ax,bx mov cx,10d mul cx xchg ax,bx add bx,ax jmp newchar exit: ret decibin endp binihex proc near mov ch,4 rotate: mov cl,4 rol bx,cl mov al,bl and al,0fh add al,30h cmp al,3ah jl print add al,7h print: mov dl,al mov ah,2 int 21h dec ch jnz rotate ret binihex endp decihex ends end start 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 運行: masm 形成 masm 形成 link 形成 link 形成 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 code_seg segment 100 table dw 3 dup(?) ary1 dw 10,20,30,40,50 count1 dw 5 sum1 dw ? ary2 dw 10,20,30,40,50 count2 dw 5 sum2 dw ? assume cs:code_seg , ds:code_seg , ss:code_seg main proc far start: mov ax, code_seg mov ds,ax mov ss,ax mov table ,offset ary1 mov table+2 , offset count1 mov table+4 , offset sum1 call near ptr proadd mov si , table+4 mov bx , [si] call disp mov table ,offset ary2 mov table+2 , offset count2 mov table+4 , offset sum2 call proadd mov si , table+4 mov bx , [si] call disp mov ax,4c00h int 21h main endp 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 。 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 第一章 基礎(chǔ)知識 第六章 循環(huán)與分支程序設(shè)計 程序: data_seg segment n_v dw 6 result dw ? data_seg ends stack_seg segment;定義堆棧段 dw 128 dup(?) tos label word;確定棧頂指針 stack_seg ends code1_seg segment assume cs:code1_seg , ss:stack_seg , ds:data_seg main proc far start: mov ax , data
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1