📜  程序使用过程宏从每个位置找出字大小数组的最大字节. emu8086 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:47.032000             🧑  作者: Mango

代码示例1
.model small
.stack 100h
.data
.code
msg db "Khan$"
var1 db lengthof msg
main:
mov ax,@data
mov ds,ax

;;;clear the screen;;;
mov ah,6
mov al,0
mov cl,0
mov ch,0ch
mov dl,4fh
mov dh,18h
mov bh,20h  ;back=green, for=black
int 10h

mov ah,6
mov al,0
mov cl,27h
add var1, cl
sub var1, 2
mov ch,0ch
mov dl,var1
mov dh,0ch
mov bh,0cfh ;back=light red, for=white
int 10h

mov ah,2
mov bh,0
mov dl,27h
mov dh,0ch
int 10h

mov ah,09h
mov dx,offset msg
int 21h
exit:
mov ah,4ch
int 21h
end main