1樓:渡邊找綠子
title 第乙個
data segment
befor db ?
now db ?
after db ?
data ends
code segment
main proc far
assume cs:code,ds:data,es:datastart:push ds
push ax
mov ax,data
mov ds,ax
mov es,ax
pop ax
mov ah,1
int 21h
cmp al,61h
jb exit
cmp al,7ah
ja exit ;判斷是否為小寫字母mov now,al
sub al,1
mov before,al
add al,2
mov after,al;ascii碼相加減的要求數mov dl,before
mov ah,02h; 2號功能呼叫
int 21h
mov dl,now
mov ah,02h; 2號功能呼叫
int 21h
mov dl,after
mov ah,02h; 2號功能呼叫
int 21h
exit: code endsend start
ps:我也是新手,多討論.
2樓:菜鳥鴻
它的前導字母和後繼字母不就是ascii碼加減 1 嗎?
2、編寫乙個程式。將包含20個資料的陣列m分成2個陣列,正陣列p和負陣列n,並分別把這兩個陣列的資料個數存在zsgs,和fsgs單元。
這個用一條串傳輸指令就可以解決了吧。
**很長,沒空打字。
求高手編寫乙個組合語言的小程式
3樓:校力學
彙編器,輸入十進位輸出(十六進製制)
**段是真正承擔cs,ds**:**
org 100h
啟動:推cs br /> pop ds
再次:lea dx,tips1
mov ah,9
int 21h;顯示提示
異bp,bp,bp清
到mov cx, 5
:mov ah,0
詮釋16h;回聲輸入
cmp al 1bh; esc退出程式
jz退出
cmp al,0dh br /> jz顯示,輸入端輸入cmp al,'0'
jb _at_
cmp al,'9';資料驗證
ja _at_
mov ah,0eh
int 10h;進入
人,0fh
shl bp
mov bx,bp
shl 1
shl bp bp,
新增bp,bx
mov ah,0
載入bp,ax; bp * 10 + ax???
環@ 顯示: lea dx,tips2
mov ah,9
int 21h;顯示結果
mov cx,
垂耳:推cx
mov cl,4
> rol bp,cl
mov ax,bp
人,0fh
或人,30h
cmp al,'9'
jbe q1
附加人,7
q1:mov ah,0eh
int 10h;為十六進製制顯示
彈出cx
環垂耳mov al,'h'
> int 10h
jmp再次
退出:mov ah,0eh
mov al,'o'
int 10h
mov al,'k' br /> int 10hmov ah,0
詮釋16小時
mov ah,4ch
int 21h的
tips1 db 0dh,0ah,09「,輸入(0 - 65535d),按esc鍵退出:$'
tips2 db 0dh,0ah,09,「十六進製制:$'
**年底開始結束
4樓:匿名使用者
我給你三個數字輸入,從小到大輸出:
編譯:inkey巨集nn
mov啊,1h
中斷21h
子人,30h
mov bl,nn
mul bl
新增總和,斧頭
endm
資料段總和dw 0 /> str1的dw 0str2的dw 0
str3 dw 0
buff1 db 0
bu2 db「1 2 3 4 5 6 7 8 9 a」,0dh,0ah「 「
資料結束
堆疊段段堆疊
db 100 dup(?)
堆疊結束
**段假設cs,ds**: es:資料,資料,ss:堆疊sub1 proc遠遠開始推ds
mov ax,0
的push ax
mov ax,資料
mov ds,斧頭
mov es,斧頭
inkey 100,輸入的第乙個號碼
inkey 10
inkey
mov ax,總和
> mov str1的斧頭
mov總和,0
mov dl,「
mov啊,2h
中斷21h
inkey 100進入第一兩個數字
inkey 10
inkey 1,總和
mov str2的ax
mov總和,0
mov dl「,」樂章啊,2h
中斷21h
inkey 100;輸入數量
inkey 10
inkey 1
mov ax,總和
> mov str3,斧頭
mov dl,0dh
樂章啊,2h
21hmov dl,0ah
樂章啊,2h
> int 21h
mov ax,str1的三個數字大小
cmp斧頭,str2
jae a7。的
jmp a8
a7:mov bx,str2
mov str2,斧頭
mov str1中,bx
a8:mov ax,str2
cmp斧頭,str3
宰a9jmp a11
a9:mov bx,str3
mov str3,斧頭
mov str2,bx
mov ax,str1的
cmp斧頭,str2
宰a10
jmp a11
a10:mov bx,bx,str2
mov str2,斧頭
mov str1的
a11:mov ax,str1
mov al,啊
呼叫sub3
mov ax,str1
呼叫sub3
mov dl,「h」 />樂章啊,2h
中斷21h
mov dl,「
mov啊,2h
int 21h
xor啊,啊
mov ax,str2
mov al,啊
呼叫sub3
mov ax,str2
呼叫sub3
mov dl,「h」
>樂章啊,2h
21hmov dl,「」
mov啊,2h
21h異啊,啊
mov ax,str3
mov al,啊
呼叫sub3
mov ax,str3
通話sub3
mov dl,「h」
mov啊,2h 21h
retsub1 endp
sub2 proc
cmp al,9
ja g1
新增人,「0」;
jmp g2
g1:加al,37h
g2:mov dl,人
樂章啊,2
21hret
sub2 endp
sub3 proc
mov buff1人
shr人,1
shr人,1
shr人,1 br /> shr人,1
call sub2
mov al,buff1
人,0fh
call sub2
ret sub3 endp **結束
年底開始
(c語言):
#包括中
無效的main()
/ / a,b交換
(> c)
/ / a,c交換
(b> c)
/ / b,c交換
的printf(「從小到大輸出數:%d,%d,%d \ n」,a,b,c);}
求微控制器匯程式設計序
at89s52微控制器當按鈕按下後,燈1,燈2亮 燈1定時3秒後燈滅,燈2定時5秒後滅 匯程式設計序如下 org 0000h ljmp start org 000bh ljmp t0 int org 0030h start mov tmod,01h mov th0,0bh mov tl0,0dch ...
求簡單的匯程式設計序,急需啊,求乙個簡單的匯程式設計序,急需啊!!!
這個程式要求是把十進位制的數轉換成二進位制和十六進製制的 要求1 讓使用者輸入一讓我來答!嗯嗯!datas segment inf1 db 黑鷹論壇有你要找的答案 多少時間?就120分開發這個程式太便宜了。求乙個簡單的匯程式設計序 20 1 從鍵盤輸入乙個字元ah 01h mov ah,1 鍵盤輸入...
匯程式設計序求解釋,求解釋匯程式設計序
1 c口高四位和低四位的輸入輸出定義不是根據同組的a口或者b口決定的。因為這裡沒有用到c口,所以你隨便設定為0 2 mov dl,0ffh mov ah,06h int 21h 是dos中斷服務功能號為06h 直接控制台i o服務。當dl 0ffh時候,是從標準輸入 鍵盤 獲得使用者按鍵 不等待 當...
我是新手,求高手幫忙!編寫組合語言程式
下列程式,可滿足題目要求 data segment str db 18 db abcdefghijklmnopqz num db 5 data ends code segment assume cs code,ds datastart mov ax,data mov ds,ax mov al,num...
用組合語言程式求100 200間的全部素數
求100 200以內的素數 data segment d1 dw 200 dup 0 定義存放素數的位置data ends code segment main proc far assume cs code,ds datastart push ds xor ax,ax push ax mov ax,...