Assembly tasm未在变量中运行预定义数据
我在变量中赋值Assembly tasm未在变量中运行预定义数据,assembly,emulation,x86-16,tasm,Assembly,Emulation,X86 16,Tasm,我在变量中赋值 ar db 107,106,105,104,103,102,101,100,99,98 并且也不运行字符串 msg db "this is not printed by tasm ","$" 但这是在emu8086模拟器上运行的 实际代码 泡沫式 那有什么问题?我不能确定 谢谢你的支持 请不要偷懒,我需要结果 堆栈 .数据 .代码 org 5000h buff db 256 dup(?) 开始: mov-ah,3fh;从标准输入读取字符串 异或bx,bx mov-dx,偏
ar db 107,106,105,104,103,102,101,100,99,98
并且也不运行字符串
msg db "this is not printed by tasm ","$"
但这是在emu8086模拟器上运行的
实际代码
泡沫式
那有什么问题?我不能确定 谢谢你的支持 请不要偷懒,我需要结果 堆栈 .数据 .代码 org 5000h
buff db 256 dup(?)
开始:
mov-ah,3fh;从标准输入读取字符串
异或bx,bxmov-dx,偏移buff mov-cx,大小buff int 21h 好的 ret 好: mov bx,偏移增益
亚铝,2;忽略CRLF 推斧 cmp-al,2;两个或更多的字符? jb排序
add ax, bx
dec ax
mov cx, ax ; cx - ptr. to the last element
inc bx ; starting with the second element
第1组:
mov-si,cx;内部循环始终从最后一个元素开始
mov-dl,1;dl用作“排序”标志
第2组:
mov-ax,[si-1];得到两个字符
cmp al,啊,;它们整齐吗?
酷
xor-dl,dl;否,然后重置“排序”标志
mov[si-1],啊。。。交换价值观
mov[si],al
酷:
dec si;好的,内部循环继续,直到sitest dl, dl ; some exchanges occured ?
jne sorted ; nope - then the array is sorted
inc bx ; the outer loop continues till
cmp bx, cx ; bx goes past the last element in array ...
jbe for1
分类:
流行性感冒;将结果写入标准输出
异或bx,bx
mov啊,40小时
公司bx
mov-dx,偏移buff
int 21h
ret
结束-开始您需要发布代码的其余部分如何共享实际症状?您好,请任何人了解我在TASM中使用此代码时出现的问题(即出现错误)
ret