第一题:.model small.datax dw ?y dw ?.codestart:mov ax,@datamov ds,axmov ax,xsub ax,yjg greatjz equalmov dl,'-'jmp printgreat:mov dl,31jmp printequal:mov dl,30print:mov ah,2int 21hmov ah,7int 21hmov ah,4chint 21hend startend
第二题:.model small.data first dw ?second dw ?min dw ?.code_start:mov ax,@datamov ds,axmov ax,firstsub ax,secondjng mfirstmov bx,secondmov min,bxjmp exitmov min,axexit:mov ah,4chint 21hend _startend
最后提醒一下,这些简单的题目真的应该自己动手写,然后动手汇编连接运行。否则你一辈子都学不会的。