?? p130.asm
字號(hào):
assume cs:codesg,ds:datasg
datasg segment
db 'BaSiC'
db 'iNfOrMaTiOn'
datasg ends
codesg segment
start: mov ax,datasg
mov ds,ax ;設(shè)置ds指向datasg段
mov bx,0 ;設(shè)置(bx)=0,ds:bx指向“BaSiC”的第一個(gè)字母
mov cx,5 ;設(shè)置循環(huán)次數(shù)5,因?yàn)椤癇aSiC”的有5個(gè)字母
s: mov al,[bx] ;將ASCII碼從ds:bx所指向的單元中取出
and al,11011111b ;將al中的ASCII碼的第5位置為0,變?yōu)榇髮懽帜? mov [bx],al ;將轉(zhuǎn)變后的ASCII碼寫回原單元
inc bx ;(bx)加1,ds:bx指向下一個(gè)字母
loop s
mov bx,5 ;設(shè)置(bx)=5,ds:bx指向“iNfOrMaTiOn”的第一個(gè)字母
mov cx,11 ;設(shè)置循環(huán)次數(shù)11,因?yàn)椤癷NfOrMaTiOn”的有11個(gè)字母
s0: mov al,[bx]
or al,00100000b ;將al中的ASCII碼的第5位置為0,變?yōu)樾懽帜? mov [bx],al
inc bx
loop s0
mov ax,4c00h
int 21h
codesg ends
end start
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -